Homelab: Can I setup open stack on couple of VMs on single host?

Hi all,

Anyone aware of some nice sources for planning and building a small scale open stack homelab or any canonical portfolio lab in general ? I got repurposed desktop that is now Proxmox host and my hands are twitching for build couple of VMs in clustered environment. After downsizing I got down to 12 threads, 64 gigs of memory and 15 TB md raid 5. Because it is not that fast I use nvmes for VM storage and spinning rust for home media library and backup target.Any suggestions are more than welcome. My main priorities are openstack and k8s

1 Like

Hi,

For the case of OpenStack, I believe this a good starting point for you - https://canonical-openstack.readthedocs-hosted.com/en/latest/tutorial/get-started-with-openstack/

2 Likes

I think that guide and the other one at https://ubuntu.com/tutorials/install-openstack-on-your-workstation-and-launch-your-first-instance#1-overview needs some more explaining text or something. I tried on three separate environments and they all failed at the sunbeam bootstrap step. Maybe you missed to mention some prereq steps. Aren’t this supposed to work in VMs?
I tried in Multipass even and it fails there too.

In QEMU I get this error (one I only get with your openstack)
Error: ERROR provisioning failed, removing machine 0: subprocess encountered error code 1
ERROR error cleaning up machine:
ERROR subprocess encountered error code 1

Hi @magnusajber,

This looks like a qemu failure to provision machine inside the VM. Few steps to help debug this

List the installed versions

snap list

Please check the following status

juju switch admin/openstack-machines

juju machines
Machine State Address Inst id Base AZ Message
0 started 10.x.x.x manual:10.x.x.x ubuntu@24.04 Manually provisioned machine

Most likely the above machine is failing to provision in your environment

Please check the bootstrap logs from the latest failed log to confirm why provisioning fails on your platform

less ~/snap/openstack/common/logs/sunbeam-20260105-053704.433329.log

$ snap list
Name       Version         Rev    Tracking          Publisher   Notes
core22     20251125        2216   latest/stable     canonical✓  base
core24     20251210        1267   latest/stable     canonical✓  base
juju       3.6.13          33655  3.6/stable        canonical✓  -
lxd        5.21.4-de343be  37395  5.21/stable       canonical✓  -
openstack  2024.1          828    2024.1/candidate  canonical✓  -
snapd      2.73            25935  latest/stable     canonical✓  snapd
$ juju machines
Machine  State    Address  Inst id                 Base          AZ  Message
0        pending           manual:192.168.122.127  ubuntu@24.04      Manually provisioned machine

the log was long, but i grabbed the last failing part.

07:07:54,946 sunbeam.clusterd.service DEBUG [get] http+unix://%2Fvar%2Fsnap%2Fopenstack%2Fcommon%2Fstate%2Fcontrol.socket/local/certpair/server, args={'allow_redirects': True}
07:07:54,947 urllib3.connectionpool DEBUG http://localhost:None "GET /local/certpair/server HTTP/1.1" 200 1177
07:07:54,948 sunbeam.clusterd.service DEBUG Response(<Response [200]>) = /* REDACTED */
07:07:54,948 sunbeam.clusterd.service DEBUG [get] http+unix://%2Fvar%2Fsnap%2Fopenstack%2Fcommon%2Fstate%2Fcontrol.socket/1.0/config/ProxySettings, args={'allow_redirects': True}
07:07:54,950 urllib3.connectionpool DEBUG http://localhost:None "GET /1.0/config/ProxySettings HTTP/1.1" 200 148
07:07:54,950 sunbeam.clusterd.service DEBUG Response(<Response [200]>) = {"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":"{\"proxy\": {\"proxy_required\": false}}"}

