OpenVZ Forum - RDF feed
type: channel
items: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
items: Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems

Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: bjmg
date: 2005-12-21T18:22:36-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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.
creator: devnu11
date: 2005-12-21T18:31:07-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: bjmg
date: 2005-12-21T22:43:13-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: devnu11
date: 2005-12-22T01:10:21-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: devnu11, debootstrap is available for Gentoo natively; just emerge debootstrap
creator: kir
date: 2005-12-22T09:49:14-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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.
creator: kir
date: 2005-12-22T09:56:50-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: devnu11
date: 2005-12-22T10:15:28-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: Now I see. BTW thanks for the debootstrap rpm; I will attach it to my howto article
creator: kir
date: 2005-12-22T10:26:03-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: Thanks for help - I will post my results as soon as possible. Bernhard
creator: bjmg
date: 2005-12-22T10:33:29-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: bjmg
date: 2005-12-22T21:56:24-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: See attachment for strace output of "apt-get install mc". Bernhard
creator: bjmg
date: 2005-12-22T22:07:12-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: Can you rerun strace with -Ff arguments, so children will be catched as well?
creator: kir
date: 2005-12-23T09:34:42-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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.
creator: bjmg
date: 2005-12-23T12:35:27-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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?
creator: kir
date: 2005-12-23T12:49:39-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: bjmg
date: 2005-12-23T13:26:57-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: bjmg
date: 2005-12-27T19:43:35-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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
creator: bjmg
date: 2005-12-28T12:38:48-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: New kernel fixing this bug will be available next week. Patch fixing the issue is already available from here.
creator: kir
date: 2005-12-28T13:13:25-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: Has this Kernel been released yet? Just curious, I'd like to create some VHCS with Debian and apt
creator: phpfreak
date: 2006-01-08T05:48:17-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: VHCS ? not familiar with that acroymn.
creator: vmvmvm
date: 2006-01-08T06:11:38-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: 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.
creator: phpfreak
date: 2006-01-08T06:24:01-00:00

Re: Host: CentOS4, Guest: Debian, apt-get not working, strange problems
type: item
description: Not yet. Will try hard to do that today or tomorrow.
creator: kir
date: 2006-01-09T07:09:41-00:00