Aleksandar Ivanisevic | 1 Mar 2010 12:22
X-Face
Picon
Gravatar

finding out the HN name from inside the VC


Is there a more elegant way of finding the host name or anything about
the host node from inside the container than scripting something in
/etc/vz/conf/vps.mount ?
Michael Stauber | 1 Mar 2010 13:26
Picon
Favicon

Re: finding out the HN name from inside the VC

Hi Aleksandar,

> Is there a more elegant way of finding the host name or anything about
> the host node from inside the container than scripting something in
> /etc/vz/conf/vps.mount ?

Don't know if it helps, but with the commands below you can at least fin out 
the IP of the HN from inside a container:

ping -t 1 -c 1 1.2.3.4 | grep exceed | cut -d " " -f 2

--

-- 
With best regards

Michael Stauber
Mihamina Rakotomandimby | 1 Mar 2010 13:34

Re: Article on LXC

> Scott Dowdle <dowdle@...> :
> Introducing Linux virtual containers with LXC
> http://blogs.techrepublic.com.com/opensource/?p=1289

I heard (need confirmation) that openVZ developpers are more and more
working on LXC development.

Is that true?

--

-- 
       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                +261 34 29 155 34 / +261 33 11 207 36
Philipp Wehrheim | 1 Mar 2010 13:51
Picon

Re: finding out the HN name from inside the VC

Hey,

Aleksandar Ivanisevic schrieb:
> 
> Is there a more elegant way of finding the host name or anything about
> the host node from inside the container than scripting something in
> /etc/vz/conf/vps.mount ?

if you are only searching for the hostname you could use

 cat /proc/sys/kernel/virt_osrelease | sed "s,openvz,$(uname -n),g" >/proc/sys/kernel/virt_osrelease

and

 cat /proc/sys/kernel/virt_osrelease

at the CT side.

cheers
flip
Aleksandar Ivanisevic | 1 Mar 2010 15:14
X-Face
Picon
Gravatar

Re: finding out the HN name from inside the VC

Michael Stauber <mstauber@...>
writes:

> Hi Aleksandar,
>
>> Is there a more elegant way of finding the host name or anything about
>> the host node from inside the container than scripting something in
>> /etc/vz/conf/vps.mount ?
>
> Don't know if it helps, but with the commands below you can at least fin out 
> the IP of the HN from inside a container:
>
> ping -t 1 -c 1 1.2.3.4 | grep exceed | cut -d " " -f 2

Heh, neat ;) Does this actually work with veth, too?
Aleksandar Ivanisevic | 1 Mar 2010 15:23
X-Face
Picon
Gravatar

Re: finding out the HN name from inside the VC

Philipp Wehrheim <flipstar@...> writes:

> Hey,
>
> Aleksandar Ivanisevic schrieb:
>> 
>> Is there a more elegant way of finding the host name or anything about
>> the host node from inside the container than scripting something in
>> /etc/vz/conf/vps.mount ?
>
> if you are only searching for the hostname you could use
>
>  cat /proc/sys/kernel/virt_osrelease | sed "s,openvz,$(uname -n),g" >/proc/sys/kernel/virt_osrelease
>
> and
>
>  cat /proc/sys/kernel/virt_osrelease

I'm using RHEL/Centos kernel so my osrelease looks like 

$ cat /proc/sys/kernel/virt_osrelease
2.6.18-164.11.1.el5.028stab068.3

so your sed doesn't really work, but the general idea is also neat,
although I'm not really sure what side efects can messing with uname
-r have. I guess glibc and others only check the main version so I can
write anythin in there as long as it starts with 2.6.18-, right?
Scott Dowdle | 1 Mar 2010 17:35
Favicon

Re: Article on LXC

Mihamina,

----- "Mihamina Rakotomandimby" <mihamina@...> wrote:
> I heard (need confirmation) that openVZ developpers are more and more
> working on LXC development.
> 
> Is that true?

I don't analyse the mainline Linux kernel periodically to see what developers with an  <at> openvz.org email
address have been contributing so I don't have any figures for you... but Parallels (the company that
sponsors OpenVZ from their Virtuozzo product) has shown up as a top company (in the top 12) and one of their
developers has also been in the top 15 of individual contributors to the mainline kernel on a few releases. 
So generally speaking, they are big contributors to the mainline kernel.

containers are really the combination of many different features in many different subsytems in the
kernel so it may not be obvious that all of the work they contribute is directly related to containers or
LXC.  For example, here are some contributions from the last few weeks:

http://lwn.net/Articles/375565/

http://lwn.net/Articles/373994/

http://lwn.net/Articles/374547/

