XOA if you wish (optional)
Once xcp-ng is up and running, you’ want XOA up for VM migration. Here is the fastest way.
Log into xen host,
bash -c "$(curl -s http://xoa.io/deploy)"
Answer pretty basic Q and off you go.
If you can run Docker image (Linux, WSL, MacOS (not sure for Apple silicone)), you can run XOA locally to connect to xcp-ng server. This saves the disk/memory on the server.
The default username/password is admin@admin.net / admin.
Cheat sheet
auto start
xe vm-list
xe vm-param-set uuid=$VMUUID other-config:auto_poweron=true
get IP
xe vm-param-get param-name=networks uuid=$VMUUID
PCI passthrough
source
First, make dom-0 to not use the PCI devices.
/opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(02:00.0)(06:00.0)(06:00.1)"
check what’s the boot command with
cat /boot/efi/EFI/xenserver/grub.cfg
(if this is EFI boot.)
Reboot.
xl pci-assignable-list
shows the devices, and use the devices for the guest.
0000:02:00.0
0000:06:00.0
0000:06:00.1
xe vm-param-set uuid=$VMUUID other-config:pci=0/0000:02:00.0,0/0000:06:00.0,0/0000:06:00.1
Reaching to client VNC console
First you need to allow sshd to port forward in /etc/ssh/sshd_config
PermitTunnel yes
systemctl restart sshd
ssh
Gotchas
When you import a VM from ESXi, the ethernet device name changes. If you are using netplan for static IP address, adjust the device name in /etc/netplan
.
Debian/Ubuntu
You may need to install xe-daemon. Without it, the VM status like network IP does not show up.
sudo apt install xe-guest-utilities
systemctl enable xe-daemon
systemctl start xe-daemon
XigmaNAS
pkg install sysutils/xe-guest-utilities xen-guest-tools
Go over to “System > Advanced > rc.conf” and add ” xenguest_enable” -> “YES”
and service xenguest start
. Once it works, you can see the IP address on XOA.
XOA in a docker
This is one of good reasons on my book to go with xcp-ng. I don’t have to run XOA on the server.
Following the instructions on https://github.com/ronivay/xen-orchestra-docker, I make a docker image and running it locally.
Create dirs for the docker:
sudo mkdir -p /var/lib/xen/xo-server /var/lib/xen/redis
then run it.
docker run -dit -p 3380:80 -v /var/lib/xen/xo-server:/var/lib/xo-server -v /var/lib/xen/redis:/var/lib/redis --name xoa --stop-timeout 30 xen-orchestra
I put this in a shell script and run it when I want to run XOA and open the console on localhost:3380.