diff --git a/man/virt-install.pod b/man/virt-install.pod index 930623e97..406840b0f 100644 --- a/man/virt-install.pod +++ b/man/virt-install.pod @@ -865,8 +865,7 @@ guest, use '--virt-type qemu' Attach a controller device to the guest. TYPE is one of: B, B, B, B, B, or B. -Controller also supports the special value B, which will set up -a USB2 controller with fallback USB1 support. +Controller also supports the special values B and B. =over 4 diff --git a/tests/clitest.py b/tests/clitest.py index 0abd8d18f..e44ec4c5a 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -563,7 +563,7 @@ c = vinst.add_category("controller", "--noautoconsole --nodisks --pxe") c.add_valid("--controller usb,model=ich9-ehci1,address=0:0:4.7") c.add_valid("--controller usb,model=ich9-ehci1,address=0:0:4.7,index=0") c.add_valid("--controller usb,model=ich9-ehci1,address=0:0:4.7,index=1") -c.add_valid("--controller usb2") +c.add_valid("--controller usb2 --controller usb3") c = vinst.add_category("lxc", "--connect %(LXCURI)s --noautoconsole --name foolxc --ram 64") diff --git a/ui/details.ui b/ui/details.ui index 5d1917fa1..e2e4efcf6 100644 --- a/ui/details.ui +++ b/ui/details.ui @@ -1,5 +1,5 @@ - + @@ -5904,13 +5904,11 @@ 3 12 - + True False - 2 - 2 - 6 6 + 6 True @@ -5919,8 +5917,10 @@ Type: - GTK_FILL - GTK_FILL + 0 + 0 + 1 + 1 @@ -5932,22 +5932,9 @@ 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - False - Model: - - - 1 - 2 - GTK_FILL - GTK_FILL + 0 + 1 + 1 @@ -5964,11 +5951,22 @@ 1 - 2 1 - 2 - GTK_FILL - GTK_FILL + 1 + 1 + + + + + True + False + Model: + + + 0 + 1 + 1 + 1 diff --git a/virtManager/details.py b/virtManager/details.py index 11a14513a..63107f230 100644 --- a/virtManager/details.py +++ b/virtManager/details.py @@ -3221,22 +3221,25 @@ class vmmDetails(vmmGObjectUI): type_label = virtinst.VirtualController.pretty_type(dev.type) model_label = dev.model + is_usb = dev.type == virtinst.VirtualController.TYPE_USB if not model_label: model_label = _("Default") self.widget("controller-type").set_text(type_label) - combo = self.widget("controller-model") + uihelpers.set_grid_row_visible(combo, is_usb) + model = combo.get_model() model.clear() if dev.type == virtinst.VirtualController.TYPE_USB: - model.append(["Default", "Default"]) + model.append(["default", "Default"]) model.append(["ich9-ehci1", "USB 2"]) + model.append(["nec-xhci", "USB 3"]) self.widget("config-remove").set_sensitive(False) else: self.widget("config-remove").set_sensitive(True) - self.set_combo_entry("controller-model", model_label) + self.set_combo_entry("controller-model", dev.model or "default") def refresh_filesystem_page(self): dev = self.get_hw_selection(HW_LIST_COL_DEVICE) diff --git a/virtManager/domain.py b/virtManager/domain.py index 9a4b1f1dd..ae2efdd1f 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -826,6 +826,12 @@ class vmmDomain(vmmLibvirtObject): for dev in VirtualController.get_usb2_controllers( guest.conn): guest.add_device(dev) + else: + dev = VirtualController(guest.conn) + dev.type = "usb" + if newmodel != "default": + dev.model = newmodel + guest.add_device(dev) return self._redefine_device(change, devobj) diff --git a/virtinst/cli.py b/virtinst/cli.py index b6e7e57c9..578ea8317 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1553,6 +1553,10 @@ get_graphics = _make_handler(virtinst.VirtualGraphics, parse_graphics) def parse_controller(guest, optstr, dev): if optstr == "usb2": return virtinst.VirtualController.get_usb2_controllers(guest.conn) + elif optstr == "usb3": + dev.type = "usb" + dev.model = "nec-xhci" + return dev opts = parse_optstr(optstr, remove_first="type") set_param = _build_set_param(dev, opts)