NEmu

Network Emulator for Mobile Universes

Documentation - Save and Restore Sessions

NEmu provides the possibility to save/restore a previous session on the same or on a different physical machine.

SaveNemu(dest)

This function saves the current configuration and history respectively in {session directory}/nemu.conf and {session directory}/nemu.hist. Then, builds a sparse gzip tar archive of path dest. If dest is None (default), the session is saved in {session name}.tgz.

RestoreNemu(session, workspace)

Restores a sparse NEmu archive session in workspace

Here is an example of configuartion:

InitNemu(session='nemu.session.plop')

VLine('pp')

VHost('alice', hds=[VFs('debian.img', type='cow')], nics=[VNic()])
VHost('bob', hds=[VFs('debian.img', type='cow')], nics=[VNic()])

Link('alice', 'pp:0')
Link('bob', 'pp:1')

SaveNemu()
DelNemu()

This the configuration in irder to re-use the same previous session:

RestoreNemu('nemu.session.plop.tgz')
ImportNemu('/tmp/nemu.session.plop/nemu.conf')

# Plop session is now restored