[pve-devel] [PATCH v2 manager] fix #2364: allow offline migration with local cloudinit disk
Mira Limbeck
m.limbeck at proxmox.com
Mon Oct 7 12:07:47 CEST 2019
As the cloudinit disk itself does not get copied on an offline
migration, just the config, there's no conflict. Ignore the local
cloudinit disk on offline migration. Also adds a useful message when
trying to live migrate with a local cloudinit disk.
Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
v2:
- do the check in pve-manager instead of qemu-server, necessary for
handling the case of live migration
www/manager6/window/Migrate.js | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 02ef6bfd..67c564e0 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -223,11 +223,23 @@ Ext.define('PVE.window.Migrate', {
migrateStats.local_disks.forEach(function (disk) {
if (disk.cdrom && disk.cdrom === 1) {
- migration.possible = false;
- migration.preconditions.push({
- text: "Can't migrate VM with local CD/DVD",
- severity: 'error'
- });
+ if (disk.volid.includes('vm-'+vm.get('vmid')+'-cloudinit')) {
+ if (migrateStats.running) {
+ migration.possible = false;
+ migration.preconditions.push({
+ text: "Can't live migrate VM with local cloudinit disk, use shared storage instead",
+ severity: 'error'
+ });
+ } else {
+ return;
+ }
+ } else {
+ migration.possible = false;
+ migration.preconditions.push({
+ text: "Can't migrate VM with local CD/DVD",
+ severity: 'error'
+ });
+ }
} else if (!disk.referenced_in_config) {
migration.possible = false;
--
2.20.1
More information about the pve-devel
mailing list