~ # df -h
Filesystem Size Used Available Use% Mounted on
VMFS-5 815.2G 176.8G 638.4G 22% /vmfs/volumes/datastore7
vfat 4.0G 15.7M 4.0G 0% /vmfs/volumes/4f68bda3-97978538-a782-68b5997930fe
vfat 249.7M 127.4M 122.3M 51% /vmfs/volumes/92755d79-1a111aea-3485-10415c73d394
vfat 249.7M 140.4M 109.3M 56% /vmfs/volumes/8a831a72-44771306-34a5-8ef77b16ba57
vfat 285.8M 176.2M 109.6M 62% /vmfs/volumes/4f68bd8c-db674f0a-6000-68b5997930fe
~ # pwd
/
~ # cd vmfs/volumes/datastore7/
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # mkdir sharedisk
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # cd sharedisk/
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk # vmkfstools
No valid command specified
OPTIONS FOR FILE SYSTEMS:
vmkfstools -C --createfs [vmfs3|vmfs5]
-b --blocksize #[mMkK]
-S --setfsname fsName
-Z --spanfs span-partition
-G --growfs grown-partition
deviceName
-P --queryfs -h --humanreadable
-T --upgradevmfs
vmfsPath
OPTIONS FOR VIRTUAL DISKS:
vmkfstools -c --createvirtualdisk #[gGmMkK]
-d --diskformat [zeroedthick|
thin|
eagerzeroedthick]
-a --adaptertype [buslogic|lsilogic|ide]
-w --writezeros
-j --inflatedisk
-k --eagerzero
-K --punchzero
-U --deletevirtualdisk
-E --renamevirtualdisk srcDisk
-i --clonevirtualdisk srcDisk
-d --diskformat [zeroedthick|
thin|
eagerzeroedthick|
rdm:<device>|rdmp:<device>|
2gbsparse]
-N --avoidnativeclone
-X --extendvirtualdisk #[gGmMkK]
[-d --diskformat eagerzeroedthick]
-M --migratevirtualdisk
-r --createrdm /vmfs/devices/disks/...
-q --queryrdm
-z --createrdmpassthru /vmfs/devices/disks/...
-v --verbose #
-g --geometry
-I --snapshotdisk srcDisk
-x --fix [check|repair]
-e --chainConsistent
vmfsPath
OPTIONS FOR DEVICES:
-L --lock [reserve|release|lunreset|targetreset|busreset|readkeys|readresv] /vmfs/devices/disks/...
-B --breaklock /vmfs/devices/disks/...
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk # vmkfstools -c 1024m -a lsilogic -d eagerzeroedthick sharedisk.vmdk
Creating disk 'sharedisk.vmdk' and zeroing it out...
Create: 100% done.
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk #
Go to vspere client to add the sharedisk:
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # ls
2008ent_sp1 Windows Server 2003 Standard Edition vm01
MR18_126 sharedisk win2k8 R2 x64
VMware Data Recovery template
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe # cd 2008ent_sp1/
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/2008ent_sp1 # ls
2008ent_sp1-01569b60.vswp 2008ent_sp1.vmdk 2008ent_sp1.vmxf vmx-2008ent_sp1-22453088-1.vswp
2008ent_sp1-flat.vmdk 2008ent_sp1.vmsd vmware-1.log
2008ent_sp1.nvram 2008ent_sp1.vmx vmware.log
/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/2008ent_sp1 # vi 2008ent_sp1.vmx
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
scsi0.pciSlotNumber = "160"
ethernet0.pciSlotNumber = "32"
vmci0.pciSlotNumber = "33"
scsi0.sasWWID = "50 05 05 6c f9 de 7f b0"
hostCPUID.0 = "0000000b756e65476c65746e49656e69"
hostCPUID.1 = "000206c200200800029ee3ffbfebfbff"
hostCPUID.80000001 = "0000000000000000000000012c100800"
guestCPUID.0 = "0000000b756e65476c65746e49656e69"
guestCPUID.1 = "000206c200010800829822030febfbff"
guestCPUID.80000001 = "00000000000000000000000128100800"
userCPUID.0 = "0000000b756e65476c65746e49656e69"
userCPUID.1 = "000206c200200800029822030febfbff"
userCPUID.80000001 = "00000000000000000000000128100800"
evcCompatibilityMode = "FALSE"
vmotion.checkpointFBSize = "8388608"
scsi0:2.fileName = "/vmfs/volumes/4f68bd9f-19085876-80c4-68b5997930fe/sharedisk/sharedisk.vmdk"
#iscsi0:2.mode = "persistent"
scsi0:2.ctkEnabled = "false"
scsi0:2.deviceType = "scsi-hardDisk"
scsi0:2.present = "true"
scsi0:2.redo = ""
scsil.present="true"
scsil.sharedBus="virtual"
scsil.veritualDev="lsilogic"
scsil:2.mode="independent-persistent"
sched.scsil:2.shares="normal"
disk.locking="false"
diskLib.dataCacheMaxSize="0"
diskLib.dataCacheMaxReadAheadSize="0"
diskLib.dataCachePageSize="4096"
diskLib.maxUnsyncedWrites="0"
Modify the file on every VM which will use the sharedisk.
Actually ,you also can use the GUI to finish this:
On the other machine you can add the existing disk into it.