Adding a VM host (snap/3.0/UI)
|Snap||CLI ~ UI||CLI ~ UI||CLI ~ UI||CLI ~ UI|
|Packages||CLI ~ UI||CLI ~ UI||CLI ~ UI||CLI ~ UI|
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 over-commit 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.
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.
Six questions you may have:
- How do I configure networking for VM hosts?
- How do I set up SSH when manually adding a VM host?
- How do I add a VM host?
- [How can I view a summary of my VM host project?(#heading–vm-host-project-summary)
- [How can I view resource details for my VM host?(#heading–vm-host-resource-details)
- How do I change VM host settings after I’ve added it?
- How do I over-commit resources on a host?
- How do I add a VM host using MAAS versions below 2.5?
After installing MAAS, the ‘KVM’ page is typically empty:
If you want to add a LXD (or libvirt) KVM host to a machine which is already installed, you can do so with the ‘Add KVM’ button:
Upon selecting “Authenticate” (assuming successful authentication), you will recieve a project selection screen similar to this:
You must either enter a new project name (which cannot contain spaces or special characters), or you must select an existing project. If you’re not really planning on using projects, selecting the “default” project will allow you to continue working as you have in the past.
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.
Each LXD VM host provides a “Project” tab that summarizes the current state of the LXD KVM:
This tab identifies the project, shows its current resource state, and provides the ability to select existing VM hosts and perform specific actions on them – as well as being able to compose new VMs on the spot.
This tab presents a summary of the LXD VM host’s resource usage:
The only interactive option on this tab allows you to map or unmap resource usage to NUMA nodes.
VM hosts have several settings. Modify these by selecting the ‘Settings’ tab and editing items directly. Options include a VM host’s address, password, network zone, resource pool, and memory and CPU overcommit sliders.
Over-committed 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 four theoretical examples of these ratios and how they affect physical resource allocation:
8 physical CPU cores * 1 multiplier = 8 virtual CPU cores
8 physical CPU cores * 0.5 multiplier = 4 virtual CPU cores
32 physical CPU cores * 10.0 multiplier = 320 virtual CPU cores
128GB physical memory * 5.5 multiplier = 704G virtual Memory
Over-committing 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 over commits 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.