Difference between revisions of "CentOS 7.x import ova file based VMs to KVM"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>CentOS_7.x_kvm|CentOS 7.x kvm</yambe:breadcrumb> =CentOS 7.x Import ova files based VMs to KVM= Ova files are tar archives containing various VM disk files...")
 
m
Line 25: Line 25:
# Finally click begin installation
# Finally click begin installation


Refer:
* https://wiki.hackzine.org/sysadmin/kvm-import-ova.html




<yambe:breadcrumb>CentOS_7.x_kvm|CentOS 7.x kvm</yambe:breadcrumb>
<yambe:breadcrumb>CentOS_7.x_kvm|CentOS 7.x kvm</yambe:breadcrumb>

Revision as of 02:54, 15 September 2019

<yambe:breadcrumb>CentOS_7.x_kvm|CentOS 7.x kvm</yambe:breadcrumb>

CentOS 7.x Import ova files 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:


<yambe:breadcrumb>CentOS_7.x_kvm|CentOS 7.x kvm</yambe:breadcrumb>