[pve-devel] [PATCH qemu-server v11 7/12] disable snapshot (with RAM) and hibernate with virtio-fs devices
Markus Frank
m.frank at proxmox.com
Mon Jul 8 15:55:06 CEST 2024
Signed-off-by: Markus Frank <m.frank at proxmox.com>
---
PVE/API2/Qemu.pm | 6 ++++++
PVE/QemuServer.pm | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index f4982b0..854ad98 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -5246,6 +5246,12 @@ __PACKAGE__->register_method({
my $snapname = extract_param($param, 'snapname');
+ # TODO: move to check_non_migratable_resources when applied (SEV patch series)
+ my $vmconf = PVE::QemuConfig->load_config($vmid);
+ my $vmstate = extract_param($param, 'vmstate');
+ die "Cannot snapshot with including state while virtiofs is in use.\n"
+ if $vmstate && PVE::QemuServer::Virtiofs::virtiofs_enabled($vmconf);
+
die "unable to use snapshot name 'current' (reserved name)\n"
if $snapname eq 'current';
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 026fb66..d48d0a6 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -6393,6 +6393,10 @@ sub vm_suspend {
$conf = PVE::QemuConfig->load_config($vmid);
+ # TODO: move to check_non_migratable_resources when applied (SEV patch series)
+ die "Cannot hibernate while virtiofs is in use.\n"
+ if $includestate && PVE::QemuServer::Virtiofs::virtiofs_enabled($conf);
+
my $is_backing_up = PVE::QemuConfig->has_lock($conf, 'backup');
PVE::QemuConfig->check_lock($conf)
if !($skiplock || $is_backing_up);
--
2.39.2
More information about the pve-devel
mailing list