Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 032128d

Browse files
committed
virt-install: Add convenience option '--controller usb2'
This sets up a USB2 controller with fallback USB1 support.
1 parent 03804ee commit 032128d

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

man/en/virt-install.pod.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,9 @@ Force disable ACPI for the guest.
846846
Attach a controller device to the guest. TYPE is one of:
847847
B<ide>, B<fdc>, B<scsi>, B<sata>, B<virtio-serial>, or B<usb>.
848848

849+
Controller also supports the special value B<usb2>, which will set up
850+
a USB2 controller with fallback USB1 support.
851+
849852
=over 4
850853

851854
=item B<model>

tests/clitest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,7 @@ def default_args(app, cli, testtype):
676676
"--controller usb,model=ich9-ehci1,address=0:0:4.7",
677677
"--controller usb,model=ich9-ehci1,address=0:0:4.7,index=0",
678678
"--controller usb,model=ich9-ehci1,address=0:0:4.7,index=1,master=0",
679+
"--controller usb2",
679680
],
680681

681682
"invalid": [

virtinst/cli.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,6 +1749,10 @@ def parse_controller(guest, optstring, dev=None):
17491749
if optstring is None:
17501750
return None
17511751

1752+
if optstring == "usb2":
1753+
guest.add_usb_ich9_controllers()
1754+
return None
1755+
17521756
# Peel the mode off the front
17531757
opts = parse_optstr(optstring, remove_first="type")
17541758
ctrltype = get_opt_param(opts, "type")

0 commit comments

Comments
 (0)