5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-06 13:17:56 +03:00

clone: check is we can clone to target storage

This commit is contained in:
Dietmar Maurer 2013-05-13 11:16:21 +02:00
parent 3cf5445809
commit 4a5a259072
2 changed files with 14 additions and 0 deletions

View File

@ -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;

View File

@ -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 <support@proxmox.com> Mon, 13 May 2013 07:31:47 +0200