mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-04-29 03:11:39 +00:00

To be used in the context of template backup, where a minimized temporary configuration is created to start the VM in 'prelaunch' mode. Issue a warning, so that code paths where this happens will be noted and can be evaluated and adapted. Since the code currently doesn't use blessed config objects, special dispatching is needed to potentially defer to the new child class in the write_config() method. Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
26 lines
354 B
Perl
26 lines
354 B
Perl
package PVE::QemuConfig::NoWrite;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use PVE::RESTEnvironment qw(log_warn);
|
|
|
|
use base qw(PVE::QemuConfig);
|
|
|
|
sub new {
|
|
my ($class, $conf) = @_;
|
|
|
|
bless($conf, $class);
|
|
|
|
return $conf;
|
|
}
|
|
|
|
sub write_config {
|
|
my ($class, $vmid, $conf) = @_;
|
|
|
|
log_warn("refusing to write temporary configuration");
|
|
return;
|
|
}
|
|
|
|
1;
|