Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot launch Ubuntu 22.04 multipass on my Ubuntu 24.04 machine #3911

Open
sjg20 opened this issue Jan 30, 2025 · 5 comments
Open

Cannot launch Ubuntu 22.04 multipass on my Ubuntu 24.04 machine #3911

sjg20 opened this issue Jan 30, 2025 · 5 comments
Labels
bug needs triage Issue needs to be triaged

Comments

@sjg20
Copy link

sjg20 commented Jan 30, 2025

Describe the bug
I am trying to launch Ubuntu 22.04 multipass on my Ubuntu 24.04 machine. But I must be doing something horribly wrong as it just hangs.

To Reproduce
How, and what happened?

  1. multipass start jammy -vvvv

Expected behavior
I expect it to start quickly and give me a shell

Logs
log.txt

Additional info

  • OS: Ubuntu 24.04

  • CPU architecture or model: x86 (amd64)

  • multipass version
    multipass 1.15.0
    multipassd 1.15.0

  • multipass info

  • Name: jammy
    State: Unknown
    Snapshots: 0
    IPv4: --
    Release: --
    Image hash: 610e1d37fe06 (Ubuntu 22.04 LTS)
    CPU(s): --
    Load: --
    Disk usage: --
    Memory usage: --
    Mounts:

  • multipass get local.driver
    qemu

Additional context
Add any other context about the problem here.

I tried to watch the network, but it seems there is no bootp server running. My local network has one on 192.168.4.1 but I'm not sure if multipass is trying to use that or its own?

sudo tcpdump -i mpqemubr0 -n udp port 67 and port 68
libibverbs: Warning: couldn't open config directory '/etc/libibverbs.d'.
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on mpqemubr0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
14:01:02.405819 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:dd:a6:5b, length 277
14:01:06.181737 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:dd:a6:5b, length 277
14:01:13.543157 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:dd:a6:5b, length 277
14:01:28.836497 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:dd:a6:5b, length 277
14:02:01.535738 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:dd:a6:5b, length 277

@sjg20 sjg20 added bug needs triage Issue needs to be triaged labels Jan 30, 2025
@georgeliao
Copy link
Contributor

@sjg20
Sorry that you have encountered this.
I have two wondering.

multipass start jammy -vvvv

This is the command for starting the jammy instance. This implies that have launched an instance jammy and stopped it. Is that the case?

By scanning your log.txt, I noticed

Jan 27 09:20:02 ellesmere dnsmasq[1190049]: failed to create listening socket for 10.165.74.1: Address already in use
Jan 27 09:20:02 ellesmere dnsmasq[1190049]: FAILED to start up
Jan 27 09:20:02 ellesmere multipassd[1189715]: 
                                               dnsmasq: failed to create listening socket for 10.165.74.1: Address already in use
Jan 27 09:20:02 ellesmere multipassd[1189715]: dnsmasq died: Process returned exit code: 2. Ensure nothing is using port 53.

which points to dnsmasq process, do you happen to have other dnsmasq processes which was not closed properly?

@sjg20
Copy link
Author

sjg20 commented Feb 1, 2025

Thanks for the response.

  1. Yes, I started the jammy instance, with 'multipass launch -n jammy 22.04' and it hung. Then I used 'multipass stop jammy' to stop it, then ''multipass start jammy' to try again.

  2. Yes, with libvirt:

ellesmere:~$ ps ax |grep dnsmasq
   3441 ?        S      0:00 /snap/multipass/14086/usr/sbin/dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --domain=multipass --local=/multipass/ --except-interface=lo --interface=mpqemubr0 --listen-address=10.206.166.1 --dhcp-no-override --dhcp-ignore-clid --dhcp-authoritative --dhcp-leasefile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.leases --dhcp-hostsfile=/var/snap/multipass/common/data/multipassd/network/dnsmasq.hosts --dhcp-range 10.206.166.2,10.206.166.254,infinite --conf-file=/var/snap/multipass/common/data/multipassd/network/dnsmasq-ujpdIp.conf
   6110 ?        S      0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
   6112 ?        S      0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
2787470 pts/6    S+     0:00 grep dnsmasq

which is:

$ sudo cat /var/lib/libvirt/dnsmasq/default.conf
##WARNING:  THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
##OVERWRITTEN AND LOST.  Changes to this configuration should be made using:
##    virsh net-edit default
## or other application using the libvirt API.
##
## dnsmasq conf file created by libvirt
strict-order
user=libvirt-dnsmasq
pid-file=/run/libvirt/network/default.pid
except-interface=lo
bind-dynamic
interface=virbr0
dhcp-range=192.168.122.2,192.168.122.254,255.255.255.0
dhcp-no-override
dhcp-authoritative
dhcp-lease-max=253
dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default.hostsfile
addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts

