0

I Use the following command to instantiate a VM on KVM[Ubuntu 14]

virt-install --name --ram 4096 --cpu , --vcpus=2 --arch=x86_64 --disk path=/var/lib/libvirt/images/image.qcow2,size=16,device=disk,bus=ide,format=qcow2 --os-type linux --os-variant rhel7 --import --network=network:default,model=virtio --host-device=pci_0000_01_10_5

With this command the hostdevice is attached with driver "vfio". However, I would require to have the host device use KVM as driver in spite of vfio.

How do I pass driver as KVM in the virt-install?

I tried :

--host-device=pci_0000_01_10_5,driver=KVM

& got the following error:- UnboundLocalError: local variable 'devtype' referenced before assignment

1 Answers1

0

That's a python bug in the virt-install code. You need to report this kind of thing to the Ubuntu bug tracker so they can fix the problem, rather than here as no Ubuntu maintainers will be looking for bugs here.

vfio is the recommended way to use host devices in KVM these days. The traditional kvm driver for host devices is deprecated and should no longer be used in general. Ubuntu 14 is pretty old at this point too, so I'd encourage you to upgrade to the latest version which will almost certainly already have fixed this problem (and 100's of other bugs).

DanielB
  • 2,461
  • 1
  • 10
  • 13