4.1. add

4.1.1. add cluster

rocks add cluster {fqdn} {ip} {num-computes} [container-hosts=string] [cpus-per-compute=string] [disk-per-compute=string] [fqdn=string] [ip=string] [mem-per-compute=string] [num-computes=string] [vlan=string]

Add a VM-based cluster to an existing physical cluster.

arguments

fqdn

The FQDN for the virtual frontend.

ip

The IP address for the virtual frontend.

num-computes

The number of compute nodes VMs to associate with the frontend.

parameters

[container-hosts=string]

A list of VM container hosts that will be used to hold the VM compute nodes. This must be a space-separated list (e.g., container-hosts="vm-container-0-0 vm-container-0-1"). The default is to allocate the compute nodes in a round robin fashion across all the VM containers.

[cpus-per-compute=string]

The number of CPUs to allocate to each VM compute node. The default is 1.

[disk-per-compute=string]

The size of the disk (in gigabytes) to allocate to each VM compute node. The default is 36.

[fqdn=string]

Can be used in place of the fqdn argument.

[ip=string]

Can be used in place of the ip argument.

[mem-per-compute=string]

The amount of memory (in megabytes) to allocate to each VM compute node. The default is 1024.

[num-computes=string]

Can be used in place of the num-computes argument.

[vlan=string]

The VLAN ID to assign to this cluster. All network communication between the nodes of the virtual cluster will be encapulated within this VLAN. The default is the next free VLAN ID.

examples

# rocks add cluster vm.cluster.org 1.2.3.4 2

Create one frontend VM and assign it the name 'vm.cluster.org' with the IP address '1.2.3.4' and create 2 compute node VMs.

4.1.2. add host vm

rocks add host vm {host...} {membership} [cpus=string] [disk=string] [disksize=string] [ip=string] [mac=string] [mem=string] [membership=string] [name=string] [num-macs=string] [slice=string] [subnet=string] [vlan=string]

Add a VM specification to the database.

arguments

host

One or more physical host names.

membership

The membership to assign to the VM.

parameters

[cpus=string]

The number of CPUs to assign to this VM. The default is: 1.

[disk=string]

A disk specification for this VM. The default is: file:/<largest-partition-on-physical-node>/xen/disks/<vm-name>.hda,hda,w

[disksize=string]

The amount of disk space in gigabytes to assign to the disk specification. The default is: 36.

[ip=string]

The IP address to assign to the VM. If no IP address is provided, then one will be automatically assigned.

[mac=string]

A MAC address to assign to this VM. If no MAC address is specified, the next free MAC address will be selected.

[mem=string]

The amount of memory in megabytes to assign to this VM. The default is: 1024.

[membership=string]

Can be used in place of the membership argument.

[name=string]

The name to assign to the VM (e.g., 'compute-0-0-0').

[num-macs=string]

The number of MAC addresses to automatically assign to this VM. The default is 1.

[slice=string]

The 'slice' id on the physical node. Each VM on a physical node has a unique slice number The default is the next available free slice number.

[subnet=string]

The subnet to associate to this VM. The default is: private.

[vlan=string]

The vlan ID to set for each interface. If you supply multiple MACs (e.g., 'num-macs' > 1), you can specify multiple vlan IDs by a comma separated list (e.g., vlan="2,3,4"). To not specify a vlanid for a MAC, use the keyword 'none'. For example, if you want to specify a vlan ID for interface 1 and 3, but not interface 2, type: vlan="2,none,4". The default is to not assign a vlan ID.

examples

# rocks add host vm

Create a default VM.

# rocks add host vm mem=4096

Create a VM and allocate 4 GB of memory to it.

4.1.3. add host vm bootprofile

rocks add host vm bootprofile [host...] [args=string] [kernel=string] [profile=string] [ramdisk=string]

Add a boot profile for virtual a host.

arguments

[host]

List of hosts to add profile definitions. If no hosts are listed, then the global definition for 'profile=name' is added.

parameters

[args=string]

The second line for a pxelinux definition (e.g., append ks initrd=initrd.img ramdisk_size=150000 lang= devfs=nomount pxe kssendmac selinux=0)

[kernel=string]

URL for the kernel associated with this profile (e.g., 'file:///boot/kickstart/xen/vmlinuz')

[profile=string]

Label name for the boot profile. You can see the profile label names by executing: 'rocks list host vm bootprofile [host(s)]'.

[ramdisk=string]

URL for the kernel associated with this profile (e.g., 'file:///boot/kickstart/xen/initrd-xen.iso.gz')

examples

# rocks add host vm bootprofile profile=install kernel="file:///boot/kickstart/xen/vmlinuz"

Add the global 'install' boot profile

# rocks add host vm bootprofile compute-0-0-0 profile=install kernel="http://10.1.1.1/xenkernels/experimental-vmlinuz"

Add the 'install' profile for compute-0-0-0