diff --git a/docs/how-to/what-is-vm-templating-and-how-do-I-use-it.md b/docs/how-to/what-is-vm-templating-and-how-do-I-use-it.md index b031d09e8c..ba5d8ed333 100644 --- a/docs/how-to/what-is-vm-templating-and-how-do-I-use-it.md +++ b/docs/how-to/what-is-vm-templating-and-how-do-I-use-it.md @@ -47,7 +47,7 @@ and can be classified as potentially misunderstood behaviors rather than vulnera VM templating can be enabled by changing your Kata Containers config file (`/usr/share/defaults/kata-containers/configuration.toml`, overridden by `/etc/kata-containers/configuration.toml` if provided) such that: - - `qemu-lite` is specified in `hypervisor.qemu`->`path` section + - `qemu` version `v4.1.0` or above is specified in `hypervisor.qemu`->`path` section - `enable_template = true` - `initrd =` is set - `image =` option is commented out or removed diff --git a/src/runtime/cli/main_test.go b/src/runtime/cli/main_test.go index 5baa3c87af..b6a6f634b4 100644 --- a/src/runtime/cli/main_test.go +++ b/src/runtime/cli/main_test.go @@ -210,7 +210,7 @@ func newTestHypervisorConfig(dir string, create bool) (vc.HypervisorConfig, erro KernelPath: kernelPath, ImagePath: imagePath, HypervisorPath: hypervisorPath, - HypervisorMachineType: "pc-lite", + HypervisorMachineType: "q35", }, nil } diff --git a/src/runtime/containerd-shim-v2/utils_test.go b/src/runtime/containerd-shim-v2/utils_test.go index 96faeaf719..05c8bdc9ee 100644 --- a/src/runtime/containerd-shim-v2/utils_test.go +++ b/src/runtime/containerd-shim-v2/utils_test.go @@ -192,7 +192,7 @@ func newTestHypervisorConfig(dir string, create bool) (vc.HypervisorConfig, erro KernelPath: kernelPath, ImagePath: imagePath, HypervisorPath: hypervisorPath, - HypervisorMachineType: "pc-lite", + HypervisorMachineType: "q35", }, nil } diff --git a/src/runtime/pkg/katautils/config-settings.go.in b/src/runtime/pkg/katautils/config-settings.go.in index 6231ddd393..d03f5406ac 100644 --- a/src/runtime/pkg/katautils/config-settings.go.in +++ b/src/runtime/pkg/katautils/config-settings.go.in @@ -8,7 +8,7 @@ package katautils -var defaultHypervisorPath = "/usr/bin/qemu-lite-system-x86_64" +var defaultHypervisorPath = "/usr/bin/qemu-system-x86_64" var defaultHypervisorCtlPath = "/usr/bin/acrnctl" var defaultJailerPath = "/usr/bin/jailer" var defaultImagePath = "/usr/share/kata-containers/kata-containers.img" diff --git a/src/runtime/pkg/katautils/create_test.go b/src/runtime/pkg/katautils/create_test.go index 7f033082f6..fa6b434d09 100644 --- a/src/runtime/pkg/katautils/create_test.go +++ b/src/runtime/pkg/katautils/create_test.go @@ -138,7 +138,7 @@ func newTestHypervisorConfig(dir string, create bool) (vc.HypervisorConfig, erro KernelPath: kernelPath, ImagePath: imagePath, HypervisorPath: hypervisorPath, - HypervisorMachineType: "pc-lite", + HypervisorMachineType: "q35", }, nil } diff --git a/src/runtime/virtcontainers/qemu_amd64.go b/src/runtime/virtcontainers/qemu_amd64.go index 1129d4d340..eab95ff571 100644 --- a/src/runtime/virtcontainers/qemu_amd64.go +++ b/src/runtime/virtcontainers/qemu_amd64.go @@ -43,7 +43,6 @@ const ( ) var qemuPaths = map[string]string{ - QemuPCLite: "/usr/bin/qemu-lite-system-x86_64", QemuQ35: defaultQemuPath, QemuMicrovm: defaultQemuPath, } @@ -66,10 +65,6 @@ var kernelParams = []Param{ } var supportedQemuMachines = []govmmQemu.Machine{ - { - Type: QemuPCLite, - Options: defaultQemuMachineOptions, - }, { Type: QemuQ35, Options: defaultQemuMachineOptions, diff --git a/src/runtime/virtcontainers/qemu_arch_base.go b/src/runtime/virtcontainers/qemu_arch_base.go index 50a82bf5a3..98fdfb7661 100644 --- a/src/runtime/virtcontainers/qemu_arch_base.go +++ b/src/runtime/virtcontainers/qemu_arch_base.go @@ -209,9 +209,6 @@ const ( const bridgePCIStartAddr = 2 const ( - // QemuPCLite is the QEMU pc-lite machine type for amd64 - QemuPCLite = "pc-lite" - // QemuQ35 is the QEMU Q35 machine type for amd64 QemuQ35 = "q35" diff --git a/src/runtime/virtcontainers/qemu_arch_base_test.go b/src/runtime/virtcontainers/qemu_arch_base_test.go index c1ea7d0b8d..1cd904864b 100644 --- a/src/runtime/virtcontainers/qemu_arch_base_test.go +++ b/src/runtime/virtcontainers/qemu_arch_base_test.go @@ -158,7 +158,7 @@ func TestQemuAddDeviceToBridge(t *testing.T) { // addDeviceToBridge fails cause q.Bridges == 0 q = newQemuArchBase() - q.qemuMachine.Type = QemuPCLite + q.qemuMachine.Type = QemuQ35 q.bridges(0) _, _, err = q.addDeviceToBridge(context.Background(), "qemu-bridge", types.PCI) if assert.Error(err) {