Offline docs (switch to live docs)                          Full          UI-only         CLI-only

Adding a VM host

A VM host is simply a machine which can run virtual machines (VMs) by allocating resources across the VMs you want to create. If needed, you can overcommit resources, allocating more resources than actually available, so long as you don’t try to use more than the VM host has available at any one time. Once MAAS has enlisted, commissioned, and acquired a newly-added machine, you can deploy it as a VM host. Alternatively, you can create a VM host from a machine you’ve already got running.

[note type=”caution” status=”Warning”] You must configure your network to support a VM host before following the procedures in this section. You will also want to make sure that you have set up SSH (if needed) before you follow any procedures in this section. [/note]

Adding a VM host

After installing MAAS, the ‘KVM’ page is typically empty:

kvm-open-screen"

If you want to add a libvirt or LXD VM host to a machine which is already installed, you can do so with the ‘Add KVM’ button:

new-kvm-add"

Here, ‘Virsh address’ typically looks like the following for libvirt:

qemu+ssh://<vm host IP>/system

of like this for LXD (Beta):

https://10.0.0.100:8443

[note] MAAS will automatically discover and store the resources your VM host contains. Any existing machines will also appear on the ‘Machines’ page, and MAAS will automatically attempt to commission them. [/note]

CLI

If you wish to install and configure a VM host from the command line using libvirt, use the following procedure. Once MAAS has enlisted, commissioned, and acquired a machine, you can deploy it as a VM host:

maas $PROFILE machine deploy <system_id> install_kvm=True

Configuration

VM hosts have several configuration options. Modify these by selecting the ‘Configuration’ tab and clicking ‘Edit’. Options include a VM host’s location, password, network zone, and default resource pool.

pod

Overcommit resources

Overcommitted resources are those allocated beyond what’s available in the physical resource. Using sliders on the configuration page, you can limit whether MAAS will attempt to overcommit CPU and memory. The input fields to the right of the sliders accept floating-point values from 0 to 10, with a default value of 1.

The following shows theoretical examples of these ratios and how they affect physical resource allocation:

kvm-overcommit"

Overcommitting resources allows a user to compose many MAAS-managed machines without worrying about the physical limitations of the host. For example, on a physical host with four cores and 12 GB of memory, you could compose four libvirt machines, each using two cores and 4 GB of memory. This arrangement overcommits the available physical resources. Provided you never run all four VMs simultaneously, you would have all the benefits of MAAS-managed VMs without over-taxing your host.