XCP-ng is an OpenSource virtualizer type 1 (runs on bare metal) and the best way to manage it is using the Xen Orchestra (also OpenSource) 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 it does not boot after the installation as UEFI, enter the BIOS and change the boot option to Legacy mode. Will be necessary to re-install after this change.
The easiest way to install XOA as a VM inside the host is over SSH or Terminal:
bash -c "$(curl -sS https://xoa.io/deploy)"
You can also download the free version of the XOA image (about 820MB) from https://xen-orchestra.com/.
Or spinning up a container on your desktop to have a temporary instance of the XOA:
docker run -itd -p 80:80 ronivay/xen-orchestra
Use the web browser to access http://localhost and enter the credentials [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 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 repository:
- xe sr-create name-label=”Storage” shared=false device-config:device=”/dev/sdc” type=lvm content-type=user
FULL-FEATURED XOA FROM THE 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
Change the following configuration:
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 of these options can 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 solution for high availability with two physical servers and no external storage [Link].