This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
xenvirtualmachines [2007/11/24 22:23] 127.0.0.1 external edit |
xenvirtualmachines [2020/02/13 22:55] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Xen Virtual Machines ====== | ====== Xen Virtual Machines ====== | ||
- | < | + | |
====== Xen Server dom0 ====== | ====== Xen Server dom0 ====== | ||
You should create a partition a bit larger than the amount of ram allocated to domU guests. | You should create a partition a bit larger than the amount of ram allocated to domU guests. | ||
< | < | ||
- | lvcreate --size | + | lvcreate --size |
mkdir / | mkdir / | ||
</ | </ | ||
+ | |||
And add to /etc/fstab | And add to /etc/fstab | ||
Line 14: | Line 15: | ||
/ | / | ||
</ | </ | ||
+ | |||
and mount | and mount | ||
Line 19: | Line 21: | ||
mount / | mount / | ||
</ | </ | ||
- | ====== Xen Client domU using debootstrap ====== | ||
- | Below ' | ||
- | < | + | ====== Xen Client domU using netboot ====== |
- | lvcreate --size 1g -i 2 --name vm01-slash vg01 | + | |
- | lvcreate --size 2g -i 2 --name vm01-swap vg01 | + | |
- | lvcreate --size 2g -i 2 --name vm01-usr vg01 | + | |
- | lvcreate --size 2g -i 2 --name vm01-var vg01 | + | |
- | mkfs.ext3 / | ||
- | mkswap / | ||
- | mkfs.reiserfs / | ||
- | mkfs.reiserfs / | ||
- | |||
- | mount / | ||
- | mkdir /mnt/usr /mnt/var | ||
- | mount / | ||
- | mount / | ||
- | |||
- | debootstrap --arch amd64 --include=reiserfsprogs, | ||
- | |||
- | cd /mnt | ||
- | cp /etc/hosts etc/ | ||
- | sed -i ' | ||
- | echo vm01 > etc/ | ||
- | cp / | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | # This file describes the network interfaces available on your system | ||
- | # and how to activate them. For more information, | ||
- | |||
- | # The loopback network interface | ||
- | auto lo | ||
- | iface lo inet loopback | ||
- | |||
- | # The primary network interface | ||
- | auto eth0 | ||
- | iface eth0 inet static | ||
- | address 1.2.3.4 | ||
- | netmask 255.255.255.0 | ||
- | gateway 1.2.3.1 | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | # /etc/fstab: static file system information. | ||
- | # | ||
- | # & | ||
- | proc /proc | ||
- | / | ||
- | /dev/sda3 /usr reiserfs defaults | ||
- | /dev/sda4 /var reiserfs noatime | ||
- | /dev/sda2 none swap sw 0 0 | ||
- | / | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | title | ||
- | root (hd0,0) | ||
- | kernel | ||
- | initrd | ||
- | |||
- | title | ||
- | root (hd0,0) | ||
- | kernel | ||
- | initrd | ||
- | </ | ||
- | < | ||
- | |||
- | < | ||
- | # Debian 5.0 | ||
- | memory = 1024 | ||
- | name = & | ||
- | bootloader = & | ||
- | disk = [ ' | ||
- | # Default bridged network interface | ||
- | vif = [ ' | ||
- | vcpus = 2 | ||
- | # Single-user mode | ||
- | #extra = & | ||
- | </ | ||
- | < | ||
- | umount /mnt/usr /mnt/var /mnt | ||
- | cd / | ||
- | ln -s ../vm01.cfg . | ||
- | xm create -c vm01.cfg | ||
- | </ | ||
- | After boot you need to: | ||
- | |||
- | < | ||
- | ====== Xen Client domU using netboot ====== | ||
This creates the LV with equal-sized stripes over a 2 drive Volume Group (Creates a raid0 LV for write performance). | This creates the LV with equal-sized stripes over a 2 drive Volume Group (Creates a raid0 LV for write performance). | ||
Line 118: | Line 29: | ||
# lvcreate --size 10g -i 2 --name ubuntu14 vg01 | # lvcreate --size 10g -i 2 --name ubuntu14 vg01 | ||
Using default stripesize 64.00 KiB | Using default stripesize 64.00 KiB | ||
- | Logical volume | + | Logical volume |
</ | </ | ||
+ | |||
< | < | ||
mkdir / | mkdir / | ||
Line 126: | Line 38: | ||
wget -c http:// | wget -c http:// | ||
</ | </ | ||
- | < | + | |
+ | **/ | ||
< | < | ||
- | name = "ubuntu14" | + | name = 'ubuntu14' |
- | memory = 1024 | + | memory = 4000 |
vcpus = 4 | vcpus = 4 | ||
Line 137: | Line 50: | ||
vif = [ ' | vif = [ ' | ||
- | kernel = "/ | + | kernel = '/ |
- | ramdisk = "/ | + | ramdisk = '/ |
- | extra = "debian-installer/ | + | extra = 'debian-installer/ |
</ | </ | ||
Start the installer: | Start the installer: | ||
Line 150: | Line 63: | ||
< | < | ||
... | ... | ||
- | #kernel = "/ | + | #kernel = '/ |
- | #ramdisk = "/ | + | #ramdisk = '/ |
- | #extra = "debian-installer/ | + | #extra = 'debian-installer/ |
- | bootloader = "pygrub" | + | bootloader = 'pygrub' |
</ | </ | ||