1 install base debian system from official i386 DVD Debian 4.0
install gnome
#apt-get install gnome
#apt-get install xorg
2.
Repository setup
# echo -e "\ndeb etch openvz" >> /etc/apt/sources.list
# wget -q -O- | apt-key add - && apt-get update
Kernel installation
compileing the OpenVZ kernel myself on Debian
#apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev
#cd /usr/src
#tar xjvf linux-source-2.6.18.tar.bz2
#cd linux-source-2.6.18
# cp /boot/config-2.6.18-4-k7 .config
#make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 kernel_image
#cd ..
#dpkg -i linux-image-2.6.18-1-openvz_1_
i386.deb
# update-initramfs -c -k 2.6.18-1-openvz
#update-grub
Then reboot,after the reboot using the OpenVZ enbabled kernel check if all works,
and I'm geting this error message at startup:
"kernel panic - not syncing : VFS: unable to mount root FS on unknown-block"
I tried to solve the problem later,and I downloaded the precompiled Debian kernel
#wget debian/dists/etch/main/binary-i386/base/linux-image-2.6.18-openvz-18-53.5d3-686_ovz004.1d3_i386.deb
#dpkg -i linux-image-2.6.18-openvz-18-53.5d3-686_ovz004.1d3_i386.deb
reboot from the new openvz kernel and it works fine.
# uname -a
Linux debian 2.6.18-openvz-18-53.5d3-686 #1 SMP Sun Jan 11 01:09:09 CET 2009 i686 GNU/Linux
#ifconfig
...
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
# sysctl -p
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
building a gentoo container
#cd /var/lib/vz/template/cache
#wget
#vzctl create 101 --ostemplate gentoo-openvz-x86-2008.11.30
#vzctl set 101 --onboot yes --save
#vzctl set 101 --ipadd 192.168.1.120 --save
# vzctl set 101 --numothersock 120 --save
#vzctl set 101 --nameserver 202.106.0.20 --save
#vzctl start 101
#vzctl exec 101 passwd
Start the SSH server
# vzctl exec 101 /etc/init.d/sshd start
* Generating Hostkey...
PRNG is not seeded
* ERROR: sshd failed to start
It seems that ssh is not been installed, moreover,I can't acess the VPS even just by pinging the 192.168.1.120,the IP of the container.
阅读(577) | 评论(0) | 转发(0) |