Skip to content
Henryk Paluch edited this page Dec 12, 2023 · 4 revisions

XCP-ng

XCP-ng is alternative distribution that includes Xen Hypervisor, XAPI (Xen API - for remote control) that is basically alternative to XenServer. In case XenServer see XenServer 7.4 for details.

However advanced Web UI Xen Orchestra rquires registration and account - at least for Updates (see below)

Although there is mentioned alternative single-host UI called (XO Lite) it seems to be not yet completed and usable for general public (see text below)

This situation is confusing and disturbing - reading:

Installation

Begining is easy, just grab, burn and run this ISO:

I'm testing 8.2.1 xcp-ng-8.2.1.iso sha256: 93853aba9a71900fe43fd5a0082e2af6ab89acd14168f058ffc89d311690a412

WARNING! You need at least 1 dedicated hard-drive where it will be installed - the installer will WIPE all existing data on it. This behaviour is similar to Proxmox VE and also VMware ESXi.

After reboot if you want to use Web UI you may start with splash screen using url https://IP_OF_XCP_NG_SERVER.

Please note that you can't use plain http://... - you will get 403 forbidden response

Now tricky part - there are two Web UI interfaces:

  1. XO Lite - single host minimal UI (similar to single host ESXi administration)

  2. Xen Orchestra - appliance (similar to VMware vCenter)

Originally I planned to try XO Lite (because I have only single host) but quickly had found that it is unfinished - you have to manually download single HTML page and there are some problems - for example application console not working, please see:

Current limitation

  • consoles aren't working on Firefox due to a XAPI issue. The issue is fixed and merged, but it's not yet available on XCP-ng 8.2
  • it's very basic

So I voted for next option - Xen Orchestra appliance. To install it just

  • visit your splash-page at https://IP_OF_XCP_NG_SERVER
  • and click on Xen Orchestra -> Quick Deploy button
  • it will ask for your Xen machine login and password (use root and password you enterred on installation)
  • you will be asked with several questions on Xen Orchestra quick deploy
  • I selected:
    • Select a Storage: Local storage (the only option in my case)
    • Network: Pool-wide network ... eth0
  • to have predictable IP address of appliance I also filled
    • XOA VM IP address (must be different from XCP-ng IP address!)
    • filled manually my Gateway and all other items (Netmask, DNS,...)
  • click Next
  • under Next page I entered root password (rather same as for Host)
  • and also setup password for xoa account...
  • finally I clicked on Deploy

While appliance is deploy you can also try SSH login to Xen Host using ssh root@IP_OF_XCP_NG

NOTE: At the end of installation you will be automatically redirected to Orchestra URL - in my case it was too early (connection refused), but after few second later (reloading page) it worked. Use credentials you specified (login root and password you specified on XOA install).

There was red exclamation (!) next to XOA icon. When I clicked there, I found not too nice log:

12/10/2023, 5:08:15 PM: Start updating...
12/10/2023, 5:08:16 PM: Not registered
12/10/2023, 5:08:16 PM: No registration token provided. Please, register your appliance.
12/10/2023, 5:11:25 PM: Start updating...
12/10/2023, 5:11:25 PM: No registration token provided. Please, register your appliance.

I decided to skip both registration and Updated for a while (or forever)

Updating system

While for XOA you need registration/account the XCP-ng should be updatable without these. By following:

But another bad surprise:

  • I went in Web UI to Home -> Pools
  • clicked on the only pool xcp-ng
  • Went to tab Patches
  • and got this bad surprise:

This feature is available starting from Starter Edition

a) Upgrade Now b) Try it for Free

However using SSH access I simply issued:

yum update

And got:

Install              ( 4 Dependent packages)
Upgrade  61 Packages

Now it it really annoying - the number (61 packages) nicely matches number mentioned in Pool on Web UI. So it is free or not?

Please set autostart on for appliance to avoid problems below.

After update installation I simply rebooted machine using:

init 6

Quick look: there are two categories of commands:

  • xl low-level Xen Hypervisor command - generally not usable for XCP-ng
  • xe XenServer (and also XCP-ng) command

For VMs managed in pool (our case) you need to use xe command.

After reboot XOA appliance did not started automatically.

  • you can use console UI or SSH to start it
  • in case of SSH
xe vm-list

uuid ( RO)           : 00f9e1fc-4677-70dc-6e50-609b98c7fbb5
     name-label ( RW): XOA
    power-state ( RO): halted

