Group: Member
Post Group: Newbie
Posts: 5
Status:
|
I would like to see an option to attach connected usb devices to guest vms for KVM OpenVZ and XEN
I was able to get connected USB KVM's working very easily with a temp solution but would like to see a permanent way to add them from the GUI.
In the example below I was able to add a connected USB WiFI adapter to the guest VM.
Step one:
Identify the connected USB device from cli.
# lsusb
Bus 001 Device 002: ID 0bda:8171 Realtek Semiconductor Corp. RTL8188SU 802.11n WLAN Adapter
Step two:
Create xml config to apply to running VM.
Contents of wifi.xml
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x0bda'/>
<product id='0x8171'/>
</source>
</hostdev>
Step three:
Apply the wifi.xml config to the running VM.
# virsh attach-device v1002 /saved/path/to/wifi.xml
Step four:
Go to VM and verify its connected. For my case I tried with Linux and Windows and both showed the connected wireless adapter and both functioned.
To remove "detach" adapter:
# virsh detach-device v1002 /saved/path/to/wifi.xml
If you guys could add this feature it would be sweet. I see this being useful for SysAdmins that need to backup and move data via external USB device to ship to another datacenter.
Thanks for the read.
Casey
|