http://lwn.net/Articles/373513/

So far as real stats, some time ago I had an email conversation with Kir Kolyshkin who is the OpenVZ Project
manager and I asked how to find out what OpenVZ has contributed and he gave me some commandline tips... that
I must admit I haven't followed through on.  The figures he shows in his examples are dated but you get the
idea.  Here's the quote:
(Continue reading)

Marc Aymerich | 1 Mar 2010 19:11
Picon

Re: Article on LXC



On Mon, Mar 1, 2010 at 5:35 PM, Scott Dowdle <dowdle <at> montanalinux.org> wrote:
Mihamina,

----- "Mihamina Rakotomandimby" <mihamina-NTEeVpikYLd60m5Y2ZoSiQ@public.gmane.org> wrote:
> I heard (need confirmation) that openVZ developpers are more and more
> working on LXC development.
>
> Is that true?

I don't analyse the mainline Linux kernel periodically to see what developers with an <at> openvz.org email address have been contributing so I don't have any figures for you... but Parallels (the company that sponsors OpenVZ from their Virtuozzo product) has shown up as a top company (in the top 12) and one of their developers has also been in the top 15 of individual contributors to the mainline kernel on a few releases.  So generally speaking, they are big contributors to the mainline kernel.
 
Just right now I've updated the OpenVz wiki graph that illustrates the number of patches from OpenVZ developers were merged into mainstream Linux kernel. 

 
--
Marc
_______________________________________________
Users mailing list
Users@...
https://openvz.org/mailman/listinfo/users
Galia Lisovskaya | 2 Mar 2010 16:16
Picon

Re: Unable to open pty

Hi! I'm don't find bug traker on your company site, and try send bug
report for any your officer, sorry.

CentOS 5.4, your rpm:

Name        : vzdump                       Relocations: (not relocatable)
Version     : 1.2                               Vendor: Proxmox
Release     : 5                             Build Date: Втр 10 Ноя 2009 09:47:17
Install Date: Втр 02 Мар 2010 17:58:02      Build Host: oahu.maurer-it.com
Group       : Utilities                     Source RPM: vzdump-1.2-5.src.rpm
Size        : 70592                            License: GPL
Signature   : (none)
Packager    : Proxmox Server Solutions GmbH <http://www.proxmox.com/>
URL         : http://www.proxmox.com/
Summary     : OpenVZ backup scripts
Description :
This package contains the vzdump script to backup and restore openvz images.

Does'nt work:

vzdump --snapshot 201
Can't locate PVE/VZDump.pm in  <at> INC ( <at> INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .)
at /usr/sbin/vzdump line 27.
BEGIN failed--compilation aborted at /usr/sbin/vzdump line 27.

And, old vzdump (vzdump-1.1-2) does'nt work if VG or LV has numbers in name:

[root <at> ovz01 ~]# vzdump --snapshot 201
INFO: Starting new backup job - vzdump --snapshot 201
INFO: Starting Backup of VM 201 (openvz)
INFO: status = CTID 201 exist mounted running
ERROR: unable to detect lvm volume group, using 'suspend' mode
INFO: starting first sync /vz/private/201 to /var/tmp/vzdumptmp2111
ERROR: Backup of VM 201 failed - interrupted by signal
[root <at> ovz01 ~]#

[root <at> ovz01 ~]# lvs
  LV   VG    Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  home ovz01 -wi-ao   1,94G
  root ovz01 -wi-ao   3,41G
  swap ovz01 -wi-ao   4,91G
  vz   ovz01 -wi-ao 443,19G
[root <at> ovz01 ~]# vgs
  VG    #PV #LV #SN Attr   VSize   VFree
  ovz01   1   4   0 wz--n- 454,09G 672,00M
[root <at> ovz01 ~]#

I think, it's bad regexp in get_lvm_device() or get_lvm_mapping.
Sorry, don't have skill of developing of Perl (i'm love Python and
bash :)) ), and don't may send patch.

2010/2/16 Dietmar Maurer <dietmar@...>:
>> when i start my container i got an error "Unable to open pty: No such
>> file or directory."
>>
>> I tried to fix it with the following:
>>
>> - - copied /dev from a working comtainer
>> - - vzctl exec 600 update-rc.d -f udev remove
>> - - vzctl exec 600 'dpkg --force-depends --purge udev'
>>
>> - - vzctl exec 600 /sbin/MAKEDEV tty
>> - - vzctl exec 600 /sbin/MAKEDEV pty => /sbin/MAKEDEV: warning: can't
>> read
>> /proc/devices
>>
>> Copied /proc/devices from the hn to vm.
>> No error, but still does not work.
>>
>> The problems started after a dist upgrade in the vm from ubuntu 8.04.4
>> to 9.10.
>>
>> Any ideas ?
>
> Try to run MAKEDEV on the host (cd /var/lib/vz/private/...).
>
> ubuntu 9.10 is not very container friendly :-/
>
> - Dietmar
>
>
>
> _______________________________________________
> Users mailing list
> Users@...
> https://openvz.org/mailman/listinfo/users
>

