qemu-server/PVE/QemuConfig/NoWrite.pm
Fabian Grünbichler 92d2ffdd9b config: make attempts at writing out NoWrite configs fatal
attempting to write such a config is already a bug, and execution should not
continue in this case. very often a write of the config will be followed by
reloading it, expecting changes to be persisted and possibly missing
re-checking of the original reason for marking the config as NoWrite.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2025-02-18 15:06:04 +01:00

23 lines
328 B
Perl

package PVE::QemuConfig::NoWrite;
use strict;
use warnings;
use PVE::RESTEnvironment qw(log_warn);
use base qw(PVE::QemuConfig);
sub mark_config {
my ($class, $conf) = @_;
bless($conf, $class);
}
sub write_config {
my ($class, $vmid, $conf) = @_;
die("refusing to write temporary configuration\n");
}
1;