OpenVZ Forum


Home » General » Support » *SOLVED* Live-cd issues
*SOLVED* Live-cd issues [message #13342] Fri, 25 May 2007 06:20 Go to next message
kingneutron is currently offline  kingneutron
Messages: 30
Registered: May 2007
Location: NE IL, USA
Member
Update: I found this link:
http://wiki.openvz.org/Resource_shortage

--Issued (guest) ' cat /proc/user_beancounters ' and noticed 13 failures for shmpages:

            shmpages           8192       8192       8192       8192         13


--Issued (host) ' vzctl set 101 --shmpages $((8192*8)):$((8192*8)) --save '

Guest:
Knoppix:/proc# cat user_beancounters
Version: 2.5
       uid  resource           held    maxheld    barrier      limit    failcnt
      101:  kmemsize        1236508    1577968    2752512    2936012          0
            lockedpages           0          0         32         32          0
            privvmpages       17368      20976      49152      53575          0
            shmpages          16706      17082      65536      65536         13


--Reran apt-get install and it went OK.

--Still dunno how to check disk-space from within guest tho, or why this resource mattered??

=====

Host: Dual-core Pentium-D @ 2660MHz with 2048MB RAM

--Using the latest OpenVZ/Knoppix Live-cd from lwn.net link
( http://lwn.net/Articles/234354/ )

( I have fairly extensive experience with vmware WS / server, but none so far with openvz except for what's on the CD and wiki )

Host:
1 vzctl create 101 --ostemplate debian-3.1-i386-minimal
2 vzctl start 101
3 vzctl exec 101 'ps ax'
4 echo 1 > /proc/sys/net/ipv4/ip_forward
5 ifconfig
6 ifconfig -a
7 ifconfig venet0 up
8 ifconfig
9 vzctl set 101 --ipadd 192.168.2.227 --save
10 ping 192.168.2.227

In guest, I set up access to my local Squid proxy:

11 ping 192.168.2.250
12 export http_proxy=http://192.168.2.250:3128
13 export ftp_proxy=http://192.168.2.250:3128
14 apt-get update # Works OK
15 apt-get install joe mc screen

--Installing extra packages bombs out with "out of disk space" error.

[[
The following extra packages will be installed:
libc6 libglib2.0-0 libgpmg1 libncurses5 libncursesw5 libslang2
tzdata
Suggested packages:
locales glibc-doc gpm perl mime-support zip unzip bzip2 links
w3m lynx arj
Recommended packages:
libglib2.0-data
The following NEW packages will be installed:
joe libglib2.0-0 libgpmg1 libncursesw5 libslang2 mc screen
tzdata
The following packages will be upgraded:
libc6 libncurses5
2 upgraded, 8 newly installed, 0 to remove and 104 not upgraded.
Need to get 9737kB of archives.
After unpacking 12.0MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ftp.freenet.de stable/main tzdata 2007b-1 [354kB]
Get:2 http://ftp.freenet.de stable/main libc6 2.3.6.ds1-13 [4700kB]
Get:3 http://ftp.freenet.de stable/main libncursesw5 5.5-5 [320kB]
Get:4 http://ftp.freenet.de stable/main screen 4.0.3-0.3+b1 [587kB]
Get:5 http://ftp.freenet.de stable/main libncurses5 5.5-5 [300kB]
Err http://ftp.freenet.de stable/main libncurses5 5.5-5
Error writing to output file - write (28 No space left on device)
Get:6 http://ftp.freenet.de stable/main libslang2 2.0.6-4 [415kB]
Err http://ftp.freenet.de stable/main libslang2 2.0.6-4
Error writing to output file - write (28 No space left on device)
Get:7 http://ftp.freenet.de stable/main libgpmg1 1.19.6-25 [50.9kB]
Err http://ftp.freenet.de stable/main libgpmg1 1.19.6-25
Error writing to output file - write (28 No space left on device)
Get:8 http://ftp.freenet.de stable/main joe 3.5-1.1 [368kB]
Err http://ftp.freenet.de stable/main joe 3.5-1.1
Error writing to output file - write (28 No space left on device)
Get:9 http://ftp.freenet.de stable/main libglib2.0-0 2.12.4-2 [504kB]
Err http://ftp.freenet.de stable/main libglib2.0-0 2.12.4-2
Error writing to output file - write (28 No space left on device)
Get:10 http://ftp.freenet.de stable/main mc 1:4.6.1-6 [2137kB]
Err http://ftp.freenet.de stable/main mc 1:4.6.1-6
Error writing to output file - write (28 No space left on device)
Fetched 5961kB in 22s (260kB/s)
Failed to fetch http://ftp.freenet.de/debian/pool/main/n/ncurses/libncurses5 _5.5-5_i386.deb Error writing to output file - write (28 No space left on device)
Failed to fetch http://ftp.freenet.de/debian/pool/main/s/slang2/libslang2_2. 0.6-4_i386.deb Error writing to output file - write (28 No space left on device)
Failed to fetch http://ftp.freenet.de/debian/pool/main/g/gpm/libgpmg1_1.19.6 -25_i386.deb Error writing to output file - write (28 No space left on device)
Failed to fetch http://ftp.freenet.de/debian/pool/main/j/joe/joe_3.5-1.1_i38 6.deb Error writing to output file - write (28 No space left on device)
Failed to fetch http://ftp.freenet.de/debian/pool/main/g/glib2.0/libglib2.0- 0_2.12.4-2_i386.deb Error writing to output file - write (28 No space left on device)
Failed to fetch http://ftp.freenet.de/debian/pool/main/m/mc/mc_4.6.1-6_i386. deb Error writing to output file - write (28 No space left on device)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
]]

df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
simfs                  1048576         0   1048576   0% /
proc                         0         0         0   -  /proc
sysfs                        0         0         0   -  /sys
devpts                       0         0         0   -  /dev/pts
tmpfs                  1035264         0   1035264   0% /dev/shm


mount
simfs on / type simfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)


--How do you tell how much disk space the guest has, from in-guest? Any advice? TIA

--BTW, I couldn't get networking in-guest when the openvz CD was booted from within vmware ws 5.5.4. This was all done after rebooting the livecd natively, on the bare HW.

[Updated on: Sat, 26 May 2007 12:31] by Moderator

Report message to a moderator

Re: Live-cd issues [message #13353 is a reply to message #13342] Fri, 25 May 2007 08:10 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

Thank you for your post, it's very important for us to see that people use OpenVZ LiveCD.

About disk space. As you now LiveCD is based on tmpfs, so all VE's files are in memory. Unfortunately at the moment vzquota doesn't support tmpfs: http://bugzilla.openvz.org/show_bug.cgi?id=558
This is why you see zeroes in df output. A workaround for it is to disable vzquota on OpenVZ LiveCD in /etc/vz/vz.conf:
[vass@white ~]$ cat /etc/vz/vz.conf | grep DISK_QUOTA
DISK_QUOTA=yes # << change to "no:
Then you'll be able to see the diskspace of HN from VE. On usual OpenVZ installation (not LiveCD) it leads to the disadvantage: VE can use any amount of disk space. But on LiveCD OVZ disk quota doesn't work => so no disadvantages. Wink

HTH,
Vasily.
Re: Live-cd issues [message #13391 is a reply to message #13353] Fri, 25 May 2007 12:41 Go to previous messageGo to next message
kingneutron is currently offline  kingneutron
Messages: 30
Registered: May 2007
Location: NE IL, USA
Member
W00t, thanks. Smile

Hope this gets updated in the doc for the next Livecd rev; it would be a good idea to update it on the Web for the livecd in the meantime. Wink

Can you indicate How to create the initial image with decent shmpages in the 1st place, and if/how to give a Guest a DHCP address?

TIA

// BTW, nice job on the live-cd. Smile I've been bugging vmware about doing something like this for *months* with Player.

Right now I'm interested in openvz for Linux host -> Linux guest implementations, as it looks like the resource requirements are *much* less per-guest.

Where can I DL guest templates for such things as latest Debian stable (Etch), and Centos 5? Any support for 64-bit guests and different kernels?

Also -- (sorry for all teh questions, I get enthusiastic easily Wink ) -- is anyone writing a Webmin frontend / monitor for openvz config?
Re: Live-cd issues [message #13422 is a reply to message #13391] Sat, 26 May 2007 12:31 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello, you wrote:
Quote:

Hope this gets updated in the doc for the next Livecd rev; it would be a good idea to update it on the Web for the livecd in the meantime.
Ahem... I thought this fact is mentioned in docs: http://wiki.openvz.org/Download_live_CD#Limitations

But you're right it isn't mentioned on the page, that appears after CD boot. Well, can you please add this information to http://wiki.openvz.org/Basic_operations_in_OpenVZ?
Thanks in advance!

You wrote:
Quote:

Can you indicate How to create the initial image with decent shmpages in the 1st place, and if/how to give a Guest a DHCP address?

You can use this article: http://wiki.openvz.org/Creating_OpenVZ_LiveCD. You don't need to repeat all actions, if you have OpenVZ livecd. Only extract KNOPPIX compressed image that is on CD, chroot to it and increase shmpages default limit (it's located somethere in vzctl files).

As concerns DHCP. You should use veth instead venet device in VE and then everything is as usual: dhcp-client in VE.

If you will have additional questions, please post them as separate threads, because initial problem is cleared.

Thank you,
Vasily.
icon14.gif  Re: Live-cd issues [message #13473 is a reply to message #13422] Sun, 27 May 2007 21:58 Go to previous messageGo to next message
kingneutron is currently offline  kingneutron
Messages: 30
Registered: May 2007
Location: NE IL, USA
Member
K, thanks. I gotcha covered; the wiki has now been updated. Smile
Re: Live-cd issues [message #13477 is a reply to message #13473] Mon, 28 May 2007 05:52 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Thank you! Wink
Previous Topic: *SOLVED* Working with vlan's?
Next Topic: E: You don't have enough free space in /var/cache/apt/archives/.
Goto Forum:
  


Current Time: Wed Aug 28 04:23:37 GMT 2024

Total time taken to generate the page: 0.03420 seconds