djamps / migrate-vm

29 stars 16 forks source link

Can't migrate VM #6

Closed hertell closed 5 years ago

hertell commented 8 years ago

I get this error when running the migrate from Citrix Xenserver 6.0 (XenServer release 6.0.2-53456p) -> Citrix xenserver 6.2 (XenServer release 6.2.0-70446c):

migratevm 1.0.2 started Connecting to source host Connecting to destination host and Starting transfer Could not find VM '08241bb5-0bee-250a-5b40-3df0d43332c5' at /tmp/par-root/cache-1ef67fd02ac4e48d37c75f30223c07ddbb73f4d2/inc/lib/Xen/API.pm line 268. Any idea what's the reason for this?

hertell commented 8 years ago

I realized that the vm i tried to get was on the slave of a pool. The pool does not have any shared disk-resource. Now the error-message looks like this when i connect to the master:

migratevm 1.0.2 started Connecting to source host Connecting to destination host and Starting transfer Can't call method "Xen::API::task::get_record" on an undefined value at /tmp/par-root/cache-1ef67fd02ac4e48d37c75f30223c07ddbb73f4d2/inc/lib/Xen/API.pm line 400, line 5.

djamps commented 8 years ago

I vaguely recall this issue in the past with another user. I believe this is a limitation in XAPI and not the script. If I recall correctly, you cannot export or import VM's using local storage from a non-master node because slave nodes do not have a full XAPI stack running, and the master cannot 'see' local storage on the slaves. Try promoting the source/target host to master or remove it from the pool before continuing. Let me know how it goes.

hertell commented 8 years ago

If i got it right, it's impossible to remove a host from a pool without re-installing and reformatting everything, so it looks that this can't be tested. Is there any risks involced changing a server from being a slave to master, and master to slave? The pool is just two machines, so it might be an easy task (if i find some instructions on how to do it :-)