Host: CentOS4, Guest: Debian, apt-get not working, strange problems
Hello, i have strange problems with my test server (CentOS4) and a debian sarge guest. The sarge guest was created for linux vserver and worked there without problems. To test the migration from linux vserver to OpenVZ I try to run that guest on an OpenVZ host. I just tar-ed everything on the vserver host and untar-ed it again in /vz/private/101 so far so good. Then I executed the following steps: vzctl set 101 --applyconfig vps.basic --save echo "OSTEMPLATE=debian-3.1" >> /etc/vz/101.conf vzctl set 101 --ipadd 10.10.201.101 --save vzctl start 101 The guest runs now. So I enter the guest via vzctl enter 101 Now there are a few problems: proc is not mounted so I can't do df, ps, ifconfig, ... The network does not work too. I did the following: mount -t proc proc /proc /etc/init.d/networking start Now the network works fine and proc is mounted. The next step I tried to do was to update. apt-get update Ok, it downloads all package lists. Fine! Now: apt-get upgrade And I got the following error: Quote: E: you don't have enough free space in /var/cache/apt/archives. Strange, df -h says that I have about 5.3G of free space! And even more strange: if I delete the package lists. He is able to download them again (no free space error). FYI: The the / and the /vz are one the same partition (ext3, defaults). Another problem I have is that vzctl start 101 does NOT start the network and some other services and does not mount the proc, why? I hope someone of you can help me. Thank you Bernhard, from Germany
Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
This most likely is not your problem as it was not indicated in the error as far as I can see. Check /etc/sysconfig/vz-scripts/101.conf and make sure DCACHESIZE="524288:548864" Is a larger level that cd / ; du -h or how much disk space the template is using. Good luck.
It is even more strange... if I use the "aptitude upgrade" command (instead of "apt-get upgrade") everything works fine. Can someone explain me why? Is this a bug in OpenVZ? Bernhard
If you want to try a second template from this post enclosed below it only took me about 15 minutes to complete a working debian template. I am going to try and attach a file which is a debootstrap RPM. I downloaded the deb bootstrap and emerged a program into gentoo to transform the deb file into an RPM. It works great and I made a template for Debian 3.1 sarge using the installed RPM on a CentOS 4.2 host. Here is the forum post: http://forum.openvz.org/index.php?t=msg&th=80&start= 0 The attachment is the debootstrap RPM
devnu11, debootstrap is available for Gentoo natively; just emerge debootstrap
Absent /proc and no networking are clear signs of VServer - in OpenVZ it is VPS who should mount its /proc itself, and in VServer there is no normal networking, so it is not started. Use update-rc.d to add networking into boot process. First of all, check /proc/user_beancounters inside your VPS -- if you see ones that were failing (last column - failcnt - is greater than zero), you should increase them accordingly (using vzctl set). You should also usually check not just free blocks (df) but also free inodes (df -i) -- sometimes it happens that there are no more free inodes. It is also recommended to have a separate /vz partition, for several reasons. If nothing else works, try debugging apt-get using strace - so you could see the actual syscall and an error. Also, you can try creating a Debian template from scratch, as described here. Any problems - please ask.
Quote: devnu11, debootstrap is available for Gentoo natively; just emerge debootstrap Yes, that is correct. I wanted to build Debian on a CentOS Host so I didn't have to upload ~200 MB from a local machine. It's also not very practical to install a "Bear" such as Gentoo if your main purpose is only to debootstrap from an RPM based box. I was lucky to have just installed Gentoo recently on a local machine. I had trouble finding a RPM for debootstrap which was functional for 3.1 sarge. Now I have the RPM for future use
Now I see. BTW thanks for the debootstrap rpm; I will attach it to my howto article
Thanks for help - I will post my results as soon as possible. Bernhard
Hi, now I created a template using the howto from kir. /proc is mounted now and the network works too. But the apt-get problem is still there. I will do a strace in a few minutes and post my results. I hope this helps. I will also publish my precreated debian template. Maybe someone of you can download it and try if he sees the same error for apt-get install something (the same command for aptitude works). Some further remarks: If I use the same system via chroot apt-get works fine. After some apt-get install command there is NO entry with a failcount>0 in /proc/user_beancounters. Bernhard
See attachment for strace output of "apt-get install mc". Bernhard
Can you rerun strace with -Ff arguments, so children will be catched as well?
Here is the full strace of apt-get install quota I really hope you can find the error. Bernhard btw. I have migrated my server from Linux VServer to OpenVZ successfully.
Can you tell if you have assigned a valid IP to the VPS? Are you able to ping the outside world from the VPS? Does name resolution work there? Are you able to download stuff from the network?
I did everything via SSH and did not use vzctl enter (the server is about 250km away). Network is OK, I can ping the VPS and the host. If I use aptitude instead of apt-get everything works ok therefore I don't think it is a network problem. Bernhard
Did someone of you found the reason for that problem? In the meantime I tried the same VPS on another hardware - same result. The first test was done on: Pentium M 740 The second test was done on: 2xPentium III SMP Bernhard
kir solved the problem. It is a kernel bug. You have to recompile the kernel without "CONFIG_LBD" set. Or you can just wait for a updated kernel image. Bernhard
New kernel fixing this bug will be available next week. Patch fixing the issue is already available from here.
Has this Kernel been released yet? Just curious, I'd like to create some VHCS with Debian and apt
VHCS ? not familiar with that acroymn.
Google it. It's an open source hosting control panel. Very buggy though. I can't get it to work much and we dropped it about 4 months ago when it was causing major support issues for our VPS users.
Not yet. Will try hard to do that today or tomorrow.