07:07:54,950 sunbeam.core.common DEBUG Starting step 'Add model openstack-machines'
07:07:54,951 jubilant INFO cli: juju models --controller localhost-localhost --format json --all
07:07:55,136 sunbeam.core.common DEBUG Skipping step Add model openstack-machines
07:07:55,138 sunbeam.core.common DEBUG Starting step 'Add machine'
07:07:55,139 sunbeam.core.juju DEBUG Running command /snap/openstack/828/juju/bin/juju machines -m admin/openstack-machines --format json
07:07:55,370 sunbeam.core.juju DEBUG Command finished. stdout={"model":"openstack-machines","machines":{"0":{"juju-status":{"current":"pending","since":"25 Jan 2026 20:59:54+01:00","life":"dying"},"instance-id":"manual:192.168.122.127","machine-status":{"current":"running","message":"Manually provisioned machine","since":"25 Jan 2026 20:59:54+01:00"},"modification-status":{"current":"idle","since":"25 Jan 2026 20:59:54+01:00"},"base":{"name":"ubuntu","channel":"24.04"},"hardware":"arch=amd64 cores=6 mem=15712M"}}}
, stderr=
07:07:55,370 sunbeam.steps.juju DEBUG Found machines: {'model': 'openstack-machines', 'machines': {'0': {'juju-status': {'current': 'pending', 'since': '25 Jan 2026 20:59:54+01:00', 'life': 'dying'}, 'instance-id': 'manual:192.168.122.127', 'machine-status': {'current': 'running', 'message': 'Manually provisioned machine', 'since': '25 Jan 2026 20:59:54+01:00'}, 'modification-status': {'current': 'idle', 'since': '25 Jan 2026 20:59:54+01:00'}, 'base': {'name': 'ubuntu', 'channel': '24.04'}, 'hardware': 'arch=amd64 cores=6 mem=15712M'}}}
07:07:55,370 sunbeam.core.common DEBUG Running step Add machine
07:08:04,926 sunbeam.steps.juju DEBUG Juju add-machine: expect got regex related to <class 'pexpect.exceptions.EOF'>
07:08:05,26 sunbeam.core.common DEBUG Finished running step 'Add machine'. Result: ResultType.FAILED

found this too. I dont get it. I do same for QEMU and Multipass. I follow this: https://ubuntu.com/tutorials/install-openstack-on-your-workstation-and-launch-your-first-instance#2-install-openstack

