diff --git a/virtcontainers/qemu.go b/virtcontainers/qemu.go index 920ed9268b..fcaf70a838 100644 --- a/virtcontainers/qemu.go +++ b/virtcontainers/qemu.go @@ -1194,7 +1194,8 @@ func (q *qemu) disconnect() { // genericAppendBridges appends to devices the given bridges func genericAppendBridges(devices []govmmQemu.Device, bridges []Bridge, machineType string) []govmmQemu.Device { bus := defaultPCBridgeBus - if machineType == QemuQ35 { + switch machineType { + case QemuQ35, QemuVirt: bus = defaultBridgeBus } @@ -1227,13 +1228,14 @@ func genericBridges(number uint32, machineType string) []Bridge { var bt bridgeType switch machineType { - case QemuQ35: // currently only pci bridges are supported // qemu-2.10 will introduce pcie bridges fallthrough case QemuPC: bt = pciBridge + case QemuVirt: + bt = pcieBridge case QemuPseries: bt = pciBridge default: diff --git a/virtcontainers/qemu_amd64.go b/virtcontainers/qemu_amd64.go index 12089516d8..5eb002ff26 100644 --- a/virtcontainers/qemu_amd64.go +++ b/virtcontainers/qemu_amd64.go @@ -102,7 +102,9 @@ func newQemuArch(config HypervisorConfig) qemuArch { func (q *qemuAmd64) capabilities() capabilities { var caps capabilities - if q.machineType == QemuPC || q.machineType == QemuQ35 { + if q.machineType == QemuPC || + q.machineType == QemuQ35 || + q.machineType == QemuVirt { caps.setBlockDeviceHotplugSupport() }