Xen
From Wiki.cyring.fr
(Difference between revisions)
(→XEN) |
|||
Line 154: | Line 154: | ||
<syntaxhighlight lang="bash" line start="1"> | <syntaxhighlight lang="bash" line start="1"> | ||
/usr/sbin/xentop | /usr/sbin/xentop | ||
+ | </syntaxhighlight> | ||
+ | ==== Virtual Machine Manager ==== | ||
+ | ===== X11 ===== | ||
+ | <syntaxhighlight lang="bash" line start="1"> | ||
+ | wget http://us.download.nvidia.com/XFree86/Linux-x86_64/304.60/NVIDIA-Linux-x86_64-304.60.run | ||
+ | nvidia-xconfig | ||
+ | aptitude install xfce4 | ||
+ | aptitude install lightdm lightdm-gtk-greeter | ||
+ | echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager | ||
+ | nano /etc/X11/Xsession | ||
+ | </syntaxhighlight> | ||
+ | <pre> | ||
+ | ERRFILE=$HOME/tmp/.xsession-errors | ||
+ | </pre> | ||
+ | ===== GUI ===== | ||
+ | <syntaxhighlight lang="bash" line start="1"> | ||
+ | aptitude install virt-manager | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 10:25, 21 October 2012
Contents |
Installation
Initialization
ie. using our free partition number 3 formatted with a 6 GB Ext4 file system
Partitioning
fdisk /dev/sda
n 3 [enter] +6G
Formatting
mkfs.ext4 -E discard -L DEBIAN /dev/sda3
mount /dev/disk/by-label/DEBIAN /mnt
Requirements
pacman -S abs
pacman -S base-devel
abs
mkdir /tmp/debootstrap
cd /tmp/debootstrap
wget https://aur.archlinux.org/packages/de/debootstrap/PKGBUILD
makepkg -s
pacman -U debootstrap*
Debian
debootstrap --arch=amd64 wheezy /mnt http://ftp.fr.debian.org/debian
LANG=C chroot /mnt /bin/bash
export TERM=xterm-color
cd /dev
MAKEDEV generic
Configuration
File System
nano /etc/fstab
# /etc/fstab # # <file system> <dir> <type> <options> <dump> <pass> /dev/disk/by-label/DEBIAN / ext4 discard,noatime,nodiratime,defaults 0 1 proc /proc proc defaults 0 0 devpts /dev/pts devpts defaults 0 0 shm /dev/shm tmpfs nodev,nosuid 0 0 tmpfs /tmp tmpfs size=2048M 0 0 tmpfs /var/log tmpfs size=64M 0 0
Network
nano /etc/network/interfaces
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.101 network 192.168.1.0 netmask 255.255.255.0 gateway 192.168.1.1 iface br0 inet static bridge_ports none address 192.168.1.199 broadcast 192.168.1.255 netmask 255.255.255.0 gateway 192.168.1.1
nano /etc/resolv.conf
nameserver 192.168.1.1
echo XEN > /etc/hostname
nano /etc/hosts
127.0.0.1 localhost 127.0.0.1 XEN
Kernel
nano /etc/modprobe.d/blacklist.conf
blacklist pcspkr blacklist acpi_cpufreq blacklist bluetooth
Packages
nano /etc/apt/sources.list
deb http://ftp.fr.debian.org/debian wheezy main non-free
aptitude update
Localization
aptitude install locales
dpkg-reconfigure locales
aptitude install console-data
dpkg-reconfigure console-data
XEN
Deployment
aptitude install xen-linux-system-amd64
aptitude install xen-hypervisor-4.1-amd64
Boot Manager
Files
exit
ln -s /usr/lib/syslinux/mboot.c32 /boot/syslinux/mboot.c32
mkdir /boot/Debian
cp /mnt/boot/xen-4.1-amd64.gz /boot/Debian/
cp /mnt/boot/vmlinuz-3.2.0-3-amd64 /boot/Debian/
cp /mnt/boot/initrd.img-3.2.0-3-amd64 /boot/Debian/
ln -s /boot/Debian/xen-4.1-amd64.gz /boot/Debian/xen.gz
ln -s /boot/Debian/vmlinuz-3.2.0-3-amd64 /boot/Debian/vmlinuz
ln -s /boot/Debian/vmlinuz-3.2.0-3-amd64 /boot/Debian/initrd.img
SysLinux
nano /boot/syslinux/syslinux.cfg
LABEL debian MENU LABEL De^bian Linux LINUX ../Debian/vmlinuz APPEND root=/dev/sda3 ro quiet elevator=noop nmi_watchdog=0 vga=0 INITRD ../Debian/initrd.img LABEL xen MENU LABEL Debian ^Xen KERNEL mboot.c32 APPEND ../Debian/xen.gz --- ../Debian/vmlinuz root=/dev/sda3 ro quiet elevator=noop --- ../Debian/initrd.img
shutdown -r now
Testing
/usr/sbin/xentop
Virtual Machine Manager
X11
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/304.60/NVIDIA-Linux-x86_64-304.60.run
nvidia-xconfig
aptitude install xfce4
aptitude install lightdm lightdm-gtk-greeter
echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager
nano /etc/X11/Xsession
ERRFILE=$HOME/tmp/.xsession-errors
GUI
aptitude install virt-manager