(Ignored Control domain.... it is your Linux under Xen - Xen starts main Hypervisor as privileged task called Domain-0

To start it just issue:

xe vm-start name-label=XOA

After a while it should start and you can again reach it in Web UI. And so far good - no longer 'missing patches' warning regarding our Pool...

Creating first VM

PVM vs HVM. Xen hypervisor was created in times where CPUs did not provide any support for virtualization. Xen solved this problem by using PV (para-virtualization) where Guest (VM) was Xen-aware and calling Xen when needed (this PV mode is still possible for open-source system including Linux, and some BSDs). Also guest has to use special Virtual Harwdare to access it via Xen hypervisor (there is no single PCI device under PV Xen). However it did not work (for obvious reason) for Windows where Microsoft have never intention to support competition - Xen hypervisor).

When later Hardware virtualization was available Xen introduced HVM. Xen in this case relies on QEMU to emulate PCI (and actually even ISA - for example timer) hardware for VM.

In example below we will use HVM (although it is Debian Linux) to simplify installation considerably. The reason is that in PV mode it is not possible to do ISO installation, because even Xen aware kernel must be booted by Host before VM is started...

First we need to Upload ISO somewhere. There are several options here: https://xcp-ng.org/blog/2022/05/05/how-to-create-a-local-iso-repository-in-xcp-ng/

I will use Quick and Dirty way - local Domain-0 storage using CLI. SSH to your machine and do something like:

# watch free disk space in Domain-0!
df -h / # in my case only 15GB is free
# following guide
mkdir -p /var/opt/xen/ISO_Store
cd /var/opt/xen/ISO_Store
# Example: download Debian 12 ISO
curl -fLO http://ftp.linux.cz/pub/linux/debian-cd/12.2.0/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso
xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso
xe help --all
# Notice uuid for SR LocalISO
xe sr-list
# use uuid from above command
xe sr-scan uuid=9e8c0b1a-b93e-94bb-730c-b153d69a08f6

Now In Web UI:

  • click on Home
  • click on right-top icon + New VM
  • select the only Pool xcp-ng
  • now fill in large form...
  • Name:
    • Template: Debian Bookworm 12
    • Name: use whatever you want
  • Performance:
    • vCPU: 1 is enough
    • RAM: changed to 1 GiB (Debian is fine with that)
    • Topology: keep "Default behaviour"
    • Install settings:
      • select ISO/DVD: LocalISO -> debian-12.2.0-amd64-netinst.iso
    • Interfaces: keep Pool wide ... eth0 with MAC: Auto-generated if empty
    • Disks: keep Size: 10GB (fine for Debian)
  • finally click on Create
  • after a while there will be create VM - thanks to HVM (Hardware Virtualization) you need no special drivers, etc.
  • in my case console was not responding - I had to go to Advanced, use Force Shutdown and start again
  • then console worked I was able to Install Debian.

Gave Up

I decided that XCP-ng (+ Web UI) is not for me. I simply don't like these murky licensing issues (what is really free and what is proprietary), namely:

  • Xen Project (Hypervisor page Xen) is (of course) free, but it provides only CLI command xl and there is no central management.

  • XCP-ng server side is free, but it provides only server side with CLI command xe and XAPI. But generally you need some client software to make it useful

  • Web Client XO Lite - which is free, is still not usable (Dec 2023) and there is clear conflict of interest (because same vendor is providing XOA - so there is no interest to make XO Lite it better). Also it is not possible to run it in air-gapped environments - there are multiple resources fetched from lite.xen-orchestra.com, even from obfuscated JS files.

  • Web Client XOA may appear free from documentation but Appliance has attached proprietary license - you have to register and/or pay to use all its features

  • XOA can be build from sources, but it is simply ridiculous - it is like demanding to build CentOS from source to be able to use it.

  • there is also free Windows GUI app XCP-ng Center (based on old XenCenter source from XenServer package), https://github.com/xcp-ng/xenadmin - but last commit is 3 years old (2020). Again I feel conflict of interest there. and also quoting https://xcp-ng.org/forum/topic/3174/windows-pv-hvm-pvhvm-pvhv1-pvhv2-a-little-mess/23

    Also, as stated in https://xcp-ng.org/docs/management.html XCP-ng Center is only community supported so not having all bells and whistles

Clone this wiki locally