[pve-devel] [PATCH manager] ui: migrate: add storage and size information to preconditions

Tim Marx t.marx at proxmox.com
Fri Jun 28 15:13:46 CEST 2019


this patch depends on qemu commits:
6509ae59455c32476c683818fbf2492c60d8395e
72689d628812d75a2af44200b199b5a523760c2a

Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 www/manager6/window/Migrate.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 99d46012..ef329175 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -197,11 +197,12 @@ Ext.define('PVE.window.Migrate', {

 		    if (migrateStats.allowed_nodes) {
 			migration.allowedNodes = migrateStats.allowed_nodes;
-
-			if (!migrateStats.allowed_nodes.includes(me.lookup('pveNodeSelector').value)) {
+			var selected_target = me.lookup('pveNodeSelector').value;
+			if (selected_target.length && !migrateStats.allowed_nodes.includes(selected_target)) {
+			    var missing_storages = migrateStats.not_allowed_nodes[selected_target].not_available_storages.join(',');
 			    migration.possible = false;
 			    migration.preconditions.push({
-				text: 'Local storage not available on selected Node, start VM to use live storage migration or select other target node',
+				text: `Storages (${missing_storages}) not available on selected node, start VM to use live storage migration or select other target node`,
 				severity: 'error'
 			    });
 			}
@@ -234,7 +235,7 @@ Ext.define('PVE.window.Migrate', {
 			    } else {
 				migration['with-local-disks'] = 1;
 				migration.preconditions.push({
-				    text:'Migration with local disk might take long: '+ disk.volid,
+				    text:'Migration with local disk might take long: '+ disk.volid +', size='+PVE.Utils.render_size(disk.size),
 				    severity: 'warning'
 				});
 			    }
--
2.11.0




More information about the pve-devel mailing list