no way to compare when less than two revisions
Différences
Ci-dessous, les différences entre deux révisions de la page.
— | xen_robin [2014/02/16 13:46] (Version actuelle) – créée - modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | :!: Before installing the dedicated server, please follow this layout as we'll use the left free space for LVM (once the machine is installed) : | ||
+ | |||
+ | ^ Mountpoint ^ Size ^ FS type ^ Partition type ^ | ||
+ | | /boot | 256M | ext4 | Primary | | ||
+ | | / | 2048M | ext4 | Primary | | ||
+ | | swap | 1024 | swap | Primary | | ||
+ | | n/a | all free space | n/a | Extended | | ||
+ | | /usr| 4096| swap | Logical| | ||
+ | | /var | 4096| swap | Logical | | ||
+ | |||
+ | ====== Xen install ====== | ||
+ | |||
+ | * Retrieve Xen version and install package | ||
+ | |||
+ | apt-cache search xen-hypervisor | ||
+ | apt-get install xen-hypervisor-4.x-amd64 | ||
+ | |||
+ | * Check if Xen has been integrated to grub | ||
+ | |||
+ | grep Xen / | ||
+ | |||
+ | * Specify dedicated CPUs and memory for dom0 in **/ | ||
+ | |||
+ | I prefer not to restrict memory for dom0, let's allocate only one CPU : | ||
+ | |||
+ | < | ||
+ | GRUB_CMDLINE_LINUX=" | ||
+ | GRUB_CMDLINE_XEN=" | ||
+ | </ | ||
+ | |||
+ | * Launch **update-grub** | ||
+ | |||
+ | * Reboot | ||
+ | |||
+ | * Check if Xen kernel has been loaded on boot | ||
+ | |||
+ | xm list | ||
+ | |||
+ | ====== Xen configuration ====== | ||
+ | |||
+ | * Comment and uncomment those lines in **/ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # | ||
+ | (network-script network-nat) | ||
+ | (vif-script | ||
+ | </ | ||
+ | |||
+ | * Launch **/ | ||
+ | |||
+ | ====== VMs setup ====== | ||
+ | |||
+ | * Create a 32 bits virtual machine | ||
+ | |||
+ | < | ||
+ | xen-create-image --lvm=datavg --size=4G --memory=256M --swap=256M --dist=wheezy --mirror=http:// | ||
+ | </ | ||
+ | |||
+ | :!: kernel and initrd files can be retrieved here : | ||
+ | |||
+ | * kernel : [[http:// | ||
+ | * initrd : [[http:// | ||
+ | |||
+ | ===== VM configuration file ===== | ||
+ | |||
+ | **/ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Configuration file for the Xen instance wheezy32bits, | ||
+ | # by xen-tools 4.3.1 on Sun Feb 9 16:25:13 2014. | ||
+ | # | ||
+ | |||
+ | # | ||
+ | # Kernel + memory size | ||
+ | # | ||
+ | kernel | ||
+ | ramdisk | ||
+ | |||
+ | vcpus = ' | ||
+ | cpus = ' | ||
+ | memory | ||
+ | |||
+ | # | ||
+ | # Disk device(s). | ||
+ | # | ||
+ | root = '/ | ||
+ | disk = [ | ||
+ | ' | ||
+ | ' | ||
+ | ] | ||
+ | |||
+ | |||
+ | # | ||
+ | # Physical volumes | ||
+ | # | ||
+ | |||
+ | |||
+ | # | ||
+ | # Hostname | ||
+ | # | ||
+ | name = ' | ||
+ | |||
+ | # | ||
+ | # Networking | ||
+ | # | ||
+ | vif = [ ' | ||
+ | |||
+ | # | ||
+ | # Behaviour | ||
+ | # | ||
+ | on_poweroff = ' | ||
+ | on_reboot | ||
+ | on_crash | ||
+ | </ | ||
+ | |||
+ | ===== Starting the VM ===== | ||
+ | |||
+ | * with console : | ||
+ | |||
+ | xm create wheezy32bits.cfg -c | ||
+ | |||
+ | * without console : | ||
+ | |||
+ | xm create wheezy32bits.cfg | ||
+ | |||
+ | ====== Firewall ====== | ||
+ | |||
+ | * dom0 firewall rules : [[http:// | ||
+ | * VMs firewall rules : [[http:// | ||
+ | |||
+ | |||
+ | |||