[pve-devel] [PATCH] convert usb2 config from pve-usb.cfg to commandline
Alexandre Derumier
aderumier at odiso.com
Thu Feb 21 16:15:38 CET 2013
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/QemuServer.pm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 5e02734..599e279 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2194,7 +2194,11 @@ sub config_to_command {
push @$cmd, '-daemonize';
- push @$devices, '-readconfig', '/usr/share/qemu-server/pve-usb.cfg';
+ $pciaddr = print_pci_addr("ehci", $bridges);
+ push @$devices, '-device', "ich9-usb-ehci1,id=ehci,multifunction=on$pciaddr.0x7";
+ push @$devices, '-device', "ich9-usb-uhci1,id=uhci1,masterbus=ehci.0,firstport=0,multifunction=on$pciaddr.0x0";
+ push @$devices, '-device', "ich9-usb-uhci2,id=uchi2,masterbus=ehci.0,firstport=2,multifunction=on$pciaddr.0x1";
+ push @$devices, '-device', "ich9-usb-uhci3,id=uchi3,masterbus=ehci.0,firstport=4,multifunction=on$pciaddr.0x2";
# enable absolute mouse coordinates (needed by vnc)
my $tablet = defined($conf->{tablet}) ? $conf->{tablet} : $defaults->{tablet};
@@ -3370,6 +3374,7 @@ sub print_pci_addr {
net3 => { bus => 0, addr => 21 },
net4 => { bus => 0, addr => 22 },
net5 => { bus => 0, addr => 23 },
+ ehci => { bus => 0, addr => 29 },
#addr29 : usb-host (pve-usb.cfg)
'pci.1' => { bus => 0, addr => 30 },
'pci.2' => { bus => 0, addr => 31 },
--
1.7.10.4
More information about the pve-devel
mailing list