Perhaps the 'bind-dynamic' is a problem?

@georgeliao
Copy link
Contributor

@sjg20
I do no think libvirt is the issue. Many users have libvirt with bind-dynamic, and none have encountered this problem. You can explore two possible directions to troubleshoot.:

  1. It could be some staled multipass processes that have not shutdown properly. Try removing and reinstalling multipass, or manually terminating the multipass and multipass dnsmasq process. Then, restart everything with sudo snap start multipass.multipassd.
  2. If the issue persists, you have to watch the which another process is using the port by using command like sudo lsof -i :53, maybe systemd-resolved is occupying that. If so, temporarily stop the conflicting services and try again.

@sjg20
Copy link
Author

sjg20 commented Feb 4, 2025

After 'snap remove multipass':

 lsof -i :53
COMMAND    PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 2080 systemd-resolve   14u  IPv4  12260      0t0  UDP _localdnsstub:domain 
systemd-r 2080 systemd-resolve   15u  IPv4  12261      0t0  TCP _localdnsstub:domain (LISTEN)
systemd-r 2080 systemd-resolve   16u  IPv4  12262      0t0  UDP _localdnsproxy:domain 
systemd-r 2080 systemd-resolve   17u  IPv4  12263      0t0  TCP _localdnsproxy:domain (LISTEN)
unbound   3244         unbound    3u  IPv6  23153      0t0  UDP ip6-localhost:domain 
unbound   3244         unbound    4u  IPv6  23154      0t0  TCP ip6-localhost:domain (LISTEN)
unbound   3244         unbound    5u  IPv4  23155      0t0  UDP localhost:domain 
unbound   3244         unbound    6u  IPv4  23156      0t0  TCP localhost:domain (LISTEN)
dnsmasq   6674 libvirt-dnsmasq    5u  IPv4  50293      0t0  UDP ellesmere:domain 
dnsmasq   6674 libvirt-dnsmasq    6u  IPv4  50294      0t0  TCP ellesmere:domain (LISTEN)

Then I updated my 24.04 host with 'apt dist-upgrade' and rebooted!

Then install it:

root@ellesmere:/home/sglass# snap install multipass
multipass 1.15.0 from Canonical✓ installed
root@ellesmere:/home/sglass# lsof -i :53
COMMAND     PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd-r  2080 systemd-resolve   14u  IPv4  12260      0t0  UDP _localdnsstub:domain 
systemd-r  2080 systemd-resolve   15u  IPv4  12261      0t0  TCP _localdnsstub:domain (LISTEN)
systemd-r  2080 systemd-resolve   16u  IPv4  12262      0t0  UDP _localdnsproxy:domain 
systemd-r  2080 systemd-resolve   17u  IPv4  12263      0t0  TCP _localdnsproxy:domain (LISTEN)
unbound    3244         unbound    3u  IPv6  23153      0t0  UDP ip6-localhost:domain 
unbound    3244         unbound    4u  IPv6  23154      0t0  TCP ip6-localhost:domain (LISTEN)
unbound    3244         unbound    5u  IPv4  23155      0t0  UDP localhost:domain 
unbound    3244         unbound    6u  IPv4  23156      0t0  TCP localhost:domain (LISTEN)
dnsmasq    6674 libvirt-dnsmasq    5u  IPv4  50293      0t0  UDP ellesmere:domain 
dnsmasq    6674 libvirt-dnsmasq    6u  IPv4  50294      0t0  TCP ellesmere:domain (LISTEN)
dnsmasq   31797          nobody    6u  IPv4 197982      0t0  UDP ellesmere:domain 
dnsmasq   31797          nobody    7u  IPv4 197983      0t0  TCP ellesmere:domain (LISTEN)

$ multipass launch 22.04 -vvv

and it works!

I'm not sure what was wrong.

Thank you for your help!

@sjg20
Copy link
Author

sjg20 commented Feb 4, 2025

Hmm but it seems to be broken on my 24.04 laptop too. I filed an issue in case it helps:

#3917

$ multipass list
list failed: cannot connect to the multipass socket
$ snap remove multipass 

took about 5 minutes

If it is helpful I will keep this laptop in its current state in case you want to login and take a look.

I'm going to remove and install multipass on the laptop....

Hmmm , that fixed it (snap remove multipass, snap install multipass), without any updates or a reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants