XCP-ng and XO Admin Tips Video Commands

Full list of XCP-ng commands in their documentation

Commands used in the video:

List VM’s

xe vm-list

Starting & Stopping VM’s

xe vm-start uuid=<VM UUID>
xe vm-start vm=Name\ Of \VM
xe vm-shutdown uuid=<VM UUID>
xe vm-shutdown vm=Name\ Of \VM

Promoting an XCP-ng host to master

xe pool-emergency-transition-to-master

Informing other hosts in the pool of the new master

xe pool-recover-slaves

Force reset a VM in a failed power state

xe vm-reset-powerstate uuid=<VM UUID> --force

Export & import a VM via SSH from one XCP-ng host to another

xe vm-export uuid=7f1ca571-aedf-972c-5c8a-c14a9391d7ed filename= | ssh root@172.16.16.46 'xe vm-import filename=/dev/stdin'
1 Like

Let’s say you need to emergency transfer to master one of your hosts, does each host contain the information to become master or is there something else that needs to be done?

I know with HA that at least 2 hosts keep the master info so that failover can be done rapidly, but I never thought about regular pools.

All non master hosts in a pool have the data so any one of them can be promoted.

Thanx for the great video, really informative!

Im thinking about the case that the XOA has seized to exist, but I do have backups of the config, but not the XOA VM.

Will a fresh XOA VM be able to simply “restore” the XO config as long as the remote holding the backup is attached and XOA can read the Remote?
Or is there another train of actions needed to be performed?

I’m comming from vSphere using vSphere replication. If vCenter is lost, vSphere replication cannot be used.
No bueno. Moment 22.
In that case some under hood fiddeling was required to restore a replicated vCenter to get thing rolling.

Note, I haven tried / fiddled with this situation on XOA yet…

Anyone have?

Cheers,
Chris

XO can do both backups of all the metadata of the pool and it can backup it’s own config. The files is produces can be loaded for a bare metal full restore.

I you didn’t have a pool but just wanted to standup a different xcp-ng instance from an existing one single pool, could you recreate the pool from the metadata and where are these files?

When you setup the XO backup you setup the destination for the backups.