Skip to content

Converting Disks from RAW/QCOW2 to VMDK

Perform the following procedure to convert disks used by a KVM virtual machine into the format suitable for use with an ESXi virtual machine.

Before you begin

  • You will need a Linux host with a qemu-img utility installed. Use the following command to install the utility on Fedora-based systems:

    dnf install qemu-img
    
  • Some of the steps in this section require access to the ESXi Shell which is disabled by default. See Connecting to the ESXi Command-Line Interface for instructions on how to enable it.

  1. Shut down your KVM virtual machine running OpenVMS x86-64.

    VSI does not recommend converting images that are currently in use by a live system. If the system is running heavy I/O load, performing disk operations may result in damaged data/system.

  2. Execute the following command to convert the disk used on a KVM virtual machine into the vmdk format used by VMware ESXi:

    sudo qemu-img convert -f kvm-disk-format -O vmdk /path/to/disk/kvm-disk-name.kvm-disk-format esxi-disk-name.vmdk -o preallocation=full

  3. Upload the created .vmdk disk file to the ESXi host:

    scp esxi-disk-name.vmdk root@esxi-host-ip:/vmfs/volumes/wwid/virtual-machine-name

    Make sure that you specify the correct path to your ESXi virtual machine. You can verify it by executing the following command in the ESXi Shell:

    find / -name "esxi-vm-name"

    For information about the World Wide Identifier (WWID), refer to the following Broadcom article: Verify WWN Usage by ESXi Host.

  4. Once the upload is complete, connect to your ESXi host via SSH and navigate to your VM working directory as follows:

    ssh root@esxi-host-ip
    cd /vmfs/volumes/wwid/virtual-machine-name

  5. Convert the uploaded .vmdk disk file to the ESXi-compatible format using the following command:

    vmkfstools -i esxi-disk-name.vmdk esxi-disk-name-converted.vmdk

    After the command is executed, you can safely delete the original .vmdk file. It is no longer needed.

  6. Go to your ESXi VM settings and map the converted disk to a controller of your choice. See Adding Disks to an ESXi VM for information on how to do so.

  7. Start your VM and make sure that the image is readable.

  8. From the BOOTMGR> prompt, issue DEVICE. The disk should be listed as a boot device, not a data disk.

Next Steps

If you are planning to use this disk as a system disk on a node in a cluster, perform this additional configuration:

  1. Follow the steps described in the Rename OpenVMS Node article to change the SCSNODE and SCSSYSTEMID identifiers.

  2. Reconfigure DECnet by running the configuration script and specify the new DECnet name and an address of your choice. Use the following resources:

  3. Change IPCI settings if you use OpenVMS Cluster over IP.