---
title: MAAS and Juju in a VM on Ubuntu 12.04 LTS – Part 2
description: Enterprise environments rely on Ubuntu’s LTS (Long-term Support) release.
    Its established two year release cadence and five year security and maintenance
  updates means sysadmins and developers can plan updates and migrations in advance.
  So it comes at no surprise, Ubuntu 12.04 LTS is the leading reference operating
  system for OpenStack  […]
url: https://canonical.com/blog/maas-and-juju-in-a-vm-on-ubuntu-12-04-lts-part-2?format=md
---

1. [Blog](https://canonical.com/blog)
2. Article

---

[Canonical](https://canonical.com/blog/author/canonical "More about Canonical")

19 November 2013

# MAAS and Juju in a VM on Ubuntu 12.04 LTS – Part 2

---

Share the article

Enterprise environments rely on [Ubuntu’s LTS](https://wiki.ubuntu.com/LTS) (Long-term Support) release.   Its established two year release cadence and five year security and maintenance updates means sysadmins and developers can plan updates and migrations in advance. So it comes at no surprise, Ubuntu 12.04 LTS is the leading reference operating system for OpenStack development and deployments.

Ubuntu’s Metal-as-a-Service (MAAS) and Juju tools provide the most mature method of  deploying OpenStack on Ubuntu 12.04 LTS in a High availability [(HA) configuration](https://wiki.ubuntu.com/ServerTeam/OpenStackHA), with an established upgrade path to the latest version of OpenStack using [Cloud Archive](https://wiki.ubuntu.com/ServerTeam/CloudArchive).  You get the longevity and stability of Ubuntu LTS with the capability of running the latest OpenStack features.

This blog post shows you how to set up an Ubuntu 12.04 LTS based MAAS cluster with Juju to deploy nodes running Ubuntu 12.04.  In this setup, we use the enterprise standard of Ubuntu 12.04 LTS to deploy the MAAS Controller.

As mentioned in my previous post from a few days ago – “[Interested in MAAS and Juju; Here’s how to try it in a VM](http://insights.ubuntu.com/resources/article/interested-in-maas-and-juju-heres-how-to-try-it-in-a-vm/)”, Juju coupled with MAAS enables the deployment of services on baremetal hardware.  Since many of us do not have ready access to idle hardware, in this post, we will virtualize our baremetal servers to form our MAAS cluster (again, the irony is not lost 🙂 ).

For the record, this is not a production setup, but it provides a hands-on approach that is useful to understand MAAS and Juju functionality along with their complementary relationship.  This post supplements the existing MAAS and Juju documentation.  For that and more information on Juju and MAAS please visit [juju.ubuntu.com](https://juju.ubuntu.com/) and [maas.ubuntu.com](https://maas.ubuntu.com/).

**Prerequisites:**

* Have a Ubuntu Desktop (host machine) with external network access.
* Download and install Virtual Machine Manager (VMM) on to your host machine.
* [Download Ubuntu Server 12.04 64-bit](http://www.ubuntu.com/download/server) iso image.

**Step 1: Create your MAAS network in VMM**

* Edit -> Connection details
* Select the Virtual Networks tab
* Click on the ‘+’ to add a network and go through the wizard setting:

  + Name: maas
  + Network: new subnet (Make sure it doesn’t conflict with physical network or any other virtual networks!)
  + DISABLE DHCP (it’s enabled by default)
  + NAT (Do not bridge or host-only this network because you need to download pxe images later)

**Step 2: Create MAAS Controller**

* Create a new virtual machine via VMM and install it from the Ubuntu Server 12.04 LTS  image.

  + Suggested specs of CPU: 1, RAM: 1GB, Disk space 30GB.
  + Select the ‘maas’ network from Step 1:
* At Ubuntu Server boot, select “Install Ubuntu Server” and run through a default Ubuntu server installation.
* Tip!  DHCP will fail (as expected since we turned off KVM’s DHCP server earlier) so configure manually.  Give an IP address in the range you selected for your ‘maas’ network but don’t use .1 since it’s reserved for KVM’s virtual switch.  You can use the default entries provided by the installer for the remainder of the install, but this is subject to your environment.
* Once Ubuntu server is installed, login to the system and add the [Cloud Tools Archive](https://wiki.ubuntu.com/ServerTeam/CloudToolsArchive) repository

    sudo add-apt-repository cloud-archive:tools

Tip!  If you receive  “sudo: add-apt-repository: command not found,”  try “sudo apt-get install python-software-properties” and try the above command again.

    sudo apt-get update

* Install MAAS packages from the Cloud Tools Archive

    sudo apt-get install maas

* Finish the MAAS node installation as suggested in the Install Packages section of the Install packages from the archive [MAAS page](http://maas.ubuntu.com/docs/install.html#pkg-install).

**Step 3: Configure MAAS Controller**

* Log into the MAAS controller via KVM console (remember, it’s behind NAT) and run

sudo maas createsuperuser

It is best to accept the default login name of root.

* Tip! Depending on your network speed it can take some time to download all supported Ubuntu images.  Here’s how to download just the Ubuntu 12.04 Precise image:

  + As sudo, edit the /etc/maas/import\_pxe\_files file as shown below and run the command to download the pxe files:

sudo maas-import-pxe-files

Tip!  Check in /var/lib/maas/ephemeral/precise/ephemeral for the downloaded precise images.

* set up SSH tunnel

ssh -R 8080:localhost:80 <your\_username>@<your\_desktop>

* Open a web browser and go to <http://localhost:8080/MAAS> and you should be able to log in.

**Step 4: Configure the MAAS Controller network**

* Follow the instructions on the [MAAS Cluster Configuration page](http://maas.ubuntu.com/docs/cluster-configuration.html).
* You will have to fill in Broadcast, Router and IP range details.
* Configure the cluster to manage DHCP and DNS and run:

    sudo service maas-dhcp-server restart

    sudo service mas-pserv restart
**Step 5: Add node(s) to MAAS**

* Create another KVM instance and add it to the ‘maas’ network.
* Install from your Ubuntu 12.04 LTS Server ISO and select “Multiple server install with MAAS”.  Optionally, simply create a new VM, selecting the option “Network Boot (PXE)”. This will cause this new VM to PXE Boot from MAAS and enlist itself.
* Tip! During DHCP discovery, the node should receive an IP address within your specified IP range which you established in Step 4.
* Select “Specify MAAS by name or address” and enter your MAAS Controller information
* Tip! It’s normal for the node to reboot (this is part of the MAAS node enlistment step) and register itself via cloud\_init.
* Find the declared node in the MAAS GUI

* Tip!  Set Network (PXE) as the first boot option and Hard Disk as second option for the declared node via VMM.
* Commission the node by selecting “Commission selected nodes” from the Bulk action dropdown menu and place a checkmark next to the newly declared node e.g. ‘xbeqp.master’ in my example:

* The screen will update to show progress.  The node will shutdown during the commissioning step.

* I have not configured wake-on-LAN in this setup (it’s outside the scope of this post) so you need to manually boot the node to complete the commissioning process. The node should then move to “Ready” status in a matter of minutes.  The node will shut down again once it’s in the “Ready” state.

* You can add additional nodes by repeating the process above.
* Tip!  Use the fast installer to save some serious node deployment time.   Add the “use-fastpath-installer” tag to the node, or click the “Use the fast installer” button on the node page of the MAAS GUI.

**Step 6: Set up Juju**

Much of this section is already discussed in the existing documentation.  So I’ve tried to highlight the areas not covered in the existing publications that is specific to this setup.

Juju install

* Follow the published [install](https://juju.ubuntu.com/install/) and [quick-start guide](http://maas.ubuntu.com/docs/juju-quick-start.html) to configure and run Juju.  Remember we are installing the juju-core package from the Cloud Tools Archive.
* In this setup, we are only installing nodes with Ubuntu 12.04 (“precise”)

Juju bootstrap

* Once you’ve run “juju bootstrap –upload-tools” from the MAAS Controller, the MAAS GUI will show the node as allocated (a section of the pie chart will go from green to light blue) as shown in the two screenshots below.  The first screenshot shows only one node in the MAAS cluster and the other showing multiple nodes in a MAAS cluster.

* Tip!  There is no wake-on-LAN configuration set for the Juju bootstrap so you have to boot the node manually from VMM.  If the command is working, you should see the installation progressing on the node from the VMM graphical console.

Juju status

* Tip!  We need to add the MAAS IP address as a nameserver in /etc/resolv.conf when using Juju otherwise the ‘juju status’ command will timeout.  See <http://maas.ubuntu.com/docs/configure.html#client-side-dns-configuration> for more information.

**Summary**

Congratulations!  You have an Ubuntu 12.04 LTS based MAAS cluster up and running with Juju to deploy nodes running Ubuntu 12.04.  Happy deployment for all your scale-out workloads!

Ameet Paranjape

Canonical Sales Engineer

**Appendix: Wake-on-LAN**

MAAS handles virtual machine power management via the virsh power management type.  You have to manually configure the details for each node in order for MAAS to manage these virtual machines and turn them on/off automatically.

[Get in touch

Interested in running Ubuntu in your organization?](https://ubuntu.com/about/contact-us/form)

## Sign up for our newsletter

Get the latest Canonical news and updates in your inbox.

Work email:

\*I agree to receive information about Canonical's
products and services.

By submitting this form, I confirm that I have read and agree to [Canonical's Privacy Policy](https://canonical.com/legal/dataprivacy).

Sign up

## Share on

---

## Related posts

[### Canonical joins the Open Secure AI Alliance](https://canonical.com/blog/open-secure-ai-alliance)

Canonical is now part of the Open Secure AI Alliance, announced by NVIDIA with partners across cloud computing, cybersecurity, enterprise software, open source foundations, and...

[Canonical](https://canonical.com/blog/author/canonical)

28 August 2026

[### Arduino® VENTUNO™ Q is available for pre-order with Ubuntu pre-installed](https://canonical.com/blog/arduino-ventuno-q-is-available-for-pre-order-with-ubuntu-pre-installed)

London, UK – August 25, 2026 – Following our initial collaboration announcement in March 2026, Canonical and Arduino (a subsidiary of Qualcomm Technologies, Inc.) are excited...

[Canonical](https://canonical.com/blog/author/canonical)

25 August 2026

[### Advantech AOM-2721 is now Ubuntu Certified](https://canonical.com/blog/advantech-aom-2721-ubuntu-certified)

Canonical announces that the Advantech AOM-2721 is officially joining the list of Ubuntu Certified Hardware.

[Mikhail Khazov](https://canonical.com/blog/author/khazov-m)

13 August 2026

[### Canonical integrates NVIDIA Nemotron 3.5 Lightning with Ubuntu for always-on AI agents](https://canonical.com/blog/nvidia-nemotron-3-5-lightning)

Canonical is pleased to announce that NVIDIA’s newly introduced NVIDIA Nemotron 3.5 Lightning, an open, customizable model built for always-on AI agents, is now available on...

[Canonical](https://canonical.com/blog/author/canonical)

11 August 2026
