$ cd /vmfs/volumes/datastore1/

$ ls -la

total 793616
drwxr-xr-t 1 root root 1540 Dec 8 10:24 .
drwxr-xr-x 1 root root 512 Dec 8 11:06 ..
-r-------- 1 root root 4915200 Nov 24 11:02 .fbb.sf
-r-------- 1 root root 267026432 Nov 24 11:02 .fdc.sf
-r-------- 1 root root 1179648 Nov 24 11:02 .pb2.sf
-r-------- 1 root root 268435456 Nov 24 11:02 .pbc.sf
-r-------- 1 root root 262733824 Nov 24 11:02 .sbc.sf
drwx------ 1 root root 280 Nov 24 11:02 .sdd.sf
-r-------- 1 root root 4194304 Nov 24 11:02 .vh.sf
drwxr-xr-x 1 root root 700 Nov 24 11:14 distrib
drwxr-xr-x 1 root root 1120 Dec 8 11:06 vm001

$ mkdir vm003

$ vmkfstools --clonevirtualdisk ./vm001/vm001_0.vmdk ./vm003/vm003_0.vmdk --diskformat thin

Destination disk format: VMFS thin-provisioned
Cloning disk './vm001/vm001_0.vmdk'...
Clone: 100% done.

$ grep -vE '^(sched.swap.derivedName|uuid.location|uuid.bios|ethernet0.generatedAddress|extendedConfigFile) = ' ./vm001/vm001.vmx > ./vm003/vm003.vmx

$ sed -i 's|vm001|vm003|g' ./vm003/vm003.vmx

$ cp ./vm001/vm001.nvram ./vm003/vm003.nvram






http://www.extrasphere.ru/download

Comments powered by CComment