Revision 156681c1
b/lib/constants.py | ||
---|---|---|
831 | 831 |
HV_CPU_THREADS = "cpu_threads" |
832 | 832 |
HV_CPU_SOCKETS = "cpu_sockets" |
833 | 833 |
HV_SOUNDHW = "soundhw" |
834 |
HV_USB_DEVICES = "usb_devices" |
|
834 | 835 |
|
835 | 836 |
|
836 | 837 |
HVS_PARAMETER_TYPES = { |
... | ... | |
895 | 896 |
HV_CPU_THREADS: VTYPE_INT, |
896 | 897 |
HV_CPU_SOCKETS: VTYPE_INT, |
897 | 898 |
HV_SOUNDHW: VTYPE_STRING, |
899 |
HV_USB_DEVICES: VTYPE_STRING, |
|
898 | 900 |
} |
899 | 901 |
|
900 | 902 |
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys()) |
... | ... | |
1963 | 1965 |
HV_CPU_THREADS: 0, |
1964 | 1966 |
HV_CPU_SOCKETS: 0, |
1965 | 1967 |
HV_SOUNDHW: "", |
1968 |
HV_USB_DEVICES: "", |
|
1966 | 1969 |
}, |
1967 | 1970 |
HT_FAKE: {}, |
1968 | 1971 |
HT_CHROOT: { |
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
536 | 536 |
constants.HV_CPU_THREADS: hv_base.OPT_NONNEGATIVE_INT_CHECK, |
537 | 537 |
constants.HV_CPU_SOCKETS: hv_base.OPT_NONNEGATIVE_INT_CHECK, |
538 | 538 |
constants.HV_SOUNDHW: hv_base.NO_CHECK, |
539 |
constants.HV_USB_DEVICES: hv_base.NO_CHECK, |
|
539 | 540 |
} |
540 | 541 |
|
541 | 542 |
_MIGRATION_STATUS_RE = re.compile("Migration\s+status:\s+(\w+)", |
... | ... | |
1339 | 1340 |
if hvp[constants.HV_SOUNDHW]: |
1340 | 1341 |
kvm_cmd.extend(["-soundhw", hvp[constants.HV_SOUNDHW]]) |
1341 | 1342 |
|
1343 |
# Various types of usb devices, comma separated |
|
1344 |
if hvp[constants.HV_USB_DEVICES]: |
|
1345 |
for dev in hvp[constants.HV_USB_DEVICES].split(","): |
|
1346 |
kvm_cmd.extend(["-usbdevice", dev]) |
|
1347 |
|
|
1342 | 1348 |
# Save the current instance nics, but defer their expansion as parameters, |
1343 | 1349 |
# as we'll need to generate executable temp files for them. |
1344 | 1350 |
kvm_nics = instance.nics |
b/man/gnt-instance.rst | ||
---|---|---|
655 | 655 |
Comma separated list of emulated sounds cards, or "all" to enable |
656 | 656 |
all the available ones. |
657 | 657 |
|
658 |
usb\_devices |
|
659 |
Valid for the KVM hypervisor. |
|
660 |
|
|
661 |
Comma separated list of usb devices. These can be emulated devices |
|
662 |
or passthrough ones, and each one gets passed to kvm with its own |
|
663 |
``-usbdevice`` option. See the **qemu**\(1) manpage for the syntax |
|
664 |
of the possible components. |
|
665 |
|
|
658 | 666 |
|
659 | 667 |
The ``-O (--os-parameters)`` option allows customisation of the OS |
660 | 668 |
parameters. The actual parameter names and values depends on the OS |
Also available in: Unified diff