Migrate VM with a private network to another host.
-
I have what is currently a two machine setup. One machine has all the VM's on it currently and I have recently added another host to the pool. I now want to move the VM's to this host so that I can restart the first host to patch it.
Now, the host seems to have all of the private networks on it (no pif involved with these netorks) when I look at it in XE however, when I try and move a machine (in this case a simple one with only one private network on it) I get an error.
vm.migrate { "vm": "7884cb7b-da2f-2614-e3d6-13e81509154b", "targetHost": "0eb70464-d6c1-452a-947a-97d79f5678f8" } { "code": "VM_REQUIRES_NETWORK", "params": [ "OpaqueRef:41f9b169-4fe4-4754-b6c6-cf36ad7e25c0", "OpaqueRef:f0f2b013-9eb9-4f20-ad10-58edcbf2a5cc" ], "task": { "uuid": "289a29cf-43eb-3123-d91e-74c809e247aa", "name_label": "Async.VM.migrate_send", "name_description": "", "allowed_operations": [], "current_operations": {}, "created": "20190613T11:09:26Z", "finished": "20190613T11:09:26Z", "status": "failure", "resident_on": "OpaqueRef:a80d8f14-f277-4a04-94df-166b7775824f", "progress": 1, "type": "<none/>", "result": "", "error_info": [ "VM_REQUIRES_NETWORK", "OpaqueRef:41f9b169-4fe4-4754-b6c6-cf36ad7e25c0", "OpaqueRef:f0f2b013-9eb9-4f20-ad10-58edcbf2a5cc" ], "other_config": {}, "subtask_of": "OpaqueRef:NULL", "subtasks": [], "backtrace": "(((process\"xapi @ xcp-oldyella\")(filename lib/debug.ml)(line 240))((process\"xapi @ xcp-oldyella\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process\"xapi @ xcp-oldyella\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process\"xapi @ xcp-oldyella\")(filename ocaml/xapi/message_forwarding.ml)(line 1715))((process\"xapi @ xcp-oldyella\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process\"xapi @ xcp-oldyella\")(filename ocaml/xapi/rbac.ml)(line 236))((process\"xapi @ xcp-oldyella\")(filename ocaml/xapi/server_helpers.ml)(line 83)))" }, "message": "VM_REQUIRES_NETWORK(OpaqueRef:41f9b169-4fe4-4754-b6c6-cf36ad7e25c0, OpaqueRef:f0f2b013-9eb9-4f20-ad10-58edcbf2a5cc)", "name": "XapiError", "stack": "XapiError: VM_REQUIRES_NETWORK(OpaqueRef:41f9b169-4fe4-4754-b6c6-cf36ad7e25c0, OpaqueRef:f0f2b013-9eb9-4f20-ad10-58edcbf2a5cc) at Function.wrap (/root/xen-orchestra/packages/xen-api/src/_XapiError.js:16:11) at _default (/root/xen-orchestra/packages/xen-api/src/_getTaskResult.js:11:28) at Xapi._addRecordToCache (/root/xen-orchestra/packages/xen-api/src/index.js:795:37) at events.forEach.event (/root/xen-orchestra/packages/xen-api/src/index.js:816:13) at Array.forEach (<anonymous>) at Xapi._processEvents (/root/xen-orchestra/packages/xen-api/src/index.js:806:11) at /root/xen-orchestra/packages/xen-api/src/index.js:960:13 at Generator.next (<anonymous>) at asyncGeneratorStep (/root/xen-orchestra/packages/xen-api/dist/index.js:58:103) at _next (/root/xen-orchestra/packages/xen-api/dist/index.js:60:194) at tryCatcher (/root/xen-orchestra/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/root/xen-orchestra/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/root/xen-orchestra/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/root/xen-orchestra/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/root/xen-orchestra/node_modules/bluebird/js/release/promise.js:694:18) at _drainQueueStep (/root/xen-orchestra/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/root/xen-orchestra/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/root/xen-orchestra/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/root/xen-orchestra/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5)" } I'm guessing this is because the private networks are not infact pool wide (had a similar problem with VMWare) but I'm not sure how I add this network to the new host. Any clues? Ta Peter.
-
You can't have a shared private network by default (in other words: private network are "per host" only).
Good news: we'll have this feature implemented via a Xen Orchestra plugin (in beta) at the end of the month!
This will rely on Open vSwtich and GRE tunnels.
-
Until then: remove the VIF, migrate and recreate it when the VM is on the other host
-
@olivierlambert Thanks Oliver,
Problem is, can't migrate a machine that is off, and can't run without the network.. hmmm.. Guess I can clone and delete, but that's a bit ugly.
On VMWare you can atleast install the network on multiple hosts even though its only seeing machines on that host..
I eagerly await the fix in the mean time.
P.
-
It's more than a fix, it's a new feature, requiring to talk to Open vSwitch to create a star topology with GRE tunnels. Months of developments. Not just a fix
-
Does sound interesting. Were supposed to be going live any day now.. so our timing is off by the looks.
Seems I managed to mangle one of the test vm's trying to move hosts (deleted the network, tried to migrate it, re-create the network and now I can't even stop the machine).
The other ones in the set I just stopped and re-started and they popped across to the other host with the network intact by the looks.
Thing is, how do I force it to start on the second host? Seems to have done it by magic (guess because it had more resources) but I can't seem to find any way to say "start here".
What's going to be involved in upgrading to the new version? Is that going to be an easy process
P.
-
Advanced tab of the VM view, "Start onβ¦" button.
Cross server private network will be a Xen Orchestra plugin for our next release.