--

-- 
Galina Lisovskaya
Galia Lisovskaya | 2 Mar 2010 16:17
Picon

Re: Unable to open pty

Sorry, last e-mail not for public mail list :(

2 марта 2010 г. 18:16 пользователь Galia Lisovskaya
<inbox@...> написал:
> Hi! I'm don't find bug traker on your company site, and try send bug
> report for any your officer, sorry.
>
> CentOS 5.4, your rpm:
>
> Name        : vzdump                       Relocations: (not relocatable)
> Version     : 1.2                               Vendor: Proxmox
> Release     : 5                             Build Date: Втр 10 Ноя 2009 09:47:17
> Install Date: Втр 02 Мар 2010 17:58:02      Build Host: oahu.maurer-it.com
> Group       : Utilities                     Source RPM: vzdump-1.2-5.src.rpm
> Size        : 70592                            License: GPL
> Signature   : (none)
> Packager    : Proxmox Server Solutions GmbH <http://www.proxmox.com/>
> URL         : http://www.proxmox.com/
> Summary     : OpenVZ backup scripts
> Description :
> This package contains the vzdump script to backup and restore openvz images.
>
> Does'nt work:
>
> vzdump --snapshot 201
> Can't locate PVE/VZDump.pm in  <at> INC ( <at> INC contains:
> /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
> /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
> /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .)
> at /usr/sbin/vzdump line 27.
> BEGIN failed--compilation aborted at /usr/sbin/vzdump line 27.
>
> And, old vzdump (vzdump-1.1-2) does'nt work if VG or LV has numbers in name:
>
> [root <at> ovz01 ~]# vzdump --snapshot 201
> INFO: Starting new backup job - vzdump --snapshot 201
> INFO: Starting Backup of VM 201 (openvz)
> INFO: status = CTID 201 exist mounted running
> ERROR: unable to detect lvm volume group, using 'suspend' mode
> INFO: starting first sync /vz/private/201 to /var/tmp/vzdumptmp2111
> ERROR: Backup of VM 201 failed - interrupted by signal
> [root <at> ovz01 ~]#
>
> [root <at> ovz01 ~]# lvs
>  LV   VG    Attr   LSize   Origin Snap%  Move Log Copy%  Convert
>  home ovz01 -wi-ao   1,94G
>  root ovz01 -wi-ao   3,41G
>  swap ovz01 -wi-ao   4,91G
>  vz   ovz01 -wi-ao 443,19G
> [root <at> ovz01 ~]# vgs
>  VG    #PV #LV #SN Attr   VSize   VFree
>  ovz01   1   4   0 wz--n- 454,09G 672,00M
> [root <at> ovz01 ~]#
>
> I think, it's bad regexp in get_lvm_device() or get_lvm_mapping.
> Sorry, don't have skill of developing of Perl (i'm love Python and
> bash :)) ), and don't may send patch.
>
>
> 2010/2/16 Dietmar Maurer <dietmar@...>:
>>> when i start my container i got an error "Unable to open pty: No such
>>> file or directory."
>>>
>>> I tried to fix it with the following:
>>>
>>> - - copied /dev from a working comtainer
>>> - - vzctl exec 600 update-rc.d -f udev remove
>>> - - vzctl exec 600 'dpkg --force-depends --purge udev'
>>>
>>> - - vzctl exec 600 /sbin/MAKEDEV tty
>>> - - vzctl exec 600 /sbin/MAKEDEV pty => /sbin/MAKEDEV: warning: can't
>>> read
>>> /proc/devices
>>>
>>> Copied /proc/devices from the hn to vm.
>>> No error, but still does not work.
>>>
>>> The problems started after a dist upgrade in the vm from ubuntu 8.04.4
>>> to 9.10.
>>>
>>> Any ideas ?
>>
>> Try to run MAKEDEV on the host (cd /var/lib/vz/private/...).
>>
>> ubuntu 9.10 is not very container friendly :-/
>>
>> - Dietmar
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users@...
>> https://openvz.org/mailman/listinfo/users
>>
>
>
>
> --
> Galina Lisovskaya
>

--

-- 
Galina Lisovskaya

Gmane