DomU

From VVCWiki
Revision as of 18:30, 12 November 2008 by Vvc (talk | contribs) (typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
lvcreate --size 10G --name vvc-root vg0
mkfs -j /dev/vg0/vvc-root
lvcreate --size 512M --name vvc-swap vg0
mkswap /dev/vg0/vvc-swap
mkdir /v
mount -t ext3 -o noatime /dev/vg0/vvc-root /v

mkdir -p /v/var/lib/{rpm,yum}
mkdir -p /v/var/log

rpm --root /v --initdb
wget http://mirror.centos.org/centos/5/os/i386/CentOS/centos-release-5-2.el5.centos.i386.rpm
rpm -ihv --nodeps --root /v centos-release-5-2.el5.centos.i386.rpm
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
exclude=grub kudzu hdparm kbd setserial kernel*
yum --installroot=/v -y groupinstall core
cp -rp /lib/modules/2.6.18-92.1.6.el5xen /v/lib/modules/
chroot /v

/etc/fstab

/dev/xvda1              /                       ext3    noatime         1 1
/dev/xvda2              swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

/etc/ld.so.conf

hwcap 0 nosegneg
ldconfig -v
mount /sys
authconfig --enableshadow --enablemd5 --update
passwd root

/etc/securetty

xvc0

/etc/hosts

127.0.0.1 localhost vvc.chepkov.lan vvc

/etc/modprobe.conf

alias eth0 xennet
alias scsi_hostadapter xenblk
mkinitrd -v -f /boot/initrd-vvc-2.6.18-92.1.6.el5xen.img 2.6.18-92.1.6.el5xen
umount /sys

/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=vvc.chepkov.lan
NETWORKING_IPV6=no

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
DHCP_HOSTNAME=vvc

/etc/sysconfig/clock

ZONE="UTC"
UTC=false
ARC=false
cp -f /usr/share/zoneinfo/UTC /etc/localtime

/etc/inittab

co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav
exit
mv /v/boot/initrd-vvc-2.6.18-92.1.6.el5xen.img /boot/
umount /v

/etc/xen/auto/vvc

name = "vvc"
kernel = "/boot/vmlinuz-2.6.18-92.1.6.el5xen"
ramdisk = "/boot/initrd-vvc-2.6.18-92.1.6.el5xen.img"
extra = "console=xvc0"
memory = "256"
disk = [ 'phy:///dev/vg0/vvc-root,xvda1,w', 'phy:///dev/vg0/vvc-swap,xvda2,w' ]
vif = [ 'mac=00:16:3e:00:00:01, bridge=xenbr0', ]
vcpus=1
on_reboot = 'restart'
on_crash = 'restart'
xm create -c /etc/xen/auto/vvc