mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-29 17:58:36 +08:00
fix(host): usb kbd command line (#15056)
add machine usb command first Signed-off-by: wanyaoqi <d3lx.yq@gmail.com> Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
@@ -650,14 +650,20 @@ func GenerateStartOptions(
|
||||
}
|
||||
opts = append(opts, nicOpts...)
|
||||
|
||||
// isolated devices
|
||||
// USB 3.0
|
||||
opts = append(opts, generatePCIDeviceOption(input.GuestDesc.Usb.PCIDevice))
|
||||
// enable machine USB emulation
|
||||
opts = append(opts, drvOpt.USB())
|
||||
for _, device := range input.Devices {
|
||||
opts = append(opts, drvOpt.Device(device))
|
||||
if input.QemuArch == Arch_aarch64 {
|
||||
opts = append(opts, generatePCIDeviceOption(input.GuestDesc.Usb.PCIDevice))
|
||||
for _, device := range input.Devices {
|
||||
opts = append(opts, drvOpt.Device(device))
|
||||
}
|
||||
} else {
|
||||
opts = append(opts, drvOpt.USB())
|
||||
for _, device := range input.Devices {
|
||||
opts = append(opts, drvOpt.Device(device))
|
||||
}
|
||||
opts = append(opts, generatePCIDeviceOption(input.GuestDesc.Usb.PCIDevice))
|
||||
}
|
||||
|
||||
// isolated devices
|
||||
if len(input.GuestDesc.IsolatedDevices) > 0 {
|
||||
opts = append(opts, generateIsolatedDeviceOptions(input.GuestDesc)...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user