Skip to content. | Skip to navigation

Personal tools


You are here: Home / Wiki / Install / Power-Control.Html


Control Hardware

Emulab Installation Documentation

Control Hardware

  • Prev

    Importing and Customizing Images

  • Next

    Setting up Cisco switches

  • Home

Power Controllers

Power controllers make life much easier for testbed admins, allowing remote power cycling of individual nodes in the testbed. Traditionally, Emulab has used controllable power distribution units to do this. But you can also now take advantage of the builtin management interfaces that many server-class machines have (e.g., Dell's DRACs, HP's iLo, or IPMI). If you do not have any such hardware, you should skip this page.

If your nodes support IPMI, see this page for configuring power control and serial-over-LAN (SOL) consoles.

Currently we support a couple of families of power controllers: the serial-controlled BayTech RPC family and the network-controlled APC AP family. There is no guarantee that all models in these families work, but we know that the following models do:

Baytech RPC14
Baytech RPC27
APC AP9210 (deprecated)
APC AP7960
APC AP7941

Basically, any unit that uses the Baytech CLI or the APC MIB should work.


Setting up the power controllers before you add your nodes makes adding the nodes remotely much easier. The process being: power off all nodes, then power on what you want to be the first node. It should show up in the "new node" page on the Emulab web portal. You can then add it as "pc1". Then power on the second node, etc.

Step 0 - Configure the power controller hardware

What happens here depends on the type of power controller.

For IP models (the APC) you need to make sure that they have IP addresses and that SNMP is enabled.

For the RPC serial models, you need to have capture running on the appropriate serial ports so that the power command can connect to them. You also need to ensure that the "status menu" is disabled so that they do not output a full status screen before the command prompt. There is a configuration menu option in the CLI to disable this.

Step 1 - Adding power controllers to the database

For both serial and network-controlled units, you will need to add entries to the 'node' and 'node_type' database tables. For example, you could perform the following in mysql ("mysql tbdb") on boss:

insert into `node_types` (class,type) values ('power','APC');


insert into `node_types` (class,type) values ('power','RPC27');

depending on what you have. You will then need to add an entry to the 'nodes' table for each instance of the power controller you have. Something like:

insert into `nodes` (node_id,type,phys_nodeid,role,priority,
      status,eventstate,op_mode,allocstate) values

'node_id' and 'phys_nodeid' should be identical and be your name of the power controller (e.g. "power1", "power2", etc.). 'type' will be the same as what you added to node_types above. 'role' should always be 'powerctrl'. 'priority' is used to order all nodes in node listings (e.g., in web pages); we pick a high number for power controllers so they will come after regular nodes. Each power controller should have a different value. All other fields should be exactly as shown.

Step 2 - Interfaces and wires table entries

If you have a network power controller, you will need to add entries in the 'interfaces' and 'wires' tables. For interfaces, you also need one line per power controller. For example:

insert into `interfaces` (node_id,IP,mask,interface_type,iface,role)
      values ('powerN','AAA.AAA.AAA.AAA','MMM.MMM.MMM.MMM','','eth0','other');

'node_id' matches that in the nodes table from above. 'IP' and 'mask' reflect the address assigned to the power controller (e.g.,

Wires table entries are strictly informational. You can put them in if you want to keep track of the cable numbers. However, if they are properly entered, you can use snmpit to perform some basic functions on the connected switch ports. A wires table entry looks like:

insert into `wires` (cable,len,type,node_id1,node_id2,card2,port2)
      values (NNN,LLL,'Power','powerN','switchN',MMM,PPP);

'cable' and 'len' are integers that describe the cable number and length. Make them 0 and 0 if you do not care. 'type' should be 'Power'. 'node_id1' should match the 'node_id' from the interfaces/nodes tables. 'node_id2' should be the name (in the nodes table) of the switch the power controller is connected to. 'card2' and 'port2' are integers indicating the module and port on the switch that it is connected to.

Step 3 - Outlets table entries

The final step is to add 'outlets' table entries for all nodes that are controlled by the power controllers. For each node there should be an entry of the form:

insert into `outlets` (node_id,power_id,outlet)
      values ('pcN','powerN',NNN);

where 'node_id' is the name of the node which is being power controlled, 'power_id' is the nodes table name of the power controller that the node is connected to, and 'outlet' is an integer telling which outlet on the power controller the node is connected to. All power controllers we support have outlets numbered 1,2,..N, where N is the maximum number of outlets on the controller (typically 8, 16, or 24). So the value of this field should be from 1 to N.

Note that you have not yet actually added any nodes to the testbed, so you should use the name that you intend to assign to each node when it is added later. The power control subsystem will work during bootstrap without there being state in the database for a node, but it is important that this field eventually match an entry in the 'nodes' table later. It is okay to use placeholder values for 'node_id' in the outlets table and then change them later to match the nodes table entries.

Step 4 - Testing

After all of the state has been added to the database, you can use the 'power' command to test the configuration. If you have serial consoles and have already done the console setup, then you can "console <node>" and then do "power cycle <node>" and see if the machine reboots by looking for the BIOS screen or other bootstrap output. If you do not have serial consoles or have console setup, you will have physically be in front of the machine to see if the outlet properly cycles.

  • Prev

    Importing and Customizing Images

  • Next

    Setting up Cisco switches

  • Home