1

I'm trying to set up a USB modem passthrough in kvm virt-manager. The host is Fedora 20. The guest is Centos 6

$ ifconfig
wlp0s29u1u6: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    ether 00:1a:3f:66:28:92  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The modem works connecting from the host. As bridged networking does not work with wireless I installed this second USB modem. The primary one is PCI.

I configured the passthrough in the virt-manager interface but when I try to start the guest I get this error message:

Error starting domain: Cannot set interface MAC on 'wlp0s29u1u6': Device or resource busy

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 91, in cb_wrapper
callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 127, in tmpcb
callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1260, in startup
self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 708, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Cannot set interface MAC on 'wlp0s29u1u6': Device or resource busy

I guess I must first detach or unmount the device but how?

EDIT

# virsh dumpxml rhel6
<domain type='kvm'>
  <name>rhel6</name>
  <uuid>23b78cf9-f0a0-4929-adc1-10e285f938fb</uuid>
  <title>Centos6</title>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
<type arch='x86_64' machine='pc-i440fx-1.6'>hvm</type>
<boot dev='hd'/>
  </os>
  <features>
<acpi/>
<apic/>
<pae/>
  </features>
  <cpu mode='custom' match='exact'>
<model fallback='allow'>SandyBridge</model>
<vendor>Intel</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='dtes64'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='erms'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='smep'/>
<feature policy='require' name='pcid'/>
<feature policy='require' name='est'/>
<feature policy='require' name='monitor'/>
<feature policy='require' name='smx'/>
<feature policy='require' name='tm'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='osxsave'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='pdcm'/>
<feature policy='require' name='fsgsbase'/>
<feature policy='require' name='f16c'/>
<feature policy='require' name='ds'/>
<feature policy='require' name='tm2'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='pbe'/>
<feature policy='require' name='ds_cpl'/>
<feature policy='require' name='rdrand'/>
  </cpu>
  <clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
  <driver name='qemu' type='raw'/>
  <source file='/home/cpn/VirtualBox VMs/Centos6/Centos6.raw'/>
  <target dev='vda' bus='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
  <master startport='0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
  <master startport='2'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
  <master startport='4'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='virtio-serial' index='0'>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='network'>
  <mac address='52:54:00:a7:f0:d7'/>
  <source network='default'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<interface type='direct'>
  <mac address='52:54:00:c1:c5:1d'/>
  <source dev='wlp0s29u1u6' mode='passthrough'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</interface>
<serial type='pty'>
  <target port='0'/>
</serial>
<console type='pty'>
  <target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
  <target type='virtio' name='com.redhat.spice.0'/>
  <address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='spice' autoport='yes'/>
<sound model='ich6'>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
  <model type='qxl' ram='65536' vram='65536' heads='1'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</memballoon>
  </devices>
</domain>
2
  • Can you add the output of virsh dumpxml the-vm? Jan 19, 2014 at 20:48
  • @Stephane Done.
    – Clodoaldo
    Jan 19, 2014 at 22:37

1 Answer 1

1

Same problem here, only with a USB ethernet adapter. Although I have no solution yet, I can successfully start the guest with networking, by using the following workaround:

ip link set dev enp0s26u1u4u3 down
#start guest in virt-manager
ip link set dev enp0s26u1u4u3 up

This is the only valid workaround I have found so far. Taking the interface down and up again does not allow to start the guest afterwards. If I do not set the interface up after starting the VM, the guest has no network connection.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .