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-id
But 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