[pve-devel] applied: [PATCH qemu-server] restore: parse volid with $noerr

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Apr 2 15:16:09 CEST 2020


otherwise VMA files passed in as paths instead of as volids don't
work anymore.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
I hope this is the last one ;)

 PVE/API2/Qemu.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 396879a..6f31fa8 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -404,7 +404,7 @@ __PACKAGE__->register_method({
 my $parse_restore_archive = sub {
     my ($storecfg, $archive) = @_;
 
-    my ($archive_storeid, $archive_volname) = PVE::Storage::parse_volume_id($archive);
+    my ($archive_storeid, $archive_volname) = PVE::Storage::parse_volume_id($archive, 1);
 
     if (defined($archive_storeid)) {
 	my $scfg =  PVE::Storage::storage_config($storecfg, $archive_storeid);
-- 
2.20.1





More information about the pve-devel mailing list