VMware vSphere

 View Only
  • 1.  How to move a vm to another datastore on the same host

    Posted Jul 21, 2010 07:57 PM

    Hi

    I have a single ESX4 host with 3 Datastores and I need to move one VM to another datastore, how can I do this since I dont have the option to migrate the vm when I am connected directly to the host with vSphere client and I dont have a vCenter server also?

    Thanks, Maelito



  • 2.  RE: How to move a vm to another datastore on the same host

    Posted Jul 21, 2010 08:06 PM

    Without vCenter there really is only one way to do this - You can manually copy them to the new location - the steps to follow are -

    1) Power down the VM

    2) Remove the VM form inventory

    3) Using the data store browser in the vSphere client copy and past the VM directory to the new datastore

    4) Re-add the VM to the invensotry - using the datastore browser find the VMX file in the new location right click and add to inventory

    5) edit the setting of the vm - you are going to have to relink the virtual disks in their new locations

    6) Power on the VM

    If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful



  • 3.  RE: How to move a vm to another datastore on the same host

    Posted Jul 21, 2010 08:06 PM

    Hi

    You could unregister the vm from the vmware client, log on to the console of the ESX server with su privileges and perform a manual move of the vm's file to the new datastore. Once done you would re-register the vm.

    Regards

    Leafy911

    (Dont forget you recieve points when you award points)



  • 4.  RE: How to move a vm to another datastore on the same host

    Posted Jul 22, 2010 11:37 AM

    Thanks guys for the reply.

    I would like to user WINSCP to copy the vm files from one DS to another but there is not a straight copy option for this. I can only copy to my desktop and not to another host DS

    Is there a way using the VMKFSTOOLS?

    Thanks, Maelito



  • 5.  RE: How to move a vm to another datastore on the same host
    Best Answer

    Posted Jul 22, 2010 11:48 AM

    Hi,

    Yes, you can use #vmkfstools -i /vmfs/volumes/datastore/VM/VM.vmdk /vmfs/volumes/datastore/VM1/VM1.vmdk

    FYI, the datastore needs to be shared if you are copying VM's and VM needs to be powered off. In the above command you would copy VM.vmdk to VM1.vmdk and add the newly created VM with this existing VMDK.

    If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".



  • 6.  RE: How to move a vm to another datastore on the same host

    Posted Jul 22, 2010 03:54 PM

    That will take care of the VMDK's files but what about the other files? (VMX Logs, etc)

    thanks,Maelito



  • 7.  RE: How to move a vm to another datastore on the same host

    Posted Jul 22, 2010 03:59 PM

    Take a look at Veeam's FastSCP at http://www.veeam.com/vmware-esxi-fastscp.html

    André



  • 8.  RE: How to move a vm to another datastore on the same host

    Posted Jul 22, 2010 04:05 PM

    For all other configuration files use the "cp" command :smileyhappy:

    If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".