Migrating a single host to an existing pool
-
I have two pools each with a single host each. One has VMs and one host has none.
I wish to have both hosts in the same pool.
It appears I am unable to move a host out of it's pool as the host is the pool master.
How can I get around this?
-
@McHenry on the host you want to join: check if
/etc/stunnel/certs/sdn-controller-ca.pem
exists - if not create it:touch /etc/stunnel/certs/sdn-controller-ca.pem
and then
xe pool-certificate-uninstall name=sdn-controller-ca.pem
then retry the join. -
@McHenry not sure what you mean.
You can easily join the host with no VMs to the other one by calling
xe pool-join master-address=<ip of other host> master-username=... master-password=...
Then you should have a 2 hosts pool.
What make you think it's not possible?
-
It is also possible to perform this activity from within XO as described here. There are some prerequisites for performing this action that you should review -- https://docs.xcp-ng.org/installation/requirements/#-pool-requirements
-
You can also do this from a host's xsconsole with the menu:
- Resource Pool Configuration
- Join a Resource Pool
- Resource Pool Configuration
-
[21:48 svr10451 ~]# xe pool-join master-address=10.0.0.4 master-username=root master-password="*******************************"
The host joining the pool has different CA certificates from the pool coordinator while using the same name, uninstall them and try again.
<extra>: sdn-controller-ca.pemhttps://docs.xenserver.com/en-us/xenserver/developer/xenserver-8/management-api/api-errors
Both hosts are xcp-ng 8.3
-
@McHenry on the host you want to join: check if
/etc/stunnel/certs/sdn-controller-ca.pem
exists - if not create it:touch /etc/stunnel/certs/sdn-controller-ca.pem
and then
xe pool-certificate-uninstall name=sdn-controller-ca.pem
then retry the join. -
Worked perfectly. Thanks guys.
-
-
-
@McHenry Hi. Could you, please, list exact steps you had to do?
Im in the same situation as in your original post. If I open first pool and simply try "Add hosts" button, and add second host, the first pool shows second host, but XO / Settings / Servers only shows first host.
Andxo-cli server.getAll
shows second host as "status: 'disconnected'.So after you did steps by @BenjiReis, what exactly did you do after?
When you say "move a host out of it's pool", ho do you do that?I'm trying to solve this for more than a day now.
Thanks! -
@maxxie XO / Settings / Servers is to show a list our your pool's masters so one per pool.
It's expected as only the master is connected to XO and then dispach the API calls to other hosts when relevant.
If the Pool view shows 2 hosts then you're good.You can also ssh to any of your host and run
xe host-list
you should see the 2 listed -
@BenjiReis Thanks. So what are my exact steps please?
I have 2 pools with 1 host each. Each host is master of its pool. (this is what you get by fresh installing xcp-ng on second machine and adding it in XO / New / Server)
I want one pool with 2 hosts.
Do I just go XO / Home / Pools / pool-1 and press "Add hosts" button selecting host-2?
Do I still need to executexe pool-certificate-uninstall
on host-2 ?Last time I tried it I got some weird errors everywhere, but that might be because of botched Patches upgrade, I was impatient.
Thanks! -
Just going to XO / Home / Pools / pool-1 and pressing "Add hosts" button, selecting host-2 worked OK this time. So no detaching host from a pool and attaching to new pool ... just a button