Daniel P. Berrange
2014-Jul-02 09:29 UTC
Re: [libvirt-users] configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
On Wed, Jul 02, 2014 at 12:56:18AM +0200, Thierry Parmentelat wrote:> Hi again > > Answering my own e-mail on a few points: > > . first off, stupid me, http://libvirt.org/format.html indeed is empty and it seems to be by design, but the subtrees are not, like e.g. > http://libvirt.org/formatdomain.html > > . from this page it seems like using something like > <os> > <type arch='i686'>exe</type> > <init>/sbin/init</init> > </os> > in the guest XML config should do the trickYes, setting arch='i686' should force the container to have a 32-bit personality on x64_64. Likewise for ppc vs ppc64, s390 vs s390x, etc Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Thierry Parmentelat
2014-Jul-13 11:21 UTC
Re: [libvirt-users] configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
Hi again Sorry for the late reaction on this.. So everything seems to work fine for me when using the setting below, except maybe for one little point I was kind of expecting that # virsh -c lxc:/// lxc-enter-namespace my_32bits_vm ... would run in a 32bits environment too, but from what I can see it is not the case I take it it can be argued, reading the documentation for lxc-enter-namespace again, that might well be the intended behaviour In this case I would argue it would make a lot of sense to have either : (a) lxc-enter-namespace to do the right thing personality-wise as well (possibly through an option if there are legacy concerns) or (b) a virsh function/command that can help retrieve the right personality like e.g. virsh -c lxc:/// personality the_vm that would return either linux32 or linux64 so it would be possible to run $(virsh -c lxc:/// personality the_vm) virsh -c lxc:/// lxc-enter-namespace the_vm — /usr/bin/env yum groupinstall ... Or is there something else available already that I am missing altogether ? Thanks — Thierry On 02 Jul 2014, at 11:29, Daniel P. Berrange <berrange@redhat.com> wrote:> On Wed, Jul 02, 2014 at 12:56:18AM +0200, Thierry Parmentelat wrote: >> Hi again >> >> Answering my own e-mail on a few points: >> >> . first off, stupid me, http://libvirt.org/format.html indeed is empty and it seems to be by design, but the subtrees are not, like e.g. >> http://libvirt.org/formatdomain.html >> >> . from this page it seems like using something like >> <os> >> <type arch='i686'>exe</type> >> <init>/sbin/init</init> >> </os> >> in the guest XML config should do the trick > > Yes, setting arch='i686' should force the container to have a 32-bit > personality on x64_64. Likewise for ppc vs ppc64, s390 vs s390x, etc > > Regards, > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Daniel P. Berrange
2014-Jul-14 09:23 UTC
Re: [libvirt-users] configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
On Sun, Jul 13, 2014 at 01:21:57PM +0200, Thierry Parmentelat wrote:> Hi again > > Sorry for the late reaction on this.. > > So everything seems to work fine for me when using the setting below, except maybe for one little point > > I was kind of expecting that > # virsh -c lxc:/// lxc-enter-namespace my_32bits_vm ... > would run in a 32bits environment too, but from what I can see it is not the case > > I take it it can be argued, reading the documentation for lxc-enter-namespace again, that might well be the intended behaviour > > In this case I would argue it would make a lot of sense to have either : > (a) lxc-enter-namespace to do the right thing personality-wise as well (possibly through an option if there are legacy concerns) > or (b) a virsh function/command that can help retrieve the right personality > like e.g. > virsh -c lxc:/// personality the_vm > that would return either linux32 or linux64 so it would be possible to run > $(virsh -c lxc:/// personality the_vm) virsh -c lxc:/// lxc-enter-namespace the_vm — /usr/bin/env yum groupinstall ... > > Or is there something else available already that I am missing altogether ?This is something I've never thought about. Since the binary being executed is inside the root of the container though, it would make sense to use the same personality as the container. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Maybe Matching Threads
- Re: configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
- Re: configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
- configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
- Re: oddity with lxc-enter-namespace
- Re: dropping capabilities in lxc containers