Home
Download

Open Source

Projects
Patches

System Integration

Notes
SRPMs

The Mimic Xen host

The Mimic Xen host is capable of efficiently running a number of virtual machines. After performing a minimal Fedora install on the computer, complete the following steps:

  1. Review the host's BIOS/firmware menu to ensure its virtualization instructions are active.
  2. When installing Fedora, set aside partitions for any virtual machines that will require direct disk access.
  3. Remove NetworkManager.
  4. Run dnf update.
  5. Install Xen and the network bridge utilities: dnf install xen xen-hypervisor grub2-efi-modules network-scripts bridge-utils.
  6. Run systemctl enable network and systemctl start network.
  7. Install a public SSH key and deactivate password-based SSH logins.
  8. Set the hostname by editing /etc/hostname.
  9. Configure a Xen network bridge device for each network interface on Mimic; for example /etc/sysconfig/network-scripts/ifcfg-xenbr0 (replace xenbr0, set BOOTPROTO depending on whether you want to grant the physical host access to this network, and replace aa:bb:cc:dd:ee:ff with the MAC address Fedora assigns the adapter):
    DEVICE=xenbr0
    TYPE=Bridge
    ONBOOT=yes
    BOOTPROTO=none
    NM_CONTROLLED=no
    DELAY=0
    HWADDR=aa:bb:cc:dd:ee:ff
    
    The interface that the host uses might require the configuration of an IP address or DHCP.
  10. Configure each network interface on Mimic; for example /etc/sysconfig/network-scripts/ifcfg-eno1 (replace eno1, XX:XX:XX:XX:XX:XX, YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY, and xenbr0):
    NAME=eno1
    TYPE=Ethernet
    HWADDR=XX:XX:XX:XX:XX:XX
    UUID=YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY
    BOOTPROTO=none
    ONBOOT=yes
    NM_CONTROLLED=no
    BRIDGE=xenbr0
    
  11. 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"
    
  12. Ensure the Xen hypervisor is the default boot selection:
    grub2-set-default "Fedora, with Xen hypervisor"
    grub2-mkconfig > /boot/efi/EFI/fedora/grub.cfg
    
Email: www@flyn.org — ✉ 6110 Campfire Court; Columbia, Maryland 21045; USA