# libvirt ## virtio drivers for Windows guests * https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md ## Create storage pool ``` # mkdir /var/lib/libvirt/Appliances # virsh pool-define-as Appliances --type dir --target /var/lib/libvirt/Appliances # virsh pool-start Appliances # virsh pool-autostart Appliances ``` Or use GUI... ## Import OVA into libvirt/KVM ``` # virt-v2v \ -i ova /root/third_party_appliance.ova \ -o libvirt -of qcow2 \ -os Appliances -n default ``` The options read as: * `-i ova /root/third_party_appliance.ova` == input is an ova file called `/root/third_party_appliance.ova` * `-o libvirt -of qcow2` == output a libvirt VM in a qcow2 file format * `-os Appliances` == place the output VM in the Appliances pool * `-n default` == configure the VM to use the default network Sample output: ``` [ 0.0] Opening the source -i ova third_party_appliance.ova [ 0.1] Creating an overlay to protect the source from being modified [ 0.1] Initializing the target -o libvirt -os Appliances [ 0.1] Opening the overlay [ 13.7] Inspecting the overlay [ 14.6] Checking for sufficient free disk space in the guest [ 14.6] Estimating space required on target for each disk [ 14.6] Converting Windows 7 Enterprise to run on KVM [ 15.0] Mapping filesystem data to avoid copying unused and blank areas [ 15.4] Closing the overlay [ 15.6] Checking if the guest needs BIOS or UEFI to boot [ 15.6] Assigning disks to buses [ 15.6] Copying disk 1/1 to /var/lib/libvirt/Appliances/third_party_appliance-sda (qcow2) (100.00/100%) [ 132.3] Creating output metadata Pool Appliances refreshed [ 132.5] Finishing off ``` Source: https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v