[pve-devel] "pool" not sent upon VM Clone

Stephane Chazelas stephane.chazelas at gmail.com
Fri Jun 14 23:04:36 CEST 2013


Hiya,

With PVE 3 (pve-manager 3.0-20), when cloning a qemu VM, you
can specify a target resource pool for the clone.

However, that is ignored, the resulting VM ends up not
associated with a resource pool.

That becomes an issue when the user is restricted access to only
some pools (as the not so uncommon case where a group of users
is given PVEVMAdmin+PVEDatastoreUser Role on a resource pool),
because in that case, that means he can't clone VMs (permission
denied).

After investigation, it appears the "pool" specified in the
dialog is not sent upon the form submission. Here's a patch:

diff --git a/www/manager/qemu/Clone.js b/www/manager/qemu/Clone.js
index 58b1ee7..aba0372 100644
--- a/www/manager/qemu/Clone.js
+++ b/www/manager/qemu/Clone.js
@@ -22,6 +22,10 @@ Ext.define('PVE.window.Clone', {
 	    params.target = values.target;
 	}
 
+	if (values.pool) {
+	    params.pool = values.pool;
+	}
+
 	if (values.clonemode === 'copy') {
 	    params.full = 1;
 	    if (values.storage) {


I'll also take this opportunity to congratulate you guys. I've
only been using PVE for a few weeks, but I do love it. Every new
thing I find out about it is great! From the coding style to the
design and the open architecture. Great job! You can be proud of
it.

Best regards,
Stephane



More information about the pve-devel mailing list