Slices are created by (1) creating an XML file that describes the slice's requirements and (2) using the service manager, svm, to contact the relevant entities in the system to obtain tickets and leases and create a network of virtual machines on a set of nodes. Before doing either of the above, you might want to first query the system to see how many nodes are available from the default agent running on dslice.planet-lab.org. You can see how many nodes are being advertised by this agent by using the svm command as shown below:
# svm getads dslice.planet-lab.org 150.135.65.2 150.135.65.3 131.215.45.71 131.215.45.72 128.232.103.203 .... |
A slice XML file currently specifies a slice name, the number of nodes requested, and a lease length (in seconds). The slice name will be the login used to SSH into the nodes in your slice. The number of nodes requested is a hard requirement on the number nodes in your slice. The lease length is the amount of time (in seconds) the resources for your slice will be allocated. (Leases for a slice can be renewed as described in Section 5.2.) The example below creates a slice called oceanstore on 64 nodes with a lease length of two weeks, the current maximum lease length.
<?xml version="1.0" ?> <slice> <name>oceanstore</name> <numnodes>64</numnodes> <leaselen>1209600</leaselen> </slice> |
To request that a slice span a certain set of nodes, use the optional ips tag as shown below. Given a list of n whitespace-delimited node IP addresses in a slice XML file and a request for m nodes (n >= m), the system will attempt to allocate m of the n nodes starting from the beginning of the list and working towards the end until m nodes have been found. (If m nodes cannot be allocated, an error will be reported.) The example below is for a 2-node slice where the two nodes should come from a set of three preferred IP addresses.
<?xml version="1.0" ?> <slice> <name>oceanstore</name> <numnodes>2</numnodes> <leaselen>1209600</leaselen> <ips>141.213.4.201 216.165.109.81 216.165.109.82</ips> </slice> |
Once your slice XML file is created, you then create your slice using the svm command. Suppose your slice XML file is named oceanstore.xml. Your slice would then be created as shown below. Note that this command can take several minutes to complete for all the nodes in your slice. The main reason for this delay is the time it takes to create a new virtual machine on a node. In the future, we plan to add preallocation of virtual machines to speed this up.
# svm createslice oceanstore.xml Success on 12.155.161.147 Success on 152.3.136.3 Success on 128.111.52.62 Success on 131.215.45.71 .... |
svm createslice does three things: (1) it obtains a set of tickets for a set of nodes for your slice through a broker (which in turn contacts an agent), (2) redeems the tickets for leases by contacting each node in the slice, and (3) uses the leases to create virtual machines for each node in the slice.
Two additional flags that can be passed to svm are the -p flag and the -t flag. The -p flag controls the amount of parallelism used by the service manager, specifically the number of threads used. The default value is 16. Increasing this value increases the amount of virtual memory used but can speed things up significantly when creating a slice on many nodes. The -t flag controls the timeout (in seconds) used to establish TCP connections to each of the nodes. If a node is completely unresponsive, using the -t flag can speed things up by returning a quick error, as opposed to waiting for TCP to time out. Here is an example that uses both flags. It specifies that up to 32 threads may be used for communicating with remote nodes and that each TCP connection should wait at most 15 seconds to be established:
# svm -p 32 -t 15 createslice oceanstore.xml Success on 12.155.161.147 Success on 152.3.136.3 Success on 128.111.52.62 Success on 131.215.45.71 .... |
Deleting an existing slice is also done using the svm command. Simply name the slice you wish to delete (i.e., the name of your slice, not the XML file used to create the slice) and svm will authenticate with each node and delete each sliver that is part of your slice. For example:
# svm deleteslice oceanstore Success on 12.155.161.147 Success on 152.3.136.3 Success on 128.111.52.62 Success on 131.215.45.71 .... |