This is an old revision of the document!
Debian Installation
The Debian Wheezy (7) installer is used since, as of this writing (2014-04-04), XCP-XAPI is not available for Debian Jessie (8). It was booted from a USB stick.
In case you have no idea how to make a bootable Debian installer USB stick, please refer to the Debian documentation on the subject, our attempt was made using the netboot mini.iso image (or choose the 64bit version if your architecture supports it).
We won't go into the details of installing Debian, following are simply a few notes that might be of interest during this step.
Desktop Environment
We initialy skipped the desktop environment, although we might later install the lightweight LXDE GUI (if you plan to use virt-manager or are more at ease with Desktop GUI). Anyway, selecting to install the desktop environment right from the Debian installer will add a ton of extras (like the whole LibreOffice package) that you probably do not need in your Dom0!
Additional Packages
You might want to add some proprietary drivers on the the space that is left free on your USB key. In our case, the Realtek WiFi interface required the rtlwifi/rtl8192cfw.bin package to be present.
You'll need to create a new partition in the free space left, using GParted is one of the easiest way to do this.
Once the packages are present on this extra space, it seems the Debian installer automatically detects them and uses them.
Partitionning
In the case of the hypervisor layer, what we'd like is to have as much disk space as possible available for the virtual machines. Therefore we'll apply the following partition schema when the Debian installer asks for the partition method:
Partitioning method: Manual
Partition disks: Select your main HD (to delete all existing partitions)
Create new partitions: Select pri/log FREE SPACE, then create new partition.
Create a 1GB for /boot filesystem
- Primary → Beginning → Ext4 journaling file system,
- Mount point: /boot
- Label: Boot
- Bootable flag: on
- → Done
Create a second partition using the rest of available space
- Use full space available → Primary
- Use as: Physical volume for LVM
- → Done
Configure the Logical Volume Manager
- Write changes to disk and configure LVM?: Yes
- Create volume group: xenvg
- Select devices: (select only the LVM partition (/dev/sdX2)
Create logical volume
- Volume group: xenvg
- Logical volume name: root
- Logical volume size: 4GB
Create logical volume
- Volume group: xenvg
- Logical volume name: swap
- Logical volume size: 4GB
Create logical volume
- Volume group: xenvg
- Logical volume name: var
- Logical volume size: 20GB
Finish
Set mount points
On top of the list, select the first entry
LVM VG xenvg, LV root - 4.0 GB Linux device-mapper (linear) #1 4.0GB
Use as: Ext4 → Mount point: / → Done
Second: LV swap entry: Use as: Swap → Done
Third: LV var: Use as: Ext4 → Mount point: /var → Done
Finish partitioning and write changes to disk
Software selection
[ ] Debian desktop environment (we'll do that later: the light way)
[*] SSH server
[*] Laptop (for laptop users only obviously)
[*] Standard system utilities
GRUB
Install the GRUB boot loader to the master boot record? Yes (you might have to say “no” and specify another device - for me it was /dev/sdb).
Boot into the new system
Basic Configuration
Login as root
remove cdrom from sources
In case you were installing from CDs or DVDs (were you really?), you'll need to remove them from sources:
> nano /etc/apt/sources.list
Comment out any line which begins “deb cdrom:…” by inserting a hash (#) in front of it.
Save the file (ctrl-X).
Install sudo
You'll probably want sudo rights for your initial user:
> apt-get update > apt-get install sudo > usermod -G sudo -a user_name (chosen during install process)