Manage individual VM hosts and collections of VM hosts
Note: Always remember to substitute your profile name for $PROFILE
in the command examples given below.
Also note: The pod
endpoint has been deprecated in favour of vm-host
.
Manage individual pods
Manage an individual pod.
Usage
maas $PROFILE pod [-h] COMMAND ...
Command-line options
Option | Effect |
---|---|
-h, --help | show this help message and exit |
Commands
Command | Effect |
---|---|
add-tag | Add a tag to a VM host |
compose | Compose a virtual machine on the host. |
delete | Deletes a VM host |
parameters | Obtain VM host parameters |
read | This operation has been deprecated in favour of 'Virtual- |
machine-host read’. | |
refresh | Refresh a VM host |
remove-tag | Remove a tag from a VM host |
update | Update a specific VM host |
Add a tag to a VM host
Adds a tag to a given VM host.
Usage
maas $PROFILE pod add-tag [--help] [-d] [-k] id [data ...]
Positional arguments
- id
Keyword arguments
Pass each argument as a key-value pair with an equals sign between the key and the value: key1=value1 key2=value key3=value3. Keyword arguments must come after any positional arguments.
Keyword “tag”
Required string: The tag to add.
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Create a new virtual machine
Compose a new machine from a VM host.
Usage
maas $PROFILE pod compose [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Keyword arguments
Pass each argument as a key-value pair with an equals sign between the key and the value: key1=value1 key2=value key3=value3. Keyword arguments must come after any positional arguments.
Keyword “cores”
Optional. The minimum number of CPU cores. Type: Int.
Keyword “memory”
Optional. The minimum amount of memory, specified in MiB (e.g. 2 MiB == 210241024). Type: Int.
Keyword “hugepages_backed”
Optional. Whether to request hugepages backing for the machine. Type: Boolean.
Keyword “pinned_cores”
Optional. List of host CPU cores to pin the VM to. If this is passed, the “cores” parameter is ignored. Type: Int.
Keyword “cpu_speed”
Optional. The minimum CPU speed, specified in MHz. Type: Int.
Keyword “architecture”
Optional. The architecture of the new machine (e.g. amd64). This must be an architecture the VM host supports. Type: String.
Keyword “storage”
Optional. A list of storage constraint identifiers in the form label:size(tag,tag,...), label:size(tag,tag,...)
. For more information please see the CLI VM host management page of the official MAAS documentation. Type: String.
Keyword “interfaces”
Optional. A labeled constraint map associating constraint labels with desired interface properties. MAAS will assign interfaces that match the given interface properties. Type: String.
Format: label:key=value,key=value,...
Keys:
id
: Matches an interface with the specific idfabric
: Matches an interface attached to the specified fabric.fabric_class
: Matches an interface attached to a fabric with the specified class.ip
: Matches an interface whose VLAN is on the subnet implied by the given IP address, and allocates the specified IP address for the machine on that interface (if it is available).mode
: Matches an interface with the specified mode. (Currently, the only supported mode is “unconfigured”.)name
: Matches an interface with the specified name. (For example, “eth0”.)hostname
: Matches an interface attached to the node with the specified hostname.subnet
: Matches an interface attached to the specified subnet.space
: Matches an interface attached to the specified space.subnet_cidr
: Matches an interface attached to the specified subnet CIDR. (For example, “192.168.0.0/24”.)type
: Matches an interface of the specified type. (Valid types: “physical”, “vlan”, “bond”, “bridge”, or “unknown”.)vlan
: Matches an interface on the specified VLAN.vid
: Matches an interface on a VLAN with the specified VID.tag
: Matches an interface tagged with the specified tag.
Keyword “hostname”
Optional. The hostname of the newly composed machine. Type: String.
Keyword “domain”
Optional. The ID of the domain in which to put the newly composed machine. Type: Int.
Keyword “zone”
Optional. The ID of the zone in which to put the newly composed machine. Type: Int.
Keyword “pool”
Optional. The ID of the pool in which to put the newly composed machine. Type: Int.
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Delete a VM host
Deletes a VM host with the given ID.
Usage
maas $PROFILE pod delete [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Keyword arguments
Pass each argument as a key-value pair with an equals sign between the key and the value: key1=value1 key2=value key3=value3. Keyword arguments must come after any positional arguments.
Keyword “decompose”
Optional. Whether to also also decompose all machines in the VM host on removal. If not provided, machines will not be removed. Type: Boolean.
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Obtain VM host parameters
This returns a VM host’s configuration parameters. For some types of VM host, this will include private information such as passwords and secret keys.
Note: This method is reserved for admin users.
Also note: This operation has been deprecated in favour of vm-host read
.
Usage
maas $PROFILE pod parameters [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Read an individual VM
Reads the configuration and details of an individual pod identified by VM host ID.
Usage
maas $PROFILE pod read [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Refresh a VM host
Performs VM host discovery and updates all discovered information and discovered machines.
Usage
maas $PROFILE pod refresh [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Remove a tag from a VM host
Removes a given tag from a VM host.
Usage
maas $PROFILE pod remove-tag [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Keyword arguments
Pass each argument as a key-value pair with an equals sign between the key and the value: key1=value1 key2=value key3=value3. Keyword arguments must come after any positional arguments.
Keyword “tag”
Required. The tag to add. Type: String.
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Update a specific VM host
Update a specific VM host by ID.
Note: A VM host’s type
cannot be updated. The VM host must be deleted and re-added to change the type.
Usage
maas $PROFILE pod update [--help] [-d] [-k] id [data ...]
Positional arguments
- id: VM host ID
Keyword arguments
Pass each argument as a key-value pair with an equals sign between the key and the value: key1=value1 key2=value key3=value3. Keyword arguments must come after any positional arguments.
Keyword “name”
Optional. The VM host’s name. Type: String.
Keyword “pool”
Optional. The name of the resource pool associated with this VM host – composed machines will be assigned to this resource pool by default. Type: String.
Keyword “cpu_over_commit_ratio”
Optional. CPU overcommit ratio (0-10). Type: Int.
Keyword “memory_over_commit_ratio”
Optional. Memory overcommit ratio (0-10). Type: Int.
Keyword “default_storage_pool”
Optional. Default KVM storage pool to use when the VM host has storage pools. Type: String.
Keyword “power_address”
Optional. Address for power control of the VM host. Type: String.
Keyword “power_pass”
Optional. Password for access to power control of the VM host. Type: String.
Keyword “zone”
Optional. The VM host’s zone. Type: String.
Keyword “default_macvlan_mode”
Optional. Default macvlan mode for VM hosts that use it: bridge, passthru, private, vepa. Type: String.
Keyword “tags”
Optional. Tag or tags (command separated) associated with the VM host. Type: String.
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Manage the collection of pods
Manage the collection of all the pods in the MAAS host.
Note: The pods
endpoint has been deprecated in favour of vm-hosts
.
Usage
maas $PROFILE pods [-h] COMMAND ...
Command-line options
Option | Effect |
---|---|
-h, --help | show this help message and exit |
Commands
Command | Effect |
---|---|
create | Create a VM host |
read | List VM hosts |
Create a VM host
Create or discover a new VM host.
Usage
maas $PROFILE pods create [--help] [-d] [-k] [data ...]
Keyword arguments
Pass each argument as a key-value pair with an equals sign between the key and the value: key1=value1 key2=value key3=value3. Keyword arguments must come after any positional arguments.
Keyword “type”
Required. The type of VM host to create: lxd
or virsh
. Type: String.
Keyword “power_address”
Required. Address that gives MAAS access to the VM host power control. For example, for virsh qemu+ssh://172.16.99.2/system
For lxd
, this is just the address of the host. Type: String.
Keyword “power_user”
Required. Username to use for power control of the VM host. Required for virsh
VM hosts that do not have SSH set up for public-key authentication. Type: String.
Keyword “power_pass”
Required. Password to use for power control of the VM host. Required virsh
VM hosts that do not have SSH set up for public-key authentication and for lxd
if the MAAS certificate is not registered already in the LXD server. Type: String.
Keyword “name”
Optional. The new VM host’s name. Type: String.
Keyword “zone”
Optional. The new VM host’s zone. Type: String.
Keyword “pool”
Optional. The name of the resource pool the new VM host will belong to. Machines composed from this VM host will be assigned to this resource pool by default. Type: String.
Keyword “tags”
Optional. A tag or list of tags (comma delimited) to assign to the new VM host. Type: String.
Keyword “project”
Optional. For lxd
VM hosts, the project that MAAS will manage. If not provided, the default
project will be used. If a nonexistent name is given, a new project with that name will be created. Type: String.
Keyword “certificate”
Optional. X.509 certificate used to verify the identity of the user. If certificate
and key
are not provided, and the VM created is LXD type, a X.509 certificate will be created. Type: String.
Keyword “key”
Optional. private key used for authentication. If certificate
and key
are not provided, and the VM created is LXD type, a RSA key will be created. Type: String.
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
List VM hosts
Get a listing of all VM hosts.
Usage
maas $PROFILE pods read [--help] [-d] [-k] [data ...]
Command-line options
Option | Effect |
---|---|
–help, -h | Show this help message and exit. |
-d, --debug | Display more information about API responses. |
-k, --insecure | Disable SSL certificate check |
Last updated 2 days ago.