XCP-ng is an open-source type 1 hypervisor (runs on bare metal). The best way to manage it is through the Xen Orchestra (also open-source) web interface.
Download the ISO (about 560MB) from https://xcp-ng.org/ and copy it to a USB drive:
dd if=xcp-ng-X.X.X.iso of=/dev/sdX bs=8M oflag=direct status=progress
Follow the installation wizard.
If the system does not boot after installation in UEFI mode, enter the BIOS and switch to Legacy boot mode. A reinstall will be required after making this change.
The easiest way to install XOA as a VM inside the host is via SSH or Terminal:
bash -c "$(curl -sS https://xoa.io/deploy)"
You can also download the free XOA image (about 820MB) from https://xen-orchestra.com/.
Alternatively, spin up a container on your desktop for a temporary XOA instance:
docker run -itd -p 80:80 ronivay/xen-orchestra
Open a browser, go to http://localhost, and log in with [email protected]:admin.
VM TOOLS FROM APT
sudo apt update sudo apt install xe-guest-utilities -y
sudo systemctl enable xe-linux-distribution sudo systemctl start xe-linux-distribution
USB DRIVE AS LOCAL STORAGE
fdisk -l xe sr-create name-label="Storage-A" shared=false device-config:device="/dev/sdb" type=lvm content-type=user
BASIC COMMANDS
- Updating the system:
- yum update -y
- xe-toolstack-restart
- Information gathering:
- xe help –all
- xe host-compute-free-memory
- xe host-cpu-info
- xe pif-list
- xe network-list
- xe sr-list
- xe cd-list
- xe vdi-list
- xe vm-list
- xe host-list
- Importing VMs:
- xe vm-import filename=image.ova
- xe vm-import filename=image.xva preserve=true
- Managing VMs:
- xe vm-start vm=”Ubuntu Focal Fossa 20.04″
- xe vm-reboot uuid=81f6da57-0242-5408-ffc6-8217bf522e1f force=true
- xe vm-shutdown vm=”Ubuntu Focal Fossa 20.04″
- xe vm-destroy uuid=81f6da57-0242-5408-ffc6-8217bf522e1f
- Using the CD drive:
- xe vm-cd-insert cd-name=ms-office.iso vm=”Windows 10″
- xe vm-cd-eject vm=”Windows 10″
- Creating an ISO repository:
- xe sr-create name-label=”ISO Repository” type=iso device-config:location=/opt/xensource/packages/iso device-config:legacy_mode=true content-type=iso
- xe sr-create name-label=”Local storage 2″ shared=false type=ext content-type=user device-config:device=/dev/sda host-uuid=ae8b5532-e2c8-4041-b939-58cd201e540f
- Creating a local storage repository:
- xe sr-create name-label=”Storage” shared=false device-config:device=”/dev/sdc” type=lvm content-type=user
FULL-FEATURED XOA FROM SOURCE
Pre-installation:
sudo apt update sudo apt install xe-guest-utilities git -y sudo systemctl enable xe-linux-distribution sudo systemctl start xe-linux-distribution sudo mkdir /etc/ssl/xo sudo openssl req -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out /etc/ssl/xo/xo.crt -keyout /etc/ssl/xo/xo.key git clone https://github.com/ronivay/XenOrchestraInstallerUpdater.git cd XenOrchestraInstallerUpdater/ cp sample.xo-install.cfg xo-install.cfg nano xo-install.cfg
Update the following configuration values:
PORT="443" ... PLUGINS="all" ... PATH_TO_HTTPS_CERT=/etc/ssl/xo/xo.crt PATH_TO_HTTPS_KEY=/etc/ssl/xo/xo.key
Installation (option 1: Autoinstall):
sudo ./xo-install.sh
Each option can also be run non-interactively:
sudo ./xo-install.sh --install sudo ./xo-install.sh --update sudo ./xo-install.sh --update --force sudo ./xo-install.sh --rollback
BONUS
HA-Lizard is a free high availability solution for two physical servers with no external storage required [Link].