if not target disk is given, it makes no sense to check that it is valid. Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- PVE/CLI/qm.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm index 030bbb3a..4214a7ca 100755 --- a/PVE/CLI/qm.pm +++ b/PVE/CLI/qm.pm @@ -599,7 +599,7 @@ __PACKAGE__->register_method ({ my $target_disk = extract_param($param, 'target-disk'); # do_import does not allow invalid drive names (e.g. unused0) - $target_disk = undef if !is_valid_drivename($target_disk); + $target_disk = undef if $target_disk && !is_valid_drivename($target_disk); my $vm_conf = PVE::QemuConfig->load_config($vmid); PVE::QemuConfig->check_lock($vm_conf); -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel