The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6603
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Starts VMs with `-no-user-config` and `-chroot` flags.
From 226e17eb60736c6b7f217c13ad29f250fd56a50f Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Thu, 12 Dec 2019 10:48:17 +0000 Subject: [PATCH 1/2] lxd/instance/qemu/vm/qemu: Adds -no-user-config to qemu start flags This option makes QEMU not load any of the user-provided config files on sysconfdir. We want to avoid any existing user config files from affecting how our VMs start. Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/instance/qemu/vm_qemu.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lxd/instance/qemu/vm_qemu.go b/lxd/instance/qemu/vm_qemu.go index 9643c3247a..3dd7c28642 100644 --- a/lxd/instance/qemu/vm_qemu.go +++ b/lxd/instance/qemu/vm_qemu.go @@ -628,6 +628,7 @@ func (vm *Qemu) Start(stateful bool) error { "-serial", "chardev:console", "-nodefaults", "-no-reboot", + "-no-user-config", "-readconfig", confFile, "-pidfile", vm.pidFilePath(), } From cc269600eafe33d8d11d64d93467f2b26233fd43 Mon Sep 17 00:00:00 2001 From: Thomas Parrott <thomas.parr...@canonical.com> Date: Thu, 12 Dec 2019 10:55:15 +0000 Subject: [PATCH 2/2] lxd/instance/qemu/vm/qemu: Adds chroot flag to qemu start up command Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com> --- lxd/instance/qemu/vm_qemu.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lxd/instance/qemu/vm_qemu.go b/lxd/instance/qemu/vm_qemu.go index 3dd7c28642..f0c18f58ff 100644 --- a/lxd/instance/qemu/vm_qemu.go +++ b/lxd/instance/qemu/vm_qemu.go @@ -631,7 +631,9 @@ func (vm *Qemu) Start(stateful bool) error { "-no-user-config", "-readconfig", confFile, "-pidfile", vm.pidFilePath(), + "-chroot", vm.Path(), } + if shared.IsTrue(vm.expandedConfig["limits.memory.hugepages"]) { args = append(args, "-mem-path", "/dev/hugepages/", "-mem-prealloc") }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel