Hi All, Quick question that is slightly OT, but is Xen related. Just got a new server thru the door and have a couple of questions. Am running Xen 3.0.2 on it (dual Xeon HP server with 4GB RAM). Runs like a charm. As its a new machine it came with 2x EM64T Xeons. The Dom0 is a FC5 x86_64 install. My DomUs are mostly FC4 i386 installs (I have an i386 based container of FC4 I use as a template) that I combine with the x86_64 DomU kernel that came with FC5. As mentioned, works fine. One of the key plans for this box is as a place for software developers to compile/build etc, without nasty pieces of software killing the box as a whole. The plan is one VM per team of about 4. My only stumbler is the fact that my VMs naturally announce themselves (uname) as x86_64 machines, however the target for the software is i386 only. Now I know you can set the arch using setarch (and this works as expected) however this only works on a command-by-command basis. I have found out (by reading this list mostly) that you cannot mix kernel architectures within Xen. ie you can''t have a x86_64 Dom0 kernel and mixed x86_64 and i386 DomUs, so I can''t just install a pure 32bit DomU for these dev VMs. Does anyone know a way of setting setarch permanently (rather than running it at every command) or someother cunning plan so that when building, the dev VM will respond with a *i''m an i386 machine* rather than an x86_64. TIA Dan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Dan Hawker > Sent: 01 June 2006 04:21 > To: xen-users@lists.xensource.com > Subject: [Xen-users] Mixed DomU Architectures > > Hi All, > > Quick question that is slightly OT, but is Xen related. > > Just got a new server thru the door and have a couple of questions. > > Am running Xen 3.0.2 on it (dual Xeon HP server with 4GB > RAM). Runs like a charm. As its a new machine it came with 2x > EM64T Xeons. The Dom0 is a FC5 > x86_64 install. My DomUs are mostly FC4 i386 installs (I have > an i386 based container of FC4 I use as a template) that I > combine with the x86_64 DomU kernel that came with FC5. > > As mentioned, works fine. > > One of the key plans for this box is as a place for software > developers to compile/build etc, without nasty pieces of > software killing the box as a whole. The plan is one VM per > team of about 4. > > My only stumbler is the fact that my VMs naturally announce themselves > (uname) as x86_64 machines, however the target for the > software is i386 only. Now I know you can set the arch using > setarch (and this works as > expected) however this only works on a command-by-command basis. > > I have found out (by reading this list mostly) that you > cannot mix kernel architectures within Xen. ie you can''t have > a x86_64 Dom0 kernel and mixed > x86_64 and i386 DomUs, so I can''t just install a pure 32bit > DomU for these dev VMs. > > Does anyone know a way of setting setarch permanently (rather > than running it at every command) or someother cunning plan > so that when building, the dev VM will respond with a *i''m an > i386 machine* rather than an x86_64.If you do "setarch i386 bash", you get a new shell that believes it''s architecture is i686. Anything started from that shell will see i686 as the machine arch. So, if we assume you have logged-in users that work on these machines, it would be easy to just create a bash-i386 script that is exectuable, and contains "setarch i386 bash $0" [or something like that - I''m not a bash programmer], and set bash-i386 to the login shell of the user(s). Now, this doesn''t work for everything, but for users loggin in, it will. If there are other places where you''d like to emulate this, then similar things can be done, but solutions need to be based on what you need to do. -- Mats> > TIA > > Dan > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
How about building a chroot''ed 32bit tree within a domU ? At least this is what I do in Debian for installing and running 32bit packages from within 64bit environment. Dan Hawker wrote:> Hi All, > > Quick question that is slightly OT, but is Xen related. > > Just got a new server thru the door and have a couple of questions. > > Am running Xen 3.0.2 on it (dual Xeon HP server with 4GB RAM). Runs like a > charm. As its a new machine it came with 2x EM64T Xeons. The Dom0 is a FC5 > x86_64 install. My DomUs are mostly FC4 i386 installs (I have an i386 > based container of FC4 I use as a template) that I combine with the x86_64 > DomU kernel that came with FC5. > > As mentioned, works fine. > > One of the key plans for this box is as a place for software developers to > compile/build etc, without nasty pieces of software killing the box as a > whole. The plan is one VM per team of about 4. > > My only stumbler is the fact that my VMs naturally announce themselves > (uname) as x86_64 machines, however the target for the software is i386 > only. Now I know you can set the arch using setarch (and this works as > expected) however this only works on a command-by-command basis. > > I have found out (by reading this list mostly) that you cannot mix kernel > architectures within Xen. ie you can''t have a x86_64 Dom0 kernel and mixed > x86_64 and i386 DomUs, so I can''t just install a pure 32bit DomU for these > dev VMs. > > Does anyone know a way of setting setarch permanently (rather than running > it at every command) or someother cunning plan so that when building, the > dev VM will respond with a *i''m an i386 machine* rather than an x86_64. > > TIA > > Dan > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Yuri Pismerov, System Administrator Armor Technologies (Canada) Inc. P: 905 305 1946 (x.3519) http://www.armorware.net Privacy Protection Guaranteed! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Jun 01, 2006 at 01:06:25PM -0400, Yura Pismerov wrote:> > How about building a chroot''ed 32bit tree within a domU ? > At least this is what I do in Debian for installing and running 32bit > packages from within 64bit environment.The problem, as I understand the OP, is that the software being built checks (something like) uname -m to see if it''s building on a real 32-bit x86 machine. This info comes directly from the kernel rather than through the userland, so it reports itself as 64-bit even though it''s running in a 32-bit userland. A separate-but-related discussion is the (lack of) wisdom of asking the kernel what architecture to build for, rather than (eg) gcc, because of (a) this problem, and (b) the complete lack ability to support cross-compilation. But, if it''s good enough for Xen, it''s good enough for the rest of us. - Matt (who has had to work around this very brain-damage building in 32 bit chroots) -- How many Apple Newton users does it take to change a lightbulb? Foux. There to eat lemons, axe gravy soup. -- Seen on the ''net _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>> How about building a chroot''ed 32bit tree within a domU ? >> At least this is what I do in Debian for installing and running 32bit >> packages from within 64bit environment. > > The problem, as I understand the OP, is that the software being built > checks (something like) uname -m to see if it''s building on a real 32-bit > x86 machine. This info comes directly from the kernel rather than through > the userland, so it reports itself as 64-bit even though it''s running in a > 32-bit userland. > > > A separate-but-related discussion is the (lack of) wisdom of asking the > kernel what architecture to build for, rather than (eg) gcc, because of > (a) > this problem, and (b) the complete lack ability to support > cross-compilation. But, if it''s good enough for Xen, it''s good enough > for the rest of us. > > - Matt > (who has had to work around this very brain-damage building in 32 bit > chroots) >Thanks Mats, Matt & Yuri for your input. Luckily this is still yet into true production use, so have a bit of time. For the moment I am going with Mats'' idea of using "setarch i386 bash" as all of my users ssh (or telnet on very rare occasions) into the machine in question. All I''ve ended up doing is create a wrapper and replaced /bin/bash with this and moved the original bash elsewhere. Rudimentary testing on my part seems to show that it all works as expected, however will get one of the developers to try and do some *real work* on it in the next day or so to ensure it works as expected. Will investigate some more and report in. I have an identical setup but it uses non-x86_64 based Xeons. If all else fails I can always just install a 32-bit distro on it instead. Bizarrely we have another x86_64 machine that my predecessor setup (non-Xen) that runs a x86_64 kernel yet uname reports an i686 architecture. Will have to have a proper look and see how this was achieved. Thanks again Dan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users