LINUXOR.SK ... open source notes ...

Xen 02 - dom0

category: learnz/xen · date: 2008-01-10 · source: old.linuxor.sk/VIRTUALIZATION/BASIC/BH_Debian4.0_XEN_dom0.txt · theme: github

Xen on Debian 4 Learning · Previous: The basics of XEN virtualisation · Next: domU

The Slovak original of this document: Xen 02 - dom0 (slovensky).

asciiart
|=----------------------------------=[ XEN ]=------------------------------=|
+---------------------------------------------------------------------------+
|                                                                           |
|                               XEN - dom0 (vmware)                         |
|                                 Debian 4.0 Etch                           |
|                                                                           |
+---------------------------------------------------------------------------+
|=-------------------------------=[ BH 2007 ]=-----------------------------=|

1. System requirements

asciiart
        CPU
        ---
        * One or more 64bit x86 processor(s)
        * minimum - 1.5 GHz
        * recommended - 2 GHz or multicore

        RAM
        ---
        * minimum - 1 GB
        * recommended - 2 GB or more

        DISK
        ----
        Locally attached data storage (PATA, SATA, SCSI)
        * minimum - 16 GB of disk space
        * recommended - 60 GB or more

        NETWORK
        -------
        A 100 Mbit/s network card, or faster.
        A gigabit network card is recommended, to speed up the Physical2Virtual conversion and
        data transfers on export/import, and for live relocation
        of virtual machines.

2. Partition layout + parameters

asciiart
        VMWARE - 20 GB disk
        -------------------
        /boot         - 200 MB
        swap          - 1,5 GB
        /root (LVM)   - 8 GB
        /x1-www (LVM) - 3 GB
        /x2-db (LVM)  - 3 GB

        # cat /etc/fstab
        ----------------
        /dev/mapper/system-root         /               ext3            defaults,errors=remount-ro 0       1
        /dev/sda1                       /boot           ext3            defaults        0       2
        /dev/mapper/system-x1--www      /x1-www         ext3            defaults        0       2
        /dev/mapper/system-x2--db       /x2-db          ext3            defaults        0       2
        /dev/mapper/system-swap         none            swap            sw              0       0
        /dev/hdc                        /media/cdrom0   udf,iso9660     user,noauto     0       0
        /dev/fd0                        /media/floppy0  auto            rw,user,noauto  0       0
        ---------------- END /etc/fstab

3. Install basic software

asciiart
        # apt-get install ssh mc

4. Install XEN

asciiart
        The Debian Etch package repository contains 3 versions of XEN kernels:
        ----------------------------------------------------------------------
        a/ with PAE support (xen-linux-system-2.6.18-5-xen-686)
        b/ without PAE support (linux-image-2.6.18-5-xen)
        c/ XEN + vserver ()

        PAE: http://en.wikipedia.org/wiki/Physical_Address_Extension

        When installing the XEN kernel, take care that the right kernel is installed.
        If the wrong kernel version is installed, the system will not boot at all and ends with the error message:
        'Mismatch between Xen and DOM0 kernel'

        a/ Install XEN-PAE (tested)
        ---------------------------
        Although PAE is meant for systems with more than 4 GB of memory we use this kernel, since
        the standard Debian kernel is PAE, and using a non-PAE XEN kernel caused a mismatch.

        # apt-get install xen-linux-system-2.6.18-5-xen-686
        # apt-get install libc6-xen
        # init 6

        Problem 1 - booting the system with the XEN kernel produced a great many of these messages
        ------------------------------------------------------------------------------------------
        '4gb seg fixup, process sshd (pid 1162), cs:ip 73:008d8cfc'
        'printk: 185714 messages suppressed.'

        Solution 1 - install the XEN GLIBC (libc6-xen)
        ----------------------------------------------
        # apt-get install libc6-xen

        b/ Install XEN without PAE
        --------------------------
        For a XEN kernel without PAE support these packages have to be installed separately:
        - linux-image-2.6.18-5-xen kernel
        - xen-utils
        - xen-hypervisor

        c/ Install XEN + vserver
        ------------------------
        Since we don't want a mess in the system, we won't mix virtualization tools, and so we
        won't use this kernel.

5. Network - bridge setup

asciiart
        # apt-get install bridge-utils

        # nano /etc/xen/xend-config.sxp
        -------------------------------
        (network-script network-bridge)

X. Linkz

asciiart
        XEN on DEBIAN dom0
        ------------------
        http://www.howtoforge.com/debian_etch_xen_3.1
        http://www.jejik.com/articles/2007/03/a_test_drive_of_debian_etch_xen/

Current practice (checked 2026-10)

noteThe article above is kept as it was written in 2008. This section lists what has changed since and what to do instead today.
bash
$ # apt install xen-system-amd64
$ # reboot
$ # xl info

Sources:

← learnz/xen(EN | SK)