The Mimic Xen host
The Mimic Xen host runs on a Compulab fit-PC IPC2 i5. After performing a minimal Fedora install on the computer, complete the following steps:
- Install Xen and the network bridge utilities: yum install xen xen-hypervisor grub2-efi-modules bridge-utils.
- Install a public SSH key and deactivate password-based SSH logins.
- Set the hostname by editing /etc/hostname.
- Configure a Xen network bridge device for each network interface on Mimic; for example /etc/sysconfig/network-scripts/ifcfg-xenbr0:
DEVICE=xenbr0 TYPE=Bridge ONBOOT=yes BOOTPROTO=none NM_CONTROLLED=no DELAY=0
The interface that the host uses might require the configuration of an IP address or DHCP. - Configure each network interface on Mimic; for example /etc/sysconfig/network-scripts/ifcfg-enp2s0 (replace XX:XX:XX:XX:XX:XX and ifname):
HWADDR=XX:XX:XX:XX:XX:XX TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=ifname ONBOOT=yes NM_CONTROLLED=no BRIDGE=xenbr0
- Place Xen guest configurations in /etc/xen, create links to /etc/xen/auto,
and place guest disk images in /var/lib/xen/images. Here is an example guest configuration which boots an OpenWrt installation (replace guest and xx:xx:xx:xx:xx:xx):
name = "guest" memory = 1024 vcpus = 1 builder = "hvm" vif = [ "model=e1000,script=vif-bridge,bridge=xenbr1,mac=xx:xx:xx:xx:xx:xx" ] disk = [ "tap2:tapdisk:aio:/var/lib/xen/images/guest-openwrt-15.05.1-x86-64-combined-ext4.img,xvda,w", "tap2:qcow:/var/lib/xen/images/guest-data.qcow,xvdb,w" ] serial = "pty"
- Ensure the Xen hypervisor is the default boot selection:
grub2-set-default "Fedora, with Xen hypervisor" grub2-mkconfig > /boot/efi/EFI/fedora/grub.cfg