kvm passagem de modem usb

1

Estou tentando configurar uma passagem de modem USB no kvm virt-manager. O anfitrião é o Fedora 20. O convidado é o 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

O modem funciona conectando-se a partir do host. Como a rede em ponte não funciona com wireless eu instalei este segundo modem USB. O principal é o PCI.

Eu configurei o repasse na interface do virt-manager, mas quando tento iniciar o convidado, recebo esta mensagem de erro:

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

Eu acho que primeiro devo desanexar ou desmontar o dispositivo, mas como?

EDITAR

# 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>
    
por Clodoaldo 19.01.2014 / 20:37

1 resposta

1

O mesmo problema aqui, apenas com um adaptador Ethernet USB. Embora ainda não tenha solução, posso iniciar com êxito o convidado com a rede, usando a seguinte solução alternativa:

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

Esta é a única solução válida que encontrei até agora. Levar a interface para baixo e para cima novamente não permite iniciar o convidado depois. Se eu não configurar a interface depois de iniciar a VM, o convidado não terá conexão de rede.

    
por 10.02.2014 / 08:55