Nethence Newdoc Olddoc Lab Your IP BBDock  

XEN host // Debian GNU/Linux

Host system preparation (dom0)

apt install xen-linux-system-amd64
apt install lvm2
vgcreate vg0 /dev/sda3
apt install xen-tools
vi /etc/xen-tools/xen-tools.conf

lvm = vg0
install-method = debootstrap
size = 10Gb
memory = 2Gb
swap = 1Gb
fs = ext4
ext4_options = noatime,nodiratime,errors=remount-ro
dist = `xt-guess-suite-and-mirror --suite`
image = sparse
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
pygrub = 1
mirror = `xt-guess-suite-and-mirror --mirror`

Setting up a higher boot priority for XEN,

dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen

otherwise one would get,

ERROR:  Can't find hypervisor information in sysfs!


Setting up a bridge,

apt install libvirt0 bridge-utils
vi /etc/network/interfaces

auto virbr0
iface virbr0 inet static
    address x.x.x.x/xx
    bridge_ports none
    bridge_fd 0
    bridge_stp off
    #hwaddress ether xx:xx:xx:xx:xx:xx
    bridge_maxwait 0

In case Netfilter is enabled, you might have to e.g.,

#iptables -A FORWARD -i virbr0 -o eno1 -j ACCEPT
#iptables -A FORWARD -i eno1 -o virbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT
#iptables -t nat -A POSTROUTING -o eno1 -j MASQUERADE

Home | GitHub | Docker Hub | Donate | Contact