Subject: RE: [vserver] Migrating 64bit- based host/guest System to a 32bit host-System
From: Joe Gooch <mrwizard@k12system.com>
Date: Tue, 15 Jul 2008 08:43:48 -0400

 Tue, 15 Jul 2008 08:43:48 -0400
Remember, linuxx-vserver is *not* hardware virtualization, like virtualbox, qemu, or
vmware would be.  Vserver does not emulate a cpu, thus the CPU the guest sees is the
one the machine.  You can't run 64 bit binaries on a 32 bit host kernel, or in a chroot
on a 32bit host kernel.  Similarly, you cannot run 64 bit binaries in a guest on a 32bit
host kernel.  Neither the kernel nor the hardware would support it, and vserver doesn't
do anything to change this fact.

If your guest and host are the same OS/Distribution/version, you might be able to get
away with replacing the bin and lib directories with matching copies from the host.

If it's a rpm based distribution, it might not be a bad idea to do a rpm -qa, and then
use urpmi (or equivalent advanced package manager) to re-install the packages in the
list.  (For instance, on mandriva, I would do a rpm -qa and then replace the lib64xxxx
packages with libxxxx packages, and let urpmi download the right packages for my new
architecture.  Since my config files are listed as such in the rpms, it wouldn't remove
my configs.)

As usual, make a backup first. :)

Take care!

Joe


> -----Original Message-----
> From: Raoul Bhatia [IPAX] [mailto:r.bhatia@ipax.at]
> Sent: Tuesday, July 15, 2008 7:51 AM
> To: vserver@list.linux-vserver.org
> Subject: Re: [vserver] Migrating 64bit- based host/guest
> System to a 32bit host-System
>
> Kurt Bendlin wrote:
> > Hello Folks,
> >
> > I have a 64bit host with a 64bit Guest-Sytem. Now I would
> like to migrate the Guest-System to a new Host which is a
> 32Bit-System.
> >
> > When starting the guest on the 32bit-System I encounter the
> follwing error:
> >
> > vserver -vvv 64bit-guest start
> > New network context is 1155
> > Adding 10.0.8.130
> > New security context is 1155
> > vcontext: execvp("/sbin/init"): Exec format error
> >
> > ... Failed to start because init failed.
>
> as expected :) current 64 bit (based on x86) can run 32/64
> bit (again x86). but 32bit x86 (also known as ia-32) cannot
> run 64bit applications.
>
> > Is there a flag/dirty hack on the vserver-site to start up
> this guest? Or how can I make a 64bit-Guest to a 32Bit and
> migrate it to the new location?
>
> start with a clean installation and copy the relevant parts
> of your /etc/ , /var/lib/, /home, /root and other directories
> which contain data.
>
> cheers,
> raoul
> --
>                                                                     
> DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia@ipax.at
> Technischer Leiter
>
> IPAX - Aloy Bhatia Hava OEG         web.          http://www.ipax.at
> Barawitzkagasse 10/2/2/11           email.            office@ipax.at
> 1190 Wien                           tel.               +43 1 3670030
> FN 277995t HG Wien                  fax.            +43 1 3670030 15
>                                                                     
>