xo-cli vm.migrate mapVifsNetworks object syntax
-
Hey there,
I can't figure out the mapVifsNetworks's object syntax.
Could you provide me with an example of the full xo-cli vm.migrate cmd?
I'd like either to simulate the GUI's "smart mapping" functionnality (working fine from GUI) or to be able to map VIFs one by one.So far I can issue commands like :
xo-cli vm.migrate vm=some-vm-id targetHost=some-host-idBut the mapped VIFs are wrong in the end (no "smart mapping" here?) and I can't figure out what exactly write in
mapVifsNetworks='json:[{my VIFs ids or something, in the same order}]'Which key:value pairs?
My ultimate goal here is to be able to schedule some VM migrations at night.
Thanks
-
OK, based on some tasks logs, I found it (I even wonder how I missed it).
Full syntax example with 2 network cards :sudo xo-cli vm.migrate vm=a4f02d5f-bla-bla-bla targetHost=7f584677-bla-bla-bla mapVifsNetworks='json:{"467e20fb-bla-bla-bla ":"63bc1319-bla-bla-bla ", "2f0c6159-bla-bla-bla ":"fd5b497e-bla-bla-bla "}'Each key/value in the json string being VM's VIF ID => pool's VIF ID
If this can help someone
-
@julien-f I think someone should update the doc with a real example

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login