Commit 0e5290ab authored by Leigh Stoller's avatar Leigh Stoller

Add the ability to "fix" VMs to other nodes in the topology. Prior to

this, you could fix a VM to specific physical node, but not to another
node in the topology. This change allows you to do something like the
following:

set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set v1 [$ns node]
set v2 [$ns node]
set v3 [$ns node]

tb-set-hardware $v1 pcvm
tb-set-hardware $v2 pcvm
tb-set-hardware $v3 pcvm
# Fix the VMs to other nodes in the topology.
tb-fix-node $v1 $n1
tb-fix-node $v2 $n2
tb-fix-node $v3 $n3

# This mix requires vlan encap all around
tb-set-vlink-emulation "vlan"

# A link between the two phys nodes.
set link0 [$ns duplex-link $n1 $n2 100Mb 0ms DropTail]

# A link between the two VMs.
set link1 [$ns duplex-link $v1 $v2 10Mb 0ms DropTail]

# A lan of three physical nodes.
set lan0 [$ns make-lan "$n1 $n2 $n3" 100Mb 0ms]

# A lan of three VMs
set lan1 [$ns make-lan "$v1 $v2 $v3" 10Mb 0ms]

# Lets mix things up.
set link2 [$ns duplex-link $n1 $v2 10Mb 0ms DropTail]
set lan2 [$ns make-lan "$n1 $v2 $n3" 10Mb 0ms]

tb-set-node-os $n1 FEDORA8-OVZ-STD
tb-set-node-os $n2 FEDORA8-OVZ-STD
tb-set-node-os $n3 FEDORA8-OVZ-STD
tb-set-node-os $v1 OPENVZ-STD
tb-set-node-os $v2 OPENVZ-STD
tb-set-node-os $v3 OPENVZ-STD
parent 83ba64ac
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment