~ # vmware -v VMware ESXi 4.1.0 build-348481 |
create a directory for a clone VM
~ # mkdir /vmfs/volumes/datastore1/CLONE |
make a clone VM with vmkfstools command.
vmkfstools –i “/parh/original VM.vmdk” “/path/clone VM.vmdk”
~#vmkfstools -i /vmfs/volumes/datastore1/ORIGINAL/ORIGINAL.vmdk /vmfs/volumes/datastore1/CLONE/CLONE.vmdk Destination disk format: VMFS zeroedthick Cloning disk '/vmfs/volumes/datastore1/ORIGINAL/ORIGINAL.vmdk'... Clone: 100% done. ~ # |
copy original VM’s vmx file to clone VM’s directory.
# cp ../ORIGINAL/ORIGINAL.vmx CLONE.vmx |
modify vmx file
# cat CLONE.vmx | grep -v "ethernet0.generatedAddress = " | grep -v "ethernet0.generatedAddressOffset = " | grep -v "uuid.location = " | grep -v "uuid.bios = " | sed 's/'"ORIGINAL"'/'"CLONE"'/g' > vmx.tmp | echo 'uuid.action = "keep"' >> vmx.tmp # cp vmx.tmp CLONE.vmx |
register a clone VM
please note that you need to specify full path.
# /bin/vim-cmd solo/registervm /vmfs/volumes/datastore1/CLONE/CLONE.vmx |
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.