XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    xo-cli vm.migrate mapVifsNetworks object syntax

    Scheduled Pinned Locked Moved Xen Orchestra
    3 Posts 2 Posters 480 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • michaukoM Offline
      michauko
      last edited by

      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

      michaukoM 1 Reply Last reply Reply Quote 0
      • michaukoM Offline
        michauko @michauko
        last edited by michauko

        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

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          @julien-f I think someone should update the doc with a real example 🙂

          1 Reply Last reply Reply Quote 0

          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
          • First post
            Last post