[pve-devel] [PATCH] check has_feature copy for full clone
Alexandre Derumier
aderumier at odiso.com
Thu May 2 06:09:27 CEST 2013
works with or without snapname.
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 93458b0..9baa16e 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1923,6 +1923,8 @@ __PACKAGE__->register_method({
my $sharedvm = &$check_storage_access_copy($rpcenv, $authuser, $storecfg, $oldconf, $storage);
+ die "Full copy feature is not available" if $param->{full} && !PVE::QemuServer::has_feature('copy', $oldconf, $storecfg, $snapname);
+
die "can't copy VM to node '$target' (VM uses local storage)\n" if $target && !$sharedvm;
my $conffile = PVE::QemuServer::config_file($newid);
--
1.7.10.4
More information about the pve-devel
mailing list