Second experiences using multipass with libvirt

Hi,
I refer to my former post where things were ok and we sorted out a few things.
I wanted to give multipass another try run to get to replace uvtool for my usual work.
But I realized that --edge as well as --beta seem to no more have the libvirt feature.

the integrated virsh finds nothing

$ multipass.virsh list --all
error: failed to connect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/var/snap/multipass/common/run/libvirt/libvirt-sock': No such file or directory

And indeed $ find /var/snap/multipass/ -name '*sock*' is empty.

Also looking at the processes is odd:

 /snap/multipass/483/bin/multipassd --verbosity debug --logger platform
  \_ dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --interface=mpqemubr0 --listen-address=10.102.8.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/sna
  \_ qemu-system-x86_64 --enable-kvm -hda /var/snap/multipass/common/data/multipassd/vault/instances/discreet-leech/ubuntu-18.04-server-cloudimg-amd64.img -drive file=/var/snap/multipass/common/data/multi

That looks pretty much like non libvirt started guest again - what happened?
Is it an option now that I can’t find?

You need to switch to the libvirt driver:

snap set multipass driver=LIBVIRT

Thanks that was it.
I was confused by

$ sudo snap get multipass
[sudo] password for paelzer: 
error: snap "multipass" has no configuration

But after our discussion we found it only lists non-defaults.
I was able to set it and will continue to use it.

Hmm, we are playing with it now and I wonder if this is a real issue you want to guard:

  1. I’d have expected to deny all but correct options, but any suffix seems ok

  2. configuring faster than expected causes a crash

    [✓]─[paelzer@Keschdeichel:~/work/scons/scons]──[49017]──[12:33 Do Nov 08]──(detached*)*
    $ sudo snap set multipass driver=LIBVIRT
    [✓]─[paelzer@Keschdeichel:~/work/scons/scons]──[49017]──[12:33 Do Nov 08]──(detached*)*
    $ sudo snap set multipass driver=LIBVIRTd
    [✓]─[paelzer@Keschdeichel:~/work/scons/scons]──[49018]──[12:33 Do Nov 08]──(detached*)*
    $ sudo snap set multipass driver=LIBVIRTddd
    [✓]─[paelzer@Keschdeichel:~/work/scons/scons]──[49019]──[12:33 Do Nov 08]──(detached*)*
    $ sudo snap set multipass driver=LIBVIRTdddddd
    error: cannot perform the following tasks:

    • restart of [multipass.multipassd multipass.libvirt-bin] (# systemctl restart snap.multipass.multipassd.service snap.multipass.libvirt-bin.service
      Job for snap.multipass.multipassd.service failed because a fatal signal was delivered causing the control process to dump core.
      See “systemctl status snap.multipass.multipassd.service” and “journalctl -xe” for details.
      )
    • restart of [multipass.multipassd multipass.libvirt-bin] (exit status 1)
      [✗=1]─[paelzer@Keschdeichel:~/work/scons/scons]──[49020]──[12:33 Do Nov 08]──(detached*)*
      $ systemctl status snap.multipass.multipassd.service
      ● snap.multipass.multipassd.service - Service for snap application multipass.multipassd
      Loaded: loaded (/etc/systemd/system/snap.multipass.multipassd.service; enabled; vendor preset: enabled)
      Active: failed (Result: core-dump) since Thu 2018-11-08 12:33:41 CET; 41s ago
      Process: 18350 ExecStart=/usr/bin/snap run multipass.multipassd (code=dumped, signal=SEGV)
      Main PID: 18350 (code=dumped, signal=SEGV)

    Nov 08 12:33:41 Keschdeichel systemd[1]: snap.multipass.multipassd.service: Service hold-off time over, scheduling restart.
    Nov 08 12:33:41 Keschdeichel systemd[1]: snap.multipass.multipassd.service: Scheduled restart job, restart counter is at 1.
    Nov 08 12:33:41 Keschdeichel systemd[1]: Stopped Service for snap application multipass.multipassd.
    Nov 08 12:33:41 Keschdeichel systemd[1]: snap.multipass.multipassd.service: Start request repeated too quickly.
    Nov 08 12:33:41 Keschdeichel systemd[1]: snap.multipass.multipassd.service: Failed with result ‘core-dump’.
    Nov 08 12:33:41 Keschdeichel systemd[1]: Failed to start Service for snap application multipass.multipassd.
    Nov 08 12:33:42 Keschdeichel systemd[1]: snap.multipass.multipassd.service: Start request repeated too quickly.
    Nov 08 12:33:42 Keschdeichel systemd[1]: snap.multipass.multipassd.service: Failed with result ‘core-dump’.
    Nov 08 12:33:42 Keschdeichel systemd[1]: Failed to start Service for snap application multipass.multipassd.

And this setting seems even permanent:

$ sudo snap get multipass -d
{
        "driver": "LIBVIRTdddddddddddd"
}

Also as discussed, not being able to list the options of a snap isn’t feeling right. But you were aware already and it is more a general thing about snap config, than a multipass issue.

Looks like our configure script failed to validate the value. Can you please file an issue on GitHub? Thanks!

1 Like