From a862835be2be8b835e9fd0ff87c4ff4c95beea93 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Mon, 26 Apr 2021 15:04:16 +0200 Subject: [PATCH] file-restore: use less memory for VM and reboot on panic With the vsock-pkt-buffer fix in proxmox-backup-restore-image, we can use way less memory for the VM without risking any crashes. 128 MiB seems to be the lowest it will go and still be fully reliable. While at it, add the "panic=1" argument to the kernel command line, so in case the kernel *does* run out of memory, it will at least restart automatically. Signed-off-by: Stefan Reiter --- src/bin/proxmox_file_restore/qemu_helper.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/proxmox_file_restore/qemu_helper.rs b/src/bin/proxmox_file_restore/qemu_helper.rs index 0f3a7feb..46fa011b 100644 --- a/src/bin/proxmox_file_restore/qemu_helper.rs +++ b/src/bin/proxmox_file_restore/qemu_helper.rs @@ -168,13 +168,13 @@ pub async fn start_vm( "none", "-enable-kvm", "-m", - "512", + "128", "-kernel", buildcfg::PROXMOX_BACKUP_KERNEL_FN, "-initrd", &ramfs_path, "-append", - "quiet", + "quiet panic=1", "-daemonize", "-pidfile", &format!("/dev/fd/{}", pid_fd.as_raw_fd()),