From 3dba8ddd98be4a208ddffd5e94b6a39f725edb35 Mon Sep 17 00:00:00 2001 From: Shunsuke Kimura Date: Fri, 2 May 2025 04:12:14 +0900 Subject: [PATCH] runtime: remove wrong qemu-system-x86_64 option qemu-system-x86_64 does not support "-machine virt". (this is only supported by arm,aarch64) Fixes: #11229 Signed-off-by: Shunsuke Kimura --- src/runtime/virtcontainers/qemu_amd64.go | 7 +------ src/runtime/virtcontainers/qemu_arch_base.go | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/runtime/virtcontainers/qemu_amd64.go b/src/runtime/virtcontainers/qemu_amd64.go index b0c5aa7950..78e7a5fc9f 100644 --- a/src/runtime/virtcontainers/qemu_amd64.go +++ b/src/runtime/virtcontainers/qemu_amd64.go @@ -72,10 +72,6 @@ var supportedQemuMachines = []govmmQemu.Machine{ Type: QemuQ35, Options: defaultQemuMachineOptions, }, - { - Type: QemuVirt, - Options: defaultQemuMachineOptions, - }, { Type: QemuMicrovm, Options: defaultQemuMachineOptions, @@ -169,8 +165,7 @@ func newQemuArch(config HypervisorConfig) (qemuArch, error) { func (q *qemuAmd64) capabilities(hConfig HypervisorConfig) types.Capabilities { var caps types.Capabilities - if q.qemuMachine.Type == QemuQ35 || - q.qemuMachine.Type == QemuVirt { + if q.qemuMachine.Type == QemuQ35 { caps.SetBlockDeviceHotplugSupport() caps.SetNetworkDeviceHotplugSupported() } diff --git a/src/runtime/virtcontainers/qemu_arch_base.go b/src/runtime/virtcontainers/qemu_arch_base.go index 0bdf9092d4..aa41445916 100644 --- a/src/runtime/virtcontainers/qemu_arch_base.go +++ b/src/runtime/virtcontainers/qemu_arch_base.go @@ -221,7 +221,7 @@ const ( // QemuMicrovm is the QEMU microvm machine type for amd64 QemuMicrovm = "microvm" - // QemuVirt is the QEMU virt machine type for aarch64 or amd64 + // QemuVirt is the QEMU virt machine type for aarch64 or arm QemuVirt = "virt" // QemuPseries is a QEMU virt machine type for ppc64le