Migrating VMware VMs to zCompute¶
VMware VMs are migrated to zCompute by converting the boot disk using
virt-v2v
and migrating the other disks intact, as block devices.
There are two methods to migrate VMware VMs to zCompute:
Migrate VMWare VMs from NFS share
The recommended migration option includes an NFS volume accessible to both the source virtualization platform (e.g. as a datastore for Vmware ESXi hosts) and to the importer VM over a direct subnet to which it’s attached.
Migrate VMs using the VMware API
Other, slower options involve copying the source VM’s virtual disks to the zCompute cloud from the virtualization platform’s management interface (e.g. HTTP copy of vmdk files from vCenter or ESXi hosts).
Prerequisites¶
The V2Z migration tool must be installed and configured, with attention to source and target prerequisites. See V2Z migration prerequisites.
Migrate VMs using the VMware API¶
This is the simplest migration method but slower than the NFS share alternative, thus increasing downtime.
In this migration process, the vSphere API is accessed, and after the vmdk is detected, the vmdk files are migrated into the importer VM using HTTP GET.
The boot disk has to be converted using virt-v2v and additional disks are migrated directly into a zCompute block device, using HTTP GET.
The V2Z migration tool accesses the vSphere API based a configuration file that is populated with the vSphere host and credentials.
Prerequisites¶
V2Z should already be configured for first usage during the V2Z installation
and configuration phase, using the v2z config
command.
See Installing the V2Z migration tool.
The configuration can be viewed and modified using the v2z config
command.
Migration¶
Confirm connectivity to vSphere by running the command
v2z vsphere vm-info <VM_NAME>
that will display information of a VM that you want to migrate. For example:
[fedora@fedora-36-zadara-toolbox-d9cbc89-vm ~]$ v2z vsphere vm-info win2016-bios Logs for this migration will be available in /var/log/v2z/20220913141833.log 20220913141833|INFO|ID:cc34dc1c-d447-4d07-9085-45c602d70a2a|Fetching VM information for VM win2016-bios 20220913141833|INFO|ID:cc34dc1c-d447-4d07-9085-45c602d70a2a|Successfully fetched the VM info for VM: win2016-bios Info: {'name': 'win2016-bios', 'instance_uuid': '503f5ac2-77ae-11f5-a6a1-02c05943c5f7', 'bios_instance_uuid': '423ffb10-d395-5168-9b1f-13d944d0b27f', 'cpu': 1, 'guest_os_name': 'Microsoft Windows Server 2012 (64-bit)', 'memory': 4096, 'power_state': 'poweredOff', 'firmware': 'bios', 'virtual_disk': [{'file_name': '[VPSA_gen3_rnd_prod] win2016-bios/win2016-bios.vmdk', 'datastore_name': 'VPSA_gen3_rnd_prod', 'size_in_kb': 41943040}]} { "name": "win2016-bios", "instance_uuid": "503f5ac2-77ae-11f5-a6a1-02c05943c5f7", "bios_instance_uuid": "423ffb10-d395-5168-9b1f-13d944d0b27f", "cpu": 1, "guest_os_name": "Microsoft Windows Server 2012 (64-bit)", "memory": 4096, "power_state": "poweredOff", "firmware": "bios", "virtual_disk": [ { "file_name": "[VPSA_gen3_rnd_prod] win2016-bios/win2016-bios.vmdk", "datastore_name": "VPSA_gen3_rnd_prod", "size_in_kb": 41943040 } ] }
Make sure that the temporary directory (usually
/home/fedora/data
) has double the capacity of the boot vmdk.Migrate the VM using the
migrate-vmdk-via-block-device
command.Usage:
v2z vsphere migrate-vsphere-vm-via-block-device <VM_NAME> <OUTPUT_PATH>
For example:
v2z vsphere migrate-vsphere-vm-via-block-device migratio-clean-test /home/fedora/data
Continue with Post-migration configuration.
Post-migration configuration¶
After the VM migration has completed, start up the migrated VM and complete its network setup.
In the zCompute UI, go to Compute > Instances.
Select the migrated VM, and click Start.
The Attach Interface dialog opens, prompting you to attach a network to the VM. It is possible to specify a subnet, an existing NIC or the VM’s MAC address.