mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-08 21:18:03 +03:00
fix #2862: allow sata/ide template backups
for IDE and SATA, setting the whole drive into readonly mode is not possible. skip the readonly flag for such drives as a workaround until we find a better solution. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
30664f14ff
commit
3dc33a728a
@ -3647,7 +3647,13 @@ sub config_to_command {
|
||||
}
|
||||
|
||||
my $drive_cmd = print_drive_commandline_full($storecfg, $vmid, $drive, $pbs_name);
|
||||
$drive_cmd .= ',readonly' if PVE::QemuConfig->is_template($conf);
|
||||
|
||||
# extra protection for templates, but SATA and IDE don't support it..
|
||||
my $read_only = PVE::QemuConfig->is_template($conf)
|
||||
&& $drive->{interface} ne 'sata'
|
||||
&& $drive->{interface} ne 'ide';
|
||||
|
||||
$drive_cmd .= ',readonly' if $read_only;
|
||||
|
||||
push @$devices, '-drive',$drive_cmd;
|
||||
push @$devices, '-device', print_drivedevice_full(
|
||||
|
Loading…
Reference in New Issue
Block a user