ovfTool to shutdown and move, then boot up a VM on another esxi host without vCenter


Recently I came across a tool called ovftool.exe(thanks to virtuallyghetto.com) version 4.1 which can be downloaded via https://www.vmware.com/support/developer/ovf/ -

For a friends business that has recently bought a new Dell PowerEdge R430 that wanted to move their VM's overnight from their T310.

I ran the following and it worked a treat to migrate 3 virtual machines to the new server

ovftool.exe --disableVerification --noSSLVerify --powerOffSource --powerOn -ds=datastore5 vi://root:password@192.168.200.4/my-vm1 vi://root:password@192.168.200.5

ovftool.exe --disableVerification --noSSLVerify --powerOffSource --powerOn -ds=datastore5 vi://root:password@192.168.200.4/my-vm2 vi://root:password@192.168.200.5

ovftool.exe --disableVerification --noSSLVerify --powerOffSource --powerOn -ds=datastore5 vi://root:password@192.168.200.4/my-vm3 vi://root:password@192.168.200.5

To breakdown above:

ovftool.exe                      : the VMware tool OVFtool that we are using
--disableVerification       : Skips validation of signature and certificate. Binary option.
--noSSLVerify                 : Disable the requirement to type 'yes' to proceed
--powerOffSource           : Power off the source VM before starting
--powerOn                       : Power on the destination copy of the server after moving
-ds=datastore5                 : datastore5 is the name of the datastore on the destination esxi host
vi://root:password@192.168.200.4/my-vm1                 the source host and source vm my-vm1
vi://root:password@192.168.200.5                                the destination host


If you are unsure about this, you can create a 'dummy' VM and power it up and run the script against it and watch it shutdown the source VM, copy to the new host and boot up the server on the destination host.

Userguide here https://www.vmware.com/support/developer/ovf/ovf10/ovftool_10_userguide.pdf

Comments

Popular Posts