[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using emdebian in VirtualBox

Thanks for this quick response. Let me explain to some points what I've
already done and what we need this for.

For another project I tried to reduce the installed data to the bare
minimum and than cleaned the free space with zeros, compressed the *.vdi
with VBoxManage and than compressed with 7zip on maximum. This alos
gives roughly the described ratio. This was done with a simple
non-graphical Debian installation. For our specific purpose this is too
much data that is lying uncompressed on the client computer.

I just read a little bit about debootstrap. Just to make sure I
understand this right. I would start my normal Debian VirtualBox and
mount a new *.vdi file (say 500MB), zero the content, than I run
debootstrap which will install emdebian into this partition. Then I can
change into this system using chroot and install a kernel, bootloader,
vbox-guest-additions and my autostart script. After this I am able to
start the *.vdi on its own and my autostart script will run my executable?
The autostart-script mounts a shared directory and executes a file with
a fixed name there. After this it powers down the VirtualBox.

We have to use VirtualBox because the DC infrastructure (BOINC) requires
this and we can also deploy this on Windows machines. Main purpose is to
save the computation inside the VM using snapshots because the
computation takes some time (up to 1000 hrs) and the client computer may
power down whenever the owner wants to. Compression is not the problem
at all. We just don't want to waste the hard drive space of volunteer
computers with a 1.3 GB *.vdi file plus additional snapshots (which
could range up to 3-4 GB due to the complexity of our application).


Am 15.06.2013 23:53, schrieb Neil Williams:
> On Sat, 15 Jun 2013 23:03:08 +0200
> Christian Beer <djangofett@gmx.net> wrote:
>> for a distributed computing project we want to execute a statically
>> linked executable inside a VirtualBox on different computers. At the
>> moment I use a preinstalled debian VirtualBox that is 1.3 GB
>> uncompressed (or 300 MB compressed). This is not acceptable because we
>> also want to do snapshots of this VirtualBox on the client and not
>> consume too much hard disk space.
> Your first problem is that reducing the amount of installed data inside
> the .vbi will *not* reduce the size of the .ova export. To do that, you
> need to make the virtual disc smaller in the first place. Emdebian
> could mean that you get more free space within the original image but
> it won't change the size of the export except indirectly by reducing
> the size of the original.
> It is theoretically possible to write zeroes over all of the free space
> in the hope that the compression will find it easier to work with this
> compared to the typical free space in an image. If you start with an
> image file of your own, you could ensure that starts with all zeroes
> (dd if=/dev/zero ...) and then use debootstrap to put the system in:
> $ sudo apt-get install emdebian-archive-keyring debootstrap
> $ sudo debootstrap --keyring /usr/share/keyrings/emdebian-archive-keyring.gpg wheezy-grip wheezy-grip-dbs http://www.emdebian.org/grip /usr/share/debootstrap/scripts/wheezy
> That's just theory, whether it actually makes any difference is up to
> you to find out.
>> I got the tip that I could build a VirtualBox with emdebian and thus
>> limit the used disk space. I than tried to understand the documentation
>> and also tried to install using the .iso files. The installation failed
>> because it couldn't find a package.
> The cdimage .iso files are experimental and unofficial. You were also
> probably using the Squeeze images (oldstable) which require extra
> components to be setup to be able to see all the available packages. The extra components were dropped for Wheezy-Grip (Emdebian Grip 3.0).
> You could install standard Debian and then upgrade to Emdebian Grip by
> changing the apt sources. That will save space but will *not* make the
> final size of the compressed image any smaller.
>> I'm relative new to the concept of bootstrapping, fake-root, cross
>> compiling and stuff.
> There is no cross-compiling involved in Emdebian Grip and the other
> flavour of Emdebian (Crush) is no longer updated.
>> Does anyone has a simple guide on how I can create
>> a VirtualBox based installation of emdebian for amd64? I than want to
>> test if our application runs in this environment.
> Short answer: no. I'm not aware of anyone who has done this. As above,
> I think you are misunderstanding how the image will work.
> Do you actually need a VM? Can you get away with a simple chroot which
> will compress much more easily? You only really need virtualisation to
> run a different OS. A Debian, Ubuntu or Fedora system will easily cope
> with a compressed chroot of any of the others. A chroot only contains
> the files, not the free space, which sounds more like what you wanted
> originally.

Reply to: