diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 13263688..f7ae89db 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1936,6 +1936,18 @@ __PACKAGE__->register_method({ my $storecfg = PVE::Storage::config(); + if ($storage) { + # check if storage is enabled on local node + PVE::Storage::storage_check_enabled($storecfg, $storage); + if ($target) { + # check if storage is available on target node + PVE::Storage::storage_check_node($storecfg, $storage, $target); + # clone only works if target storage is shared + my $scfg = PVE::Storage::storage_config($storecfg, $storage); + die "can't clone to non-shared storage '$storage'\n" if !$scfg->{shared}; + } + } + PVE::Cluster::check_cfs_quorum(); my $running = PVE::QemuServer::check_running($vmid) || 0; diff --git a/changelog.Debian b/changelog.Debian index 17ce837c..ed8c2e91 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,6 +1,8 @@ qemu-server (3.0-10) unstable; urgency=low * fix bug #381: use PVE::Tools::next_migrate_port() + + * clone: check is we can clone to target storage -- Proxmox Support Team Mon, 13 May 2013 07:31:47 +0200