When we try to copy a vmdk file from one datastore to another using cp command, it will not allow. Why? As moving this same file is possible using storage vmotion (svmotion)?
Thanks
You cannot copy a file that is in use (if the VM is powered on).
Use SVmotion instead.
Andre
**if you found this or any other answer useful please consider allocating points for helpful or correct answers
does that mean that my vm is in use so i can use svmotion and move the vm, so if the vm is power off then can move my vmdk file
thanks
if your VM is in use you will need to use Storage VMotion to move it. If it powered off you should use the "cold migration" feature to move it. (VMotion it when the VM is powered off, this will give you the option to move it)
Duncan
VMware Communities User Moderator | VCP | VCDX
-
If you find this information useful, please award points for "correct" or "helpful".
when you try to move the vmdk or vmdk flat file, I will suggest you do this from the virtual center. If you manually copy from the command line, and deleted the original vmdk and flat file, you may end up have to manual edit the vm configuration file to point to the new location
Craig
vExpert 2009
You mentioned "copy". You can easily clone the VM while it's powered on to another VM. After clone is done, you have a copy of all the files that make up your source VM. You can now do what you need to with that set of files.
yes that's right.. but my question is can i copy my vmdk file to another storage by cp command..
i guess know and we have to use storage vmotion or cloning why it is ?
what is thw limitation ??
thnaks
From memory, I was told you shouldn't use the cp command to copy vmdk files.
Instead the vmkfstools should be used to copy vmdk disks, this allocates the full destination file space and then dd's the data across.
why it is not supported and if u can share the vmkfstool comanad guide it would be great
thanks for your help.
If you do a search on cp & vmkfstools you will pick up quite a few threads discussing this in some detail.
As for how to use vmkfstools, the following site is useful...
specifically
Copy from one vmfs to another:
Source=/vmfs/volumes/esxpublic/testvm2.vmdk
Destination=/vmfs/volumes/production/testvmnew2.vmdk
vmkfstools -i /vmfs/volumes/esxpublic/testvm2.vmdk /vmfs/volumes/production/testvmnew2.vmdk
You could try vSphere Client method right click VM->Migrate->choose neither move to different host or move the disk to different storage. These two can be done while VM is on, but you have to do one process at a time but doable, if you want to try both migrate VM/disk to different hosts and storage, than the VM must be off. I found this method is fast and easy to do so give it a shot.
If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
Regards,
Stefan Nguyen
VMware vExpert 2009
iGeek Systems Inc.
VMware, Citrix, Microsoft Consultant