VK Cloud logo
Updated atDecember 20, 2023   05:58 AM

VMware VM Migration to VK Cloud

1. Check the possibility of migration

The VMware virtual machine must meet the following requirements:

  • The VM operating system has a 64-bit architecture.
  • VM uses BIOS emulation.
  • The current user has administrator rights.
  • At least one disk is connected to the VM.

2. Prepare the VM for migration

  1. Check availability of VirtIO drivers in the system.

  2. Check availability QEMU Guest Agent:

    systemctl status qemu-guest-agent

    If there is no QEMU guest agent, install it.

  3. Check if the Cloud-Init utility is installed:

    cloud-init --version

    If the utility is missing, install it.

  4. Create a file /etc/netplan/50-cloud-init.yaml with the following contents:

    1network:
    2    ethernets:
    3        ens3:
    4            dhcp4: true
    5    version: 2
  5. Uninstall VMware Tools if this software is installed.

3. Export the virtual machine

  1. Stop the VM.

  2. Select the desired VM and export to the format .ovf.

Several .ovf and .vmdk files will be created — a second file will be needed for further work.

4. Import the VM image to VK Cloud

To load a VM image, use the OpenStack CLI to avoid possible errors when processing large files by the web interface.

  1. Make sure that the OpenStack client is installed and you can log in to it.

  2. Convert a disk file from VMDK format to RAW:

    qemu-img convert -f vmdk -O raw <file_path.vmdk> <file_path.raw>
  3. Upload the resulting export file .raw to an existing VK Cloud project.

    openstack image create --private --container-format bare --disk-format raw --property store=s3 --file <file_path.raw> <image name>

    If the VM needs to support backup, add parameters to the command:

    --property hw_qemu_guest_agent=yes --property os_require_quiesce=yes
  4. Check the image download in personal account VK Cloud in section Cloud Computing → Images or via CLI:

    openstack image list

    The image should appear in the list and have the status ACTIVE.

5. Create a virtual machine

Use the imported image to create a Linux VM:

  • when creating a VM in your personal account, select an image from the list;
  • when creating via the OpenStack CLI, specify the image ID in the appropriate command.