on file, which is in xml format. Powering on is also
supported by the command line, but powering off is
not. Our current workaround is to kill the Virtual PC
process, resulting in powering off all Virtual PC VMs
running on a physical host simultaneously.
On top of controlling the VMs, we need two fea-
tures from each virtualization technology: a shared
folder and state saving/resuming capabilities. The
shared folder provides a communication mechanism
between vnec-slave and the routers, see Section 4.2.3.
State saving/resuming is essential to make sure that
the effects of an experiment are not carried over to
the next one and that the VMs can always be powered
on in a specific state, i.e., where the vnec-taskRunner
is active and ready to receive tasks.
VMWare already provides these two features.
Shared folders can be enabled on guest VMs running
recent versions of Windows and Linux, through the
installation of VMWare Tools
4
. This is sufficient as
we only need shared folders with routers. The snap-
shots features of VMWare allows us to always power
on a VM at a specific state (e.g., where the vnec-
taskRunner process is running) and automatically re-
vert back to that state when the VM is powered off.
For Virtual PC, some “hacking” is again required.
Shared folders are no problem with some VMs (suf-
ficient for our routers) through the installation of Vir-
tual Machine Additions
4
. However, Virtual PC only
provides a single saved state and since we close VMs
by killing the process, they cannot automatically be
brought back to their saved state on shutdown. We
circumvent this problem by copying the “.vmc” (con-
taining the vm configuration)and “.vsv” (used to store
the vm state) files when the VM is powered on and
restoring the copied files once the VM is powered off.
Together with the “undo disk” feature, which allows
changes to the VM to be written into a separate file
(which is discarded in our case), we can havethe same
state every time we power on a VM.
4.2.2 Multi-host
Deploying a virtual network across multiple physical
computers is not trivial, especially with the require-
ment that the virtual network be closed from the phys-
ical world (for security reasons) yet remain fully con-
nected. Section 4.2.3 discusses how the vnec-router
module ensures the connectivity of the virtual net-
work. Here we provide more details regarding the
interaction between the physical hosts, i.e., between
the vnec-master and vnec-slave modules.
vnec-master and vnec-slave communicate to-
gether through Java RMI. Upon startup, vnec-master
4
A set of services and drivers enhancing the capabilities
of the guest OS.
reads a configuration file to obtain the list of physi-
cal hosts that can be used for the experiment. Each
physical host is assumed to be running an instance of
vnec-slave. vnec-master first tests if it can communi-
cate with every listed slave. Then, vnec-master builds
the set of VMs available for the experiment by asking
each slave to provide its set of VMs. When the user
starts the experiment, vnec-master informs the corre-
sponding slaves. Moreover, the master registers itself
both as a TaskListener and a PacketListener with all
slaves. The TaskListener interface allows a slave to
update its master regardingthe progress of a task (e.g.,
task completed, outcome available, ...). The Pack-
etListener interface allows a slave to notify its master
that a packet needs to be forwarded to another slave.
During the experiment, the master dispatches tasks to
be executed in the realm of a specific slave. Finally,
once the experiment completes, the master notifies all
the slaves to make sure they are ready to accept a new
experiment.
The master can request a slave to forward a spe-
cific packet to a specific VM. To make sure no secu-
rity breach is created when such a packet transits on
the physical network, it is encrypted using a randomly
generated symmetric key
5
. As a result, it is not pos-
sible for someone (e.g., a virus designer) to generate
a packet in the virtual network such that the data cor-
responding to that packet transiting on the physical
network will actually be malicious.
4.2.3 Router
A router is a VM with three network interfaces run-
ning the vnec-router module. Three is the maximum
number of network interfaces allowed for a VM in
VMWare Workstation and we adopt it as our stan-
dard
6
, hence Topology Rule 2. Routers route traffic
from one network interface to another, but there is
much more to them.
First, routers are responsible for forwarding tasks
from the vnec-slave module running at the physical
level to the vnec-taskRunner module running inside
the host VMs. To perform this, a router monitors a
specific folder shared with its physical host. When-
ever a task needs to be dispatched, it is written in
that folder (by vnec-slave). The router reads the task,
sends it to the corresponding host VM, and writes
back the outcome in the folder for the vnec-slave
to handle. To router communicates with host VMs
through a Java RMI interface implemented by all the
5
A new symmetric key is randomly generated for each
packet and is sent to the receiving host before the encrypted
packet.
6
Virtual PC allows fours network interfaces, but for sim-
plicity we restrict all routers to three.
DCNET 2010 - International Conference on Data Communication Networking
58