multipass
multipass copied to clipboard
Instance does not return correct fqdn
Describe the bug
Running hostname --long
does not return the instance fqdn.
To Reproduce My commands:
-
multipass launch --name microstack --cpus 4 --memory 16G --disk 50G
-
hostname --long microstack
-
hostname -A microstack.multipass
Expected behavior
I expect hostname --long
to return the instance fqdn
Logs Please provide logs from the daemon, see accessing logs on where to find them on your platform.
Additional info
- OS: Ubuntu 23.10
- multipass 1.12.2 multipassd 1.12.2
- Name: microstack State: Running IPv4: 10.137.160.124 Release: Ubuntu 22.04.3 LTS Image hash: 054db2d88c45 (Ubuntu 22.04 LTS) CPU(s): 4 Load: 0.00 0.02 0.00 Disk usage: 1.4GiB out of 48.4GiB Memory usage: 198.6MiB out of 15.6GiB Mounts: --
-
multipass get local.driver
qemu
Additional context We expose multipass to try sunbeam: https://microstack.run/
But the FQDN setup is not what libvirt is expecting. Libvirt will return microstack
https://github.com/libvirt/libvirt/blob/a5bf2c4bf962cfb32f9137be5f0ba61cdd14b0e7/src/util/virutil.c#L406 .
This can be solved by using a cloud-init:
#cloud-config
fqdn: microstack.multipass
But this is not desirable if an alternative solution is available
Hi @gboutry,
We will give this a think about whether there is a better way to do this. Thanks!
Oh, one thing that is a bit confusing to me is that you are using the qemu
driver for Multipass, but you are referencing libvirt and how it is resolving the hostname. Could you please explain how libvirt is playing into this?
@townsend2010 of course.
The nova-compute service in Sunbeam is using Libvirt, which in turns uses QEMU (which in turn uses KVM).
Hi @gboutry,
Thanks for that info. Ah, so Sunbeam, libvirt
, et. al. are running inside the Multipass instance in a nested environment, correct?
Yes,
We install sunbeam inside the multipass instance.
Libvirtd is running in a snap openstack-hypervisor
installed on that multipass machine.
(Nova-compute is making libvirt calls to Libvirtd, but Nova-compute is inside the same snap)
I have the same problem when installing MicroStack on Ubuntu.
I am following the instructions on: https://microstack.run/#get-started
-
Install Multipass
sudo snap install multipass
-
Get a fresh VM with Ubuntu 22.04 LTS
multipass launch --name microstack --cpus 4 --memory 16G --disk 50G && multipass shell microstack
3.Install MicroStack
sudo snap install openstack
4.Prepare a machine
sunbeam prepare-node-script | bash -x && newgrp snap_daemon
- Bootstrap OpenStack
sunbeam cluster bootstrap --accept-defaults
resulting in:
Error: Host FQDN and Hypervisor hostname perceived by libvirt are different, check
hostname -fand
/etc/hosts file
I'm not the first to experience this problem. The issue has persisted for at least ~2 months? :(