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.
Thanks for this post. It was exactly what I needed.
Thanks a lot..worked and was very useful..
Much appreciated. This quick fix just saved me a lot of time today!
Thanks for the post. This neat giude saved me some trouble today.
Worked like a charm!!
Congrats!
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?
We have the same problem as Nikolay. I will post if we get it but any help would be appreciated.
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.
Worked Perfectly on XenServer 5.6! Thankyou!
Worked like a charm!!
Sweet site, super style and design , really clean and utilise pleasant.