rocks add cluster {ip} {num-computes} [cluster-naming=bool] [container-hosts=string] [cpus-per-compute=string] [disk-per-compute=string] [disk-per-frontend=string] [fe-container=string] [fe-name=string] [ip=string] [mem-per-compute=string] [num-computes=string] [virt-type=string] [vlan=string]
Add a VM-based cluster to an existing physical cluster.
arguments
The IP address for the virtual frontend.
The number of compute nodes VMs to associate with the frontend.
parameters
If true it will name the compute nodes not based on the physical node they are allocated but based on the fe-name. If the frontend is called cluster the compute nodes will be named: vm-cluster-0 vm-cluster-1 vm-cluster-2 etc.
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.
The number of CPUs to allocate to each VM compute node. The default is 1.
The size of the disk (in gigabytes) to allocate to each VM compute node. The default is 36.
The size of the disk (in gigabytes) to allocate to the VM frontend node. The default is 36.
Hosting machine for virtual frontend. Defaults to the physical frontend
name to for labeling the frontend. defaults to frontend-0-0-n, where n is assigned
Can be used in place of the ip argument.
The amount of memory (in megabytes) to allocate to each VM compute node. The default is 1024.
Can be used in place of the num-computes argument.
Defines the virtualization type as either paravirtualized (para) or Hardware Virtualized (hvm). KVM supports only hvm if you try to specify something else it will abort.
The VLAN ID to assign to this cluster. All network communication between the nodes of the virtual cluster will be encapsulated within this VLAN. The default is the next free VLAN ID.
examples
Create one frontend VM, assign it the IP address '1.2.3.4', and create 2 compute node VMs.
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] [sync-config=bool] [virt-type=string] [vlan=string]
Add a VM specification to the database.
arguments
One or more physical host names.
The membership to assign to the VM.
parameters
The number of CPUs to assign to this VM. The default is: 1.
A disk specification for this VM. The fist part of the disk is a string used to specify the format of the disk on the domain 0: file is used for raw file format, qcow2 for the qcow2 file fomat, and phy for a physical device The second part of the disk string is a path to the location of the disk on the system up to the first comma (,). The third part is used to indicate the name under which the disk is exposed to the guest OS. The actual device name specified is not guaranteed to map to the device name in the guest OS. Treat it as a device ordering hint. The forth part indicate the type of disk device to emulate valid values are "virtio" (default), "ide", "scsi". The default is: file:/<largest-partition-on-physical-node>/kvm/disks/<vm-name>.vda,vda,virtio
The amount of disk space in gigabytes to assign to the disk specification. The default is: 36.
The IP address to assign to the VM. If no IP address is provided, then one will be automatically assigned.
A MAC address to assign to this VM. If no MAC address is specified, the next free MAC address will be selected.
The amount of memory in megabytes to assign to this VM. The default is: 2048.
Can be used in place of the membership argument.
The name to assign to the VM (e.g., 'compute-0-0-0').
The number of MAC addresses to automatically assign to this VM. The default is 1.
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.
The subnet to associate to this VM. The default is: private.
Decides if 'rocks sync config' should be run after the VM is added. The default is: yes.
Virtualization Type. With the kvm roll only hvm is a valid value.
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="3,4,5"). To not specify a vlan 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="3,none,5". The default is to not assign a vlan ID.
examples
Create a default VM.
Create a VM and allocate 4 GB of memory to it.