Impossible to add virtual machine
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MAAS | Status tracked in 3.6 | |||||
3.4 |
Won't Fix
|
Medium
|
Unassigned | |||
3.5 |
Won't Fix
|
Medium
|
Unassigned | |||
3.6 |
Triaged
|
Medium
|
Unassigned |
Bug Description
I am using maas 3.1.0-10901-
I made sure virtualisation was activated in my bios and kvm-ok is returning :
>> INFO: /dev/kvm exists
>> KVM acceleration can be used
I tried to add a VM using the CLI and the MAAS UI.
I am trying to create VMs in MAAS following this tutorial https:/
>> maas admin vm-host compose $VM_HOST_ID cores=8 memory=2048 architecture=
storage=
I got the message: "VM host does not support composability."
If I try to add a VM manually through the MAAS UI, I have the error message "Error: An architecture is required." (see screenshot attached)
To reproduce this behavior, run the commands below in the terminal (from https:/
# lxd / maas issue. either upgrade lxd or maas to 3.1
sudo snap install --channel=
sudo snap refresh --channel=
sudo snap install jq
sudo snap install maas
sudo snap install maas-test-db
# clone the git repository
cd ~
git clone https:/
# get local interface name (this assumes a single default route is present)
export INTERFACE=$(ip route | grep default | cut -d ' ' -f 5)
export IP_ADDRESS=$(ip -4 addr show dev $INTERFACE | grep -oP '(?<=inet\
sudo sed -i 's/#net.
sudo sysctl -p
sudo iptables -t nat -A POSTROUTING -o $INTERFACE -j SNAT --to $IP_ADDRESS
# LXD init
sudo cat maas-baremetal-
# verify LXD network config
lxc network show lxdbr0
# Wait for LXD to be ready
lxd waitready
# Initialise MAAS
sudo maas init region+rack --database-uri maas-test-db:/// --maas-url http://
sleep 15
# Create MAAS admin and grab API key
sudo maas createadmin --username admin --password admin --email admin
export APIKEY=$(sudo maas apikey --username admin)
# MAAS admin login
maas login admin 'http://
# Configure MAAS networking (set gateways, vlans, DHCP on etc)
export SUBNET=
export FABRIC_ID=$(maas admin subnet read "$SUBNET" | jq -r ".vlan.fabric_id")
export VLAN_TAG=$(maas admin subnet read "$SUBNET" | jq -r ".vlan.vid")
export PRIMARY_RACK=$(maas admin rack-controllers read | jq -r ".[] | .system_id")
maas admin subnet update $SUBNET gateway_
maas admin ipranges create type=dynamic start_ip=
maas admin vlan update $FABRIC_ID $VLAN_TAG dhcp_on=True primary_
maas admin maas set-config name=upstream_dns value=8.8.8.8
# Add LXD as a VM host for MAAS and capture the VM_HOST_ID
export VM_HOST_ID=$(maas admin vm-hosts create password=password type=lxd power_address=https:/
project=maas | jq '.id')
# allow high CPU oversubscription so all VMs can use all cores
maas admin vm-host update $VM_HOST_ID cpu_over_
# create tags for MAAS
maas admin tags create name=juju-
maas admin tags create name=metal comment='This tag should to machines that will be used as bare metal'
### creating VMs for Juju controller and our "bare metal"
# add a VM for the juju controller with minimal memory
maas admin vm-host compose $VM_HOST_ID cores=8 memory=2048 architecture=
storage=
# get the system-id and tag the machine with "juju-controller"
export JUJU_SYSID=$(maas admin machines read | jq '.[]
| select(
| .["system_id"]' | tr -d '"')
maas admin tag update-nodes "juju-controller" add=$JUJU_SYSID
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
Changed in maas: | |
status: | New → Triaged |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.x |
Changed in maas: | |
milestone: | 3.4.x → 3.5.x |
screenshot MAAS UI