and on Multipass i get further than QEMU with same setup.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/provider/local/deployment.py", line 74, in _load_juju_account
    juju_account = JujuAccount.load(snaphelpers.Snap().paths.user_data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/core/juju.py", line 171, in load
    raise JujuAccountNotFound(
sunbeam.core.juju.JujuAccountNotFound: Juju user account not found, is node part of sunbeam cluster yet? /home/sysadm/snap/openstack/828/account.yaml
08:04:45,86 sunbeam.clusterd.service DEBUG [get] http+unix://%2Fvar%2Fsnap%2Fopenstack%2Fcommon%2Fstate%2Fcontrol.socket/1.0/config/JujuController, args={'allow_redirects': True}
08:04:45,96 urllib3.connectionpool DEBUG http://localhost:None "GET /1.0/config/JujuController HTTP/1.1" 503 136
08:04:45,97 sunbeam.clusterd.service DEBUG Response(<Response [503]>) = {"type":"error","status":"","status_code":0,"operation":"","error_code":503,"error":"Database is not yet initialized","metadata":null}

I think I found the problem. I cannot use a minimal ubuntu server and use that guide.

  source:
    id: ubuntu-server-minimal

after I removed it, I got passed the error
Error: ERROR provisioning failed, removing machine 0: subprocess encountered error code 1
ERROR error cleaning up machine:
ERROR subprocess encountered error code 1

I hope I don’t get the timeout error I got on Multipass. Hope and see

nope still error

$ sunbeam cluster bootstrap --accept-defaults
An unexpected error has occurred. Please see https://canonical-openstack.readthedocs-hosted.com/en/latest/how-to/troubleshooting/inspecting-the-cluster/ for troubleshooting information.
Error: Command '['/snap/openstack/828/bin/terraform', 'apply', '-auto-approve', '-no-color']' timed out after 1200 seconds

is there some prereqs that needs to be fulfilled for this to work? I have been trying for like 3 weeks now to get this to work. The guide that you linked doesn’t really tell much on what it needs to complete successfully.
I have tried:
Multipass - fail
QEMU - fail

Both I have tried with standard Ubuntu Server 24.04.3 LTS.

Thanks for sharing the logs. It’s clear that Juju is unable to take control of the machine. It’s most likely an issue that juju is unable to access this machine. Please can you check what is the error in this file

less ~/snap/openstack/common/add_juju_machine_*.log

and also

less /var/log/juju/machine-0.log

thanks @hassahma for responding
I managed to get it to work.
For the first error (error code 1), it seems to have been resolved by removing the ubuntu-server-minimal from the autoinstall. That made so I got further.

Then I got timeout problem. I resolved that by going from 32GiB ram,10 cores and 100GiB to 45GiB,12 cores and 200GiB ( Have a workstation with i9, 22 cores and 96GiB ram)

Openstack seems very needy on resources, especially on my QEMU.

Openstack bootstrap with command

sunbeam cluster bootstrap --accept-defaults --role control,compute,storage

seems to never work for me. It hangs very long on this step before timing out somehow:
Screenshot from 2026-01-29 13-02-36

I only can get it to work without the --role control,compute,storage at the end of that command.
I maxed my VM with all I got and still I don’t get it to complete. It doesnt throw an error though.

Without ‘–role control,compute,storage’, it will install default control and compute roles only. So most likely your storage role is failing. You can check which units are failing by running

juju status -mopenstack-machines

juju status -mopenstack

You can also check the logs of unit that are in error by running

juju debug-log –include unitname –replay

The bootstrap error logs would be here in the directory which will tell why it failed

cd ~/snap/openstack/common/logs/

1 Like


sunbeam log in ~/snap/openstack/common/logs/ shows some error

File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/provider/local/deployment.py", line 74, in _load_juju_account
    juju_account = JujuAccount.load(snaphelpers.Snap().paths.user_data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/core/juju.py", line 171, in load
    raise JujuAccountNotFound(
sunbeam.core.juju.JujuAccountNotFound: Juju user account not found, is node part of sunbeam cluster yet? /home/sysadm/snap/openstack/828/account.yaml
13:47:28,952 sunbeam.clusterd.service DEBUG [get] http+unix://%2Fvar%2Fsnap%2Fopenstack%2Fcommon%2Fstate%2Fcontrol.socket/1.0/config/JujuController, args={'allow_redirects': True}
13:47:28,959 urllib3.connectionpool DEBUG http://localhost:None "GET /1.0/config/JujuController HTTP/1.1" 503 136
13:47:28,959 sunbeam.clusterd.service DEBUG Response(<Response [503]>) = {"type":"error","status":"","status_code":0,"operation":"","error_code":503,"error":"Database is not yet initialized","metadata":null}


13:47:28,959 sunbeam.provider.local.deployment DEBUG Clusterd service unavailable
Traceback (most recent call last):
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/clusterd/service.py", line 158, in _request
    response.raise_for_status()
  File "/snap/openstack/828/lib/python3.12/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http+unix://%2Fvar%2Fsnap%2Fopenstack%2Fcommon%2Fstate%2Fcontrol.socket/1.0/config/JujuController

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/provider/local/deployment.py", line 83, in _load_juju_controller
    return JujuController.load(self.get_client())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/core/juju.py", line 199, in load
    controller = client.cluster.get_config(JUJU_CONTROLLER_KEY)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/clusterd/cluster.py", line 161, in get_config
    return self._get(f"/1.0/config/{key}").get("metadata")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/clusterd/service.py", line 212, in _get
    return self._request("get", path, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/snap/openstack/828/lib/python3.12/site-packages/sunbeam/clusterd/service.py", line 185, in _request
    raise ClusterServiceUnavailableException(
sunbeam.clusterd.service.ClusterServiceUnavailableException: Sunbeam Cluster not initialized
13:47:28,963 sunbeam.clusterd.service DEBUG [get] http+unix://%2Fvar%2Fsnap%2Fopenstack%2Fcommon%2Fstate%2Fcontrol.socket/local/certpair/server, args={'allow_redirects': True}
13:47:28,965 urllib3.connectionpool DEBUG http://localhost:None "GET /local/certpair/server HTTP/1.1" 503 136
13:47:28,965 sunbeam.clusterd.service DEBUG Response(<Response [503]>) = /* REDACTED */
13:47:28,965 sunbeam.provider.local.deployment DEBUG Clusterd service unavailable
Traceback (most recent call last):

Do you have any clue why cinder-volume is failing?

This guide Install OpenStack and launch your first instance | Ubuntu is supposed to be able to handle that, right?
They specified a lot less ram and cpu than what I have. If I exclude the role storage, it works.

The guide does have it in there which it supposed to work for a single server. I have 2-3 months to learn openstack before it is brought in at my work.

@hassahma
I got it to work. I missed the step where you needed to have an extra unpartitioned disk . It simply wasn’t listed in the guide Install OpenStack and launch your first instance | Ubuntu

It was listed in another guide: https://canonical-openstack.readthedocs-hosted.com/en/latest/tutorial/get-started-with-openstack/