CentOS 7.x import ova file based VMs to KVM

From Notes_Wiki

Home > CentOS > CentOS 7.x > Virtualization > CentOS 7.x kvm > CentOS 7.x import ova file based VMs to KVM

Ova files are tar archives containing various VM disk files in .vmdk format and suggested VM configuration in .ovf format. We can use qemu-img to convert .vmdk to .qcow2 which supports snapshots and then use in KVM. Thus, for importing ova file into KVM use following steps:

  1. Extract ova file to get vmdk images
    tar xvf <ova-file-name>
  2. Convert vmdk to qcow2 for each hard-disk using qemu-img
    qemu-img convert -O qcow2 <source-disk.vmdk> <destination-disk.qcow2>
  3. Open the associated ovf file and look at following parameters
    • Disk ovf:capacity for each disk. The same should be visible while importing existing disk in virt-manager later
    • Number of Virtual CPUs (ResourceType 3)
    • Memory Size (ResourceType 4)
    • PCNet32 ethernet adapter (ResourceType PCNet32)
  4. Start virt-manager (as root user)
  5. Click on "New VM" button and choose "import existing disk image" option
  6. Select desired VM disk (qcow2) file. Choose first OS disk here. Other disks can be added later.
  7. If OS is known select OS else leave it to generic values
  8. Assign minimum RAM as per .ovf file values and appropriate no. of CPUs
  9. Give VM name.
  10. If you want to add more disks and NIC then select "Customize configuration before install" checkbox. This will help in validating qcow2 file size read in ovf file for OS disk also.
  11. Finally click begin installation

Refer:


Home > CentOS > CentOS 7.x > Virtualization > CentOS 7.x kvm > CentOS 7.x import ova file based VMs to KVM