Hi, thanks for your interest.
To create a basic data center, you simply need to create the dc.groovy and dcgui.groovy files. Of course, the files need to be a syntactically correct groovy source files.
Your attempt of editing the sample data center is the correct approach. I believe the problem is something with the syntax, or an uninitialized variable. It is hard to tell without the error message.
The most basic data center would be a single switch with a workstation connected to it. Here is the content of the configuration files:
dc.groovy:
def workstation1 = machine {
name "workstation1"
firmware()
terminal()
storage {
boot "${HAX_HOME}/soft/haxos.jar"
network "192.168.2.10"
}
network()
}
def switch1 = machine {
name "switch1"
firmware()
storage {
boot "${HAX_HOME}/soft/haxswitch.jar"
network "192.168.2.0 255.255.255.0"
}
network()
network()
network()
}
wire switch1, 1, workstation1
dcgui.groovy:
If you want to add more workstations, just define them by adding a
def workstationX = machine { ... }
defining a network address in the range
192.168.2.0/24 inside the storage {...} block.
then add a new network interface to the switch using the statement
inside the switch's machine { ... } block.
Finally, connect the new workstation to the switch using
wire switch1, X, workstationX
If you still have problems or you want help with a specific network topology you want to create, feel free to ask. Please post any error messages you might encounter, or even the data center configuration files that do not work for you.
Cheers