[pve-devel] [PATCH v3 qemu-server 1/1] vm_start: check if storages of volumes support content images
Lorenz Stechauner
l.stechauner at proxmox.com
Thu May 27 14:23:31 CEST 2021
it is now necessary for storages to support the 'images' content in
order to start vms on them. all native storage plugins already
report the images content correctly.
Signed-off-by: Lorenz Stechauner <l.stechauner at proxmox.com>
---
PVE/QemuServer.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0bfbca4..3b656a1 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5124,6 +5124,13 @@ sub vm_start_nolock {
my ($cmd, $vollist, $spice_port) = config_to_command($storecfg, $vmid,
$conf, $defaults, $forcemachine, $forcecpu, $params->{'pbs-backing'});
+ for my $vol (@$vollist) {
+ if (my ($storeid, $volname) = PVE::Storage::parse_volume_id($vol, 1)) {
+ my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
+ die "storage '$storeid' does not support vm disks\n" if !$scfg->{content}->{images};
+ }
+ }
+
my $migration_ip;
my $get_migration_ip = sub {
my ($nodename) = @_;
--
2.20.1
More information about the pve-devel
mailing list