On 27.05.21 14:23, Lorenz Stechauner wrote: > 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.stechau...@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}; > + } > + }
we'd already loop overall volumes in cfg2cmd, so why not check there (with a small helper method to avoid adding to much bloat there)? Also, are you aware that efidisk and VM state images are included by this check ensured that it's consistent regarding the handling of those special "files" elsewhere? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel