Removing A Lost Xen Server From Resource Pool

A xen server that was in a resource pool became corrupted and lost all nic/network information & needed to be reinstalled from scratch. After reinstalling it, there were duplicate server entries in the pool within the XenCenter console, one was the new server that was reinstalled and added back into the pool, the other was the old ghost entry that was no longer valid. There was no way to remove this lost entry from the XenCenter console. The way to do this is shown below using the xe command.

On the PC with XenCenter installed first get the uuid of the lost host by doing pool-sync-database. You need to connect to the pool master host ip:

C:\Program Files\Citrix\XenCenter>xe -s 10.10.1.25 -u root -pw PASSWORD pool-sync-database
You attempted an operation which involves a host which could not be contacted.
host: 1500f12e-54c6-4d23-b1ab-88ff5216c0d1 (ubcxensrv5)

Next, use the host-forget command to remove the host.

C:\Program Files\Citrix\XenCenter>xe -s 10.10.1.25 -u root -pw PASSWORD host-forget uuid=1500f12e-54c6-4d23-b1ab-88ff5216c0d1
WARNING: A host should only be forgotten if it is physically unrecoverable;
WARNING: if possible, Hosts should be 'ejected' from the Pool instead.
WARNING: Once a host has been forgotten it will have to be re-installed.
WARNING: This operation is irreversible.
Type 'yes' to continue
yes
Read yes

After that, the lost entry will disappear from the XenCenter console.

C:\Program Files\Citrix\XenCenter>xe -s 10.10.1.25 -u root -pw PASSWORD pool-sync-database
Read yesAfter that, the entry will disappear from the XenCenter console.
12 Comments
  1. John Webb says:

    Thanks for this post. It was exactly what I needed.

  2. Rajesh Krishnan says:

    Thanks a lot..worked and was very useful..

  3. K. Smith says:

    Much appreciated. This quick fix just saved me a lot of time today!

  4. Nils M Fredriksen says:

    Thanks for the post. This neat giude saved me some trouble today.

  5. Dan Fl. says:

    Worked like a charm!!
    Congrats!

  6. Nikolay Makarov says:

    Hello, all
    I have some problems with the lost server removal. xe vm-list shows that there are no running VMs, but host-forget fails with VM still running:

    [root@xen1 ~]# xe pool-sync-database
    You attempted an operation which involves a host which could not be contacted.
    host: 4be2cbcb-2c95-4b87-8984-e02773974604 (xen2)
    [root@xen1 ~]#
    [root@xen1 ~]# xe host-forget uuid=4be2cbcb-2c95-4b87-8984-e02773974604 –force
    This host can not be forgotten because there are some user VMs still running
    host: 4be2cbcb-2c95-4b87-8984-e02773974604 (xen2)
    [root@xen1 ~]#
    [root@xen1 ~]# xe vm-list affinity=4be2cbcb-2c95-4b87-8984-e02773974604
    [root@xen1 ~]#

    Could anyone suggest a workaround for such situation?

  7. Kenny says:

    We have the same problem as Nikolay. I will post if we get it but any help would be appreciated.

  8. Kenny says:

    We ended up getting one of the two to go away by unplugging the network cables from all the other boxes except the master and trying the above commands again. But I honestly don’t know if that is what removed them or not.

    The other one refuses to remove regardless of my efforts.

  9. Matt says:

    Worked Perfectly on XenServer 5.6! Thankyou!

  10. cf3232 says:

    Worked like a charm!!

  11. Sweet site, super style and design , really clean and utilise pleasant.

Trackbacks / Pings
Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>