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

    info Xen Orchestra cli cmd

    Scheduled Pinned Locked Moved Xen Orchestra
    13 Posts 4 Posters 2.6k 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.
    • olivierlambertO Offline
      olivierlambert Vates 🪐 Co-Founder CEO
      last edited by

      Hello,

      I'm not sure to understand the use case. Are you actually using the replicated disk on destination? (at least I suppose a copy of it, because if you just boot or use the replicated disk directly, this will change the blocks and corrupt it on next sync).

      If this is your use case, it's probably not the right way to do so (rsync would be probably better in that case).

      To answer about xo-cli, all commands can be displayed via xo-cli --list-commands. See https://xen-orchestra.com/docs/architecture.html#xo-cli-cli for more details.

      1 Reply Last reply Reply Quote 0
      • GheppyG Offline
        Gheppy
        last edited by Gheppy

        I use continuous replication on a production VM.
        This is done over internet, it is slow.
        Local I have this copy of VM, but I want to make a copy of copy.
        And if continuous replication is enabled when I made a copy, I get a continuous replication brake chain if it starts when copying is in progress, as you said.
        On the xo-cli --list-commands I couldn't find a way to disable this continuous replication and when I finish to enable again.

        For now I disable the sync on web gui manually , start the copy and then enable again.
        And now wat I want is to automate this process because it happens periodically.
        And all I missing is the right command line to disable and enable this continuous replication task on XOCE

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

          So the use case is making a copy of the CR VM? (so you have a backup of the backup?)

          1 Reply Last reply Reply Quote 0
          • GheppyG Offline
            Gheppy
            last edited by

            Yes but in an automatic way not by hand

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

              Why not replicating twice to 2 different SR directly in the backup job?

              1 Reply Last reply Reply Quote 0
              • GheppyG Offline
                Gheppy
                last edited by Gheppy

                I don't think we're on the same page.

                The scenario is like this:
                The real VM is in another site and has two disks (system and database).
                I have a copy of it, with the help of CR, on my site.
                From the copy on my site I want to use only one disk (database).
                The idea I started from is to make a copy on the whole VM and then use only disk 2.
                Only for this copy I need 20 hours + and CR is done every 2 hours.
                All I want now is to disable CR job when I make the copy to not break the CR.
                And after I finish the copy to enable the CR job.

                For now, as I said, I'm taking the following steps:

                • I disable the CR job
                • start copying
                • enable the CR job
                  Everything manual and CR job does not break.

                All i want is to find a way through xo-cli to be able to temporarily disable this CR job.

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

                  What do you mean with:

                  From the copy on my site I want to use only one disk (database).

                  What do you mean by "use only one disk"? What "use"? Make another copy but just of this DB disk?

                  The term "use" is very unclear to me, what do you want to do with it?

                  1 Reply Last reply Reply Quote 0
                  • GheppyG Offline
                    Gheppy
                    last edited by Gheppy

                    I hope this is more clear.
                    I use ssh copy because is more faster that VM copy over XOCE.
                    Over ssh copy I get 200 Mbps and over XOCE I get max 65 Mbps.
                    All VM discks are VHD over EXT SR.

                    0c477c76-4512-42ce-9aa2-033e45876353-image.png

                    1 Reply Last reply Reply Quote 0
                    • GheppyG Offline
                      Gheppy
                      last edited by

                      So there is no way to send a deactivation or activation request to xo-cli?

                      fohdeeshaF 1 Reply Last reply Reply Quote 0
                      • fohdeeshaF Offline
                        fohdeesha Vates 🪐 Pro Support Team @Gheppy
                        last edited by

                        @Gheppy I'm not sure if xo-cli supports job interactions, @olivierlambert may have to inquire with the xo-cli dev @julien-f . For your niche use case, you could solve it in the meantime by running your XO instance from your house (or wherever this CR destination and DB test server are). Then, you can set the CR job to replicate to two remotes, your main CR destination, and then your test pool you've been manually copying to. Since these are now both local to XOA, it won't use up extra internet bandwidth, XOA will still only be pulling one stream from the production server out on the internet, then once it's inside your network on XO, it duplicates and writes to both local CR destinations

                        julien-fJ 1 Reply Last reply Reply Quote 1
                        • julien-fJ Offline
                          julien-f Vates 🪐 Co-Founder XO Team @fohdeesha
                          last edited by

                          @Gheppy

                          1. use backupNg.getAllJobs to list the all the jobs and find the id of the job you want to manage
                          2. use schedule.getAll to list all schedules and find the ones which reference your job via the jobId property
                          3. schedule.set id=<schedule id> enabled=json:false
                          4. schedule.set id=<schedule id> enabled=json:true
                          1 Reply Last reply Reply Quote 1
                          • GheppyG Offline
                            Gheppy
                            last edited by

                            Thanks for the guidance, that's all I need.
                            It's all working now.

                            Thank you

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post