Last Updated on November 14, 2019 EST by Jordan
TLDR; Head to the bottom and you can update the shipped version of xen-tools 4.7 to 4.8 via the xen-tools GitHub repo. There’s a dpkg available under the releases tab.
Currently, the only available version of Ubuntu available to deploy using xen-create-image (xen-tools 4.7-1) on Ubuntu 18 is Ubuntu 16.04 (Zenial)
If you want to deploy Ubuntu 18.04 (Bionic) an error will occur using the following command
xen-create-image --hostname=server1 --vcpus=2 --size=150Gb --swap=2Gb --memory=8GB --arch=amd64 --ip=192.168.1.2 --pygrub --dist=bionic --gateway=192.168.1.1 --netmask=255.255.255.0 --lvm=vg0
You will get the following error
ERROR: 'bionic' argument takes a distribution name (see /usr/share/xen-tools for valid values).
You’ll need to edit /etc/xen-tools/distributions.conf and add in the following line under zesty
bionic = ubuntu pygrub
You will then also need to run the following to link the xen-tools hook directory for karmic to bionic. Reality ist hat karmic.d has nothing for the hooks, and we should really be creating the appropriate hooks to enable networking and etc. Here’s the xen FAQ that has more details http://xen-tools.org/software/xen-tools/faq.html
cd /usr/share/xen-tools ln -vis karmic.d bionic.d
You should then be able to run your xen-create-image without issues. However, you’ll run into a new problem…networking.
So Ubuntu 18 shipped with xen-tools that didn’t have support for Ubuntu 18, and so there are no hooks for setting up networking. However, there is a thread on how to do all of this.
https://github.com/xen-tools/xen-tools/issues/51
It details the method above and has some of the hooks required.
You can also simply just install xen-tools 4.8 release from the xen-tools GitHub repo at https://github.com/xen-tools/xen-tools/releases/tag/release-4.8
wget https://github.com/xen-tools/xen-tools/releases/download/release-4.8/xen-tools_4.8-1_all.deb dpkg -i xen-tools_4.8-1_all.deb
You should then be able to deploy Ubuntu 18.04 on Ubuntu 18.04 DomU