XEN

aptitude install xen-hypervisor-4.0-amd64 xen-qemu-dm-4.0 xen-linux-system-2.6-xen-amd64

#!/bin/bash

/usr/bin/xen-create-image --lvm vg --hostname ca --install-method debootstrap \
--ip 172.16.0.111 --netmask 255.255.255.0 --gateway 172.16.110.254 --dist squeeze --memory 256Gb
echo "Zapisz podsumowanie raportu tzn. hasło roota"

wersja z 'bajerami' ;-)


[root]
size=1G
type=ext3
mountpoint=/
options=sync,errors=remount-ro

[swap]
size=2G
type=swap

[tmp]
size=1G
type=ext3
mountpoint=/tmp
options=nodev,nosuid

[usr]
size=6G
type=ext3
mountpoint=/usr
options=nodev

[var]
size=8G
type=ext3
mountpoint=/var
options=nodev,nosuid

[srv]
size=20G
type=ext3
mountpoint=/srv
options=nodev,nosuid

/usr/bin/xen-create-image  --hostname=poczta --install-method=debootstrap --ip=172.16.100.250 --netmask=255.255.255.0 --gateway=172.16.100.254 \
    --dist=squeeze     --memory=512Mb     --passwd --lvm=vg --partitions=poczta

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).# The loopback network interface
auto lo eth1 eth2 eth3
iface lo inet loopback# The primary network interface
allow-hotplug eth0 eth1 eth2 eth3
iface eth0 inet static
        address 172.20.0.129
        netmask 255.255.255.0
        network 172.20.0.0
        broadcast 172.20.0.255
        gateway 172.20.0.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 172.20.0.61 172.20.0.62
        dns-search pbs.corpiface eth1 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE downiface eth2 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE downiface eth3 inet manual
        up ifconfig $IFACE 0.0.0.0 up
        up ip link set $IFACE promisc on
        down ip link set $IFACE promisc off
        down ifconfig $IFACE down

Przydatne linki

#!/bin/bash
#
# Script to create machine
# Change these parameters to create new machine HOSTNAME=asterisk VCPUS=1 MEMORY=512Mb SWAP=512Mb DISKSIZE=2Gb LVM=vg ARCH=amd64 DISTRO=squeeze INSTALLMETHOD=debootstrap IPADDR=172.16.200.3 NETMASK=255.255.255.0 GATEWAY=172.16.200.254
## --partitions /etc/xen-tools/partitions.d/zimbra # wywaliic swap i disksize xen-create-image --hostname=$HOSTNAME --vcpus=$VCPUS --memory=$MEMORY --swap=$SWAP --size=$DISKSIZE --lvm=$LVM --arch=$ARCH --dist=$DISTRO --install-method=$INSTALLMETHOD --ip=$IPADDR --netmask=$NETMASK --gateway=$GATEWAY