← Back to team overview

marionnet-dev team mailing list archive

Re: Sister project, GNS3 graphical network simulator, would like to share ideas with Marionnet

 

On Tue, May 17, 2011 at 7:45 PM, Jean-Vincent Loddo
<Jean-vincent.Loddo@xxxxxxxxxxxxxxxxxxxx> wrote:
> Hey Alexey,
>
> I have played this morning with VirtualBox and I like it. I'm seriously
> thinking to support it in Marionnet. It's not so easy but it may be worth
> the trouble.
>
> I still have some minor doubts about the size of the "frontend" snapshots. I
> have tried with an Ubuntu 11.04 as guest (Ubuntu 10.10 as host) following
> your instructions with, I think, a meaningless difference: the virtual disks
> had the extension .vdi (instead of .vhd), and I'm was not able to "detach" a
> disk from the GUI (3.2.8_OSE_r64453) as you suggest. However, the command
> line:
>
> $ VBoxManage modifyhd Ubuntu_11.04_32_bits.vdi --type immutable
>

OK.
In v4.x you may be needed to do this. (plus re-attach it back to
"Linux-Motherimage" VM)

> gave the expected result.
>
> Once the children machine was launched, the size of the snapshot file
> (observed from the host) jumped to 56 Mb immediately, without doing
> anything, just the boot. Can we somehow reduce this initial size? I can't
> understand what those 56 megs are used for. In your opinion, could it be
> useful to switch to a non-journalized filesystem? (I have used ext4 for this
> test).

Hmmm... I am not sure what causes the size to grow, but in general
VirtualBox uses block-level differencing. For example swap partition
(or swap file) can make your differencing images very big, without
good reason.
It needs some study of guest OS behavior.

Tip: Alternatively, you can try filesystem-level differencing
technology, such as UnionFS over VirtualBox Shared Folders, but this
requires separate study. (not related to VirtualBox)
So the read-only layer will be immutable image, but the read-write
layer will be VirtualBox Shared Folders.

> The second question is: what happens when the backend and/or the frontend
> are moved (to another host and/or directories)? In other words, where the
> link between the backend and the frontend is written in the host?

----
The link is the description file (*.vbox, in XML format) of the
"Linux-Motherimage" VM.
In most cases it can be ported flawlessy, but in some cases it may
require editing.

This description file lists all the children (differencing) images,
and it also defines"Linux-Motherimage.vdi" type as immutable image.

To move to a different host, you need to copy VM folders:
Copy to new host:
./Linux-Motherimage/*
./Linux-child-VM01/*
./Linux-child-VM02/*

Check directory paths in the *.vbox description files.

Then, on the target host, add the VMs:
in GUI, Machine->Add "Linux-Motherimage" VM (make sure you add this VM first).
in GUI, Machine->Add "Linux-child-VM01" VM
in GUI, Machine->Add "Linux-child-VM02" VM

This registers VMs with the management layer, and allows you to start
them on new host.

Happy VBoxing !
---
NOTE: Please use v4.x architecture, as it allows to migrate VMs.
VirtualBox v3.x architecture was much less portable, due to use of
global descriptions. v4 uses per VM descriptions, making things more
portable.
v3.x and v4.x architectures are _very_ different.

If you install VirtualBox v4 -- you need to create new VMs, in order
to take advantage of the new v4 architecture. Older VMs can't be
upgraded, so they will work, but won't be portable.
-- 
-Alexey Eromenko "Technologov"


Follow ups

References