Moving a VM to a new host in Xen Orchestra
-
What are the requirements to migrate a VM in Xen Orchestra? At the moment I'm getting the following immediately as I try to initiate the move.
"The action failed for an unknown reason."
All on same 6.5 SP1 version, hosts both have same SR linked which is used for ISOs, CPUs are even in the same 5500 series.
I've been able to copy the VM to the new host and managing that way so far.
-
I ran into this last week. Chances are you have more than one snapshot, which will yield this result.
-
No snapshots yet for this VM or any of the others I've tried. It's a very new install and just testing out all the functionality to get used to what we may need to do in certain situations prior to needing to do them.
-
How are you running XO (ie: crontab or systemctl)? You need to check the output from xo-server to get more details on why the migration is failing.
-
@Danp ah, so a requirement seems to be that is must be running.
Feb 29 17:56:28 servervm-001-xo xo-server[553]: Mon, 29 Feb 2016 17:56:28 GMT xo:api [email protected] | vm.migrate(...) [8ms] =!> Error: cannot migrate a non-running VM
But then I get...
Feb 29 18:00:34 servervm-001-xo xo-server[553]: Mon, 29 Feb 2016 18:00:34 GMT xo:api [email protected] | vm.migrate(...) [12ms] =!> TypeError: Cannot read property '$ref' of null
-
Yeah... that's a current XS limitation that the VM must be running in order to migrate it.
-
Haven't seen the 2nd error before. Are you running the latest version of XO?
-
Perhaps this thread will help.
-
@Danp recent enough I would hope, not on 4.14 yet.
xo-web 4.13.0
-
@Danp said:
Perhaps this thread will help.
could be the culprit. now trying to find out how to set/change the default SR
-
@Danp yup, that was it. now onto troubleshooting the next set of errors. First one was quite obvious, destination host didn't have enough RAM. The other two though I'm not finding a table of what those feature codes translate to.
vm.migrate(...) [601ms] =!> XapiError: HOST_NOT_ENOUGH...36296192) vm.migrate(...) [738ms] =!> XapiError: VM_LACKS_FEATUR...cdfd0954) vm.migrate(...) [639ms] =!> XapiError: VM_LACKS_FEATURE_SU...1cdfd0954)
Am I missing some vital info, it seem to be truncating some details there when I run the following to get those results
sudo systemctl status xo-server.service
-
To eliminate the truncation, add the line
verboseApiLogsOnErrors: true
to the file.xo-server.yaml
, like this:sudo sed -i "$ a verboseApiLogsOnErrors: true" /opt/xo-server/.xo-server.yaml
Then restart xo-server.
-
From the API docs:
-
This means your VM doesn't have tools installed or your guest doesn't support "soft" calls to suspend/shutdown it (but hard reboot/shutdown always work, that's like pulling the power cord).
-
thanks for the tips. i didn't have vm tools installed on some hosts but didn't have a chance to check again today so perhaps tomorrow success after ensuring tools are installed on all hosts. they are all on HP Proliants and just Ubuntu/Win hosts so nothing unusual that I'd expect to not support this I hope.