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
Tip
Recommended migration method
The recommended migration option includes an NFS volume that is 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.
High bandwidth / low latency connected source:
Limited bandwidth / high latency connected source:
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.
Important
Migration using the V2Z tool requires infrastructure preparations.
Contact Zadara’s Operations team for coordinating the migration’s planning and infrastructure setup stages.
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>
The
v2z vsphere vm-info <VM_NAME>
command displays 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
v2z vsphere migrate-vsphere-vm-via-block-device
:For Toolbox Fedora 2.3.1 and later, this command automatically determines details such as disk and instance types.
Usage:
Usage: v2z vsphere migrate-vsphere-vm-via-block-device [OPTIONS] VM_NAME OUTPUT_PATH Options: --config-path TEXT --help Show this message and exit.
For example:
v2z vsphere migrate-vsphere-vm-via-block-device win2012r2-bios-2disk /home/fedora/data
Note
After the VM is created, and while it is powered off, the instance type can be changed.
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.
Migrating to a DVS project¶
VMware VMs that are migrated to zCompute using the V2Z migration process result in VMs in a rich VPC networking type project rather than in the simpler DVS networking alternative.
Tenants that prefer the simpler DVS networking model can further migrate their newly migrated zCompute VPC VMs to a DVS project.
See Migrating a VM to a DVS project in the Networking Guide.