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

    What metadata restore really do?

    Scheduled Pinned Locked Moved Backup
    8 Posts 4 Posters 85 Views 4 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.
    • Tristis OrisT Online
      Tristis Oris Top contributor
      last edited by

      My pool died so i decied to restore it from backup.

      • fresh xen install, retore metadata, everything looks fine, but i can't join any new hosts into this pool.
        https://paste.vates.tech/?ca81f43fd2d10456#Ay6yKRNTS8LDDSHTkin7eLppP33eAMS5grLrevuqf5rL

      • ok, 3 hosts fresh install, joined into pool, restore metadata - i got pool with 1 host and others 2 removed from XO.
        2nd host unavailable, as i see it got same IP as 1st.
        3rd host - nothing happens.
        https://paste.vates.tech/?112eb74c063a36d9#cgQi8jsG4htscEtEtAUS9vqRWnGQvD6REXd3XAzCxK2

      • i add 2nd host with his "old" ip to XO. But can't connect and can't remove. Probably, IP change happens at this time.
        https://paste.vates.tech/?2c81fd68ed70cff2#7jXMPfj8wGePEC6KDTpTX9GVDmc2kuLG9Kd7ueb6MfSv
        https://paste.vates.tech/?07a7b2f07f699815#5w3qM7R7eVAauQ7rGGN3Wwx5DgQF2QejbJZcQh949Uqu

      Only way i found to remove it - disable, change ip to not existed, tried to connect, remove works after error.

      That looks like bloody mess. No host mapping, random results, pool is blocked from any new hosts in future.

      psafontP K 2 Replies Last reply Reply Quote 0
      • Tristis OrisT Online
        Tristis Oris Top contributor
        last edited by

        And next problem. How to restore info about VMs?
        2nd affected pool https://xcp-ng.org/forum/post/95369 lost master, all VMs now running on slave which i can't connect.
        If setup new host and reconnect it to SR, i only can get a VDI, not VM itself.

        Tristis OrisT 1 Reply Last reply Reply Quote 0
        • Tristis OrisT Online
          Tristis Oris Top contributor @Tristis Oris
          last edited by

          i tried https://docs.xenserver.com/en-us/xenserver/8/dr/backup.html#back-up-single-host-installations but, "command not found".

          At this time, the meta restore works perfectly. I got all my VMs back, but

          • since I don't believe in success, I didn't shut down the unavailable slave host, where the VMs was still running.
          • After restoring on a new master, all the VMs were also running.
          • except for IP conflicts, in that case I had double VDI usage!
          • The old server was shut down ASAP, but some VDIs were still corrupted anyway.

          This wasn't a critical issue, but after EMERGENCY restoration, I expected that the host would be in emergency mode and the VMs would be halted.

          1 Reply Last reply Reply Quote 0
          • psafontP Offline
            psafont Vates đŸȘ XAPI & Network Team @Tristis Oris
            last edited by

            @Tristis-Oris said in What metadata restore really do?:

            My pool died so i decied to restore it from backup.

            • fresh xen install, retore metadata, everything looks fine, but i can't join any new hosts into this pool.
              https://paste.vates.tech/?ca81f43fd2d10456#Ay6yKRNTS8LDDSHTkin7eLppP33eAMS5grLrevuqf5rL

            It looks like the metadata restored has a certificate with name 'sdn-controller-ca', but this certificate does not exist in the filesystem (/etc/stunnel/certs/sdn-controller-ca.pem). I believe this is installed by Xen Orchestra whenever the SDN controller is turned on.
            To remove it from the database run xe pool-uninstall-ca-certificate name=sdn-controller-ca --force

            The force flag should allow the certificate to be removed from the database even if the file is missing

            Tristis OrisT 2 Replies Last reply Reply Quote 2
            • Tristis OrisT Online
              Tristis Oris Top contributor @psafont
              last edited by Tristis Oris

              @psafont
              is it safe to remove it on production pool?

              whenever the SDN controller is turned on.

              so, i can do something on new host, before joining into pool to generate this cert?

              1 Reply Last reply Reply Quote 0
              • Tristis OrisT Online
                Tristis Oris Top contributor @psafont
                last edited by Tristis Oris

                @psafont
                nvm something weird happens. I removed cert and everything fixed. Thank you.
                Need to specify extention xe pool-uninstall-ca-certificate name=sdn-controller-ca.pem --force

                But this cert shouldn't exist at backup because i never use sdn, plugin is disabled. Other hosts has no this cert. Looks like bug?

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kagbasi-ngc @Tristis Oris
                  last edited by

                  @Tristis-Oris Just wanted to add my 2-cents that I, too, ran into a similar issue just a couple of days ago and it feels like this could be a bug.

                  My scenario:

                  I had a fully working three-node pool. One of the hosts had a 12 CPUs, whereas the other two had 16 each - so I would occasionally run into errors with the load-balancer trying to migrate VMs (usually something like "VM Lacks Feature"). So I decided to replace that host with another one that was identical to the other two hosts.

                  I did what I thought was logical; detached that host from the pool, installed XCP-ng 8.3 on the new host, gave it the same hostname and IP address, used the same root password, then powered it up. Now, without doing anything at all, when I went into XO and viewed the Pools page I saw the new host in a pool by itself (which was strange, because I wasn't expecting that). I was expecting to have to manually add a new server to XO - but hey, perhaps there is some kinda discovery going on.

                  Anyway, I attempted to add this new host to the pool but was unsuccessful. I was met with an error about the SDN certificate existing. Unfortunately, I didn't write it down. But ultimately, the solution for me was to run the same xe pool-uninstall-ca-certificate name=sdn-controller-ca.pem command on the new host.

                  Anyone from Vates care to comment?

                  1 Reply Last reply Reply Quote 0
                  • olivierlambertO Online
                    olivierlambert Vates đŸȘ Co-Founder CEO
                    last edited by

                    Hi @kagbasi-ngc,

                    The "VM Lacks Feature" message typically means the VM is missing a functional agent required for migration, so it's likely not related to the load balancer.

                    To keep things clear and easier to follow, I suggest opening a separate thread for unrelated issues. It helps us stay focused and makes it easier to assist everyone effectively.

                    Regarding XO reconnecting: this behavior can occur if previous host connection details are still present in the configuration. Since Xen Orchestra doesn’t perform any kind of autodiscovery, this usually points to a misconfiguration—most often when multiple hosts from the same pool are added manually under Settings > Servers.

                    Lastly, about the related topic you mentioned—yes, the certificate is likely the root cause of that particular issue.

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