Closed ltrager closed 3 years ago
What's the error when you run lxc start?
$ lxc start lxd-vm
Error: virtiofsd failed to bind socket within 10s
Try `lxc info --show-log lxd-vm` for more info
Can you show ps fauxww
?
$ sudo ps fauxww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 2 0.0 0.0 0 0 ? S 00:21 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [rcu_gp]
root 4 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [rcu_par_gp]
root 6 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/0:0H-kblockd]
root 9 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [mm_percpu_wq]
root 10 0.0 0.0 0 0 ? S 00:21 0:00 \_ [ksoftirqd/0]
root 11 0.0 0.0 0 0 ? I 00:21 0:06 \_ [rcu_sched]
root 12 0.0 0.0 0 0 ? S 00:21 0:00 \_ [migration/0]
root 13 0.0 0.0 0 0 ? S 00:21 0:00 \_ [idle_inject/0]
root 14 0.0 0.0 0 0 ? S 00:21 0:00 \_ [cpuhp/0]
root 15 0.0 0.0 0 0 ? S 00:21 0:00 \_ [cpuhp/1]
root 16 0.0 0.0 0 0 ? S 00:21 0:00 \_ [idle_inject/1]
root 17 0.0 0.0 0 0 ? S 00:21 0:00 \_ [migration/1]
root 18 0.0 0.0 0 0 ? S 00:21 0:00 \_ [ksoftirqd/1]
root 20 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/1:0H-kblockd]
root 21 0.0 0.0 0 0 ? S 00:21 0:00 \_ [cpuhp/2]
root 22 0.0 0.0 0 0 ? S 00:21 0:00 \_ [idle_inject/2]
root 23 0.0 0.0 0 0 ? S 00:21 0:00 \_ [migration/2]
root 24 0.0 0.0 0 0 ? S 00:21 0:00 \_ [ksoftirqd/2]
root 26 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/2:0H-kblockd]
root 27 0.0 0.0 0 0 ? S 00:21 0:00 \_ [cpuhp/3]
root 28 0.0 0.0 0 0 ? S 00:21 0:00 \_ [idle_inject/3]
root 29 0.0 0.0 0 0 ? S 00:21 0:00 \_ [migration/3]
root 30 0.0 0.0 0 0 ? S 00:21 0:00 \_ [ksoftirqd/3]
root 32 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/3:0H-kblockd]
root 33 0.0 0.0 0 0 ? S 00:21 0:00 \_ [kdevtmpfs]
root 34 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [netns]
root 35 0.0 0.0 0 0 ? S 00:21 0:00 \_ [rcu_tasks_kthre]
root 36 0.0 0.0 0 0 ? S 00:21 0:00 \_ [kauditd]
root 37 0.0 0.0 0 0 ? S 00:21 0:00 \_ [khungtaskd]
root 38 0.0 0.0 0 0 ? S 00:21 0:00 \_ [oom_reaper]
root 39 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [writeback]
root 40 0.0 0.0 0 0 ? S 00:21 0:00 \_ [kcompactd0]
root 41 0.0 0.0 0 0 ? SN 00:21 0:00 \_ [ksmd]
root 42 0.0 0.0 0 0 ? SN 00:21 0:00 \_ [khugepaged]
root 89 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kintegrityd]
root 90 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kblockd]
root 91 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [blkcg_punt_bio]
root 93 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [tpm_dev_wq]
root 94 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [ata_sff]
root 95 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [md]
root 96 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [edac-poller]
root 97 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [devfreq_wq]
root 98 0.0 0.0 0 0 ? S 00:21 0:00 \_ [watchdogd]
root 101 0.0 0.0 0 0 ? S 00:21 0:00 \_ [kswapd0]
root 102 0.0 0.0 0 0 ? S 00:21 0:00 \_ [ecryptfs-kthrea]
root 104 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kthrotld]
root 105 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/24-aerdrv]
root 106 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/24-pciehp]
root 107 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/25-aerdrv]
root 108 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/25-pciehp]
root 109 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/26-aerdrv]
root 110 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/26-pciehp]
root 111 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/27-aerdrv]
root 112 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/27-pciehp]
root 113 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/28-aerdrv]
root 114 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/28-pciehp]
root 115 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/29-aerdrv]
root 116 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/29-pciehp]
root 117 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/30-aerdrv]
root 118 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/30-pciehp]
root 119 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/31-aerdrv]
root 120 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/31-pciehp]
root 121 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/32-aerdrv]
root 122 0.0 0.0 0 0 ? S 00:21 0:00 \_ [irq/32-pciehp]
root 123 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [acpi_thermal_pm]
root 124 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [vfio-irqfd-clea]
root 125 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [ipv6_addrconf]
root 135 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kstrp]
root 138 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/u9:0]
root 153 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [charger_manager]
root 202 0.0 0.0 0 0 ? S 00:21 0:00 \_ [scsi_eh_0]
root 203 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [cryptd]
root 204 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [scsi_tmf_0]
root 212 0.0 0.0 0 0 ? S 00:21 0:00 \_ [scsi_eh_1]
root 216 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [scsi_tmf_1]
root 218 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/2:1H-kblockd]
root 219 0.0 0.0 0 0 ? S 00:21 0:00 \_ [scsi_eh_2]
root 220 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [scsi_tmf_2]
root 222 0.0 0.0 0 0 ? S 00:21 0:00 \_ [scsi_eh_3]
root 237 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [scsi_tmf_3]
root 241 0.0 0.0 0 0 ? S 00:21 0:00 \_ [scsi_eh_4]
root 242 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [scsi_tmf_4]
root 247 0.0 0.0 0 0 ? S 00:21 0:00 \_ [scsi_eh_5]
root 251 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [scsi_tmf_5]
root 252 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [ttm_swap]
root 268 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kdmflush]
root 298 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [raid5wq]
root 326 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/3:1H-kblockd]
root 339 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/1:1H-kblockd]
root 340 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-worker]
root 341 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-worker-hi]
root 342 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-delalloc]
root 343 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-flush_del]
root 344 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-cache]
root 345 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-submit]
root 346 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-fixup]
root 347 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-endio]
root 348 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-endio-met]
root 349 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-endio-met]
root 350 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-endio-rai]
root 351 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-endio-rep]
root 352 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-rmw]
root 353 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-endio-wri]
root 354 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-freespace]
root 355 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-delayed-m]
root 356 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-readahead]
root 357 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [btrfs-qgroup-re]
root 358 0.0 0.0 0 0 ? S 00:21 0:00 \_ [btrfs-cleaner]
root 359 0.0 0.0 0 0 ? S 00:21 0:01 \_ [btrfs-transacti]
root 392 0.0 0.0 0 0 ? S 00:21 0:00 \_ [hwrng]
root 394 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kworker/0:1H-kblockd]
root 627 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kaluad]
root 628 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kmpath_rdacd]
root 629 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kmpathd]
root 630 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [kmpath_handlerd]
root 642 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [loop0]
root 647 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [loop1]
root 648 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [loop2]
root 706 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [bond0]
root 1099 0.0 0.0 0 0 ? I< 00:21 0:00 \_ [dio/dm-0]
root 1111 0.0 0.0 2488 576 ? S 00:21 0:00 \_ bpfilter_umh
root 1140 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [spl_system_task]
root 1141 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [spl_delay_taskq]
root 1142 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [spl_dynamic_tas]
root 1143 0.0 0.0 0 0 ? S< 00:21 0:00 \_ [spl_kmem_cache]
root 1164 0.0 0.0 0 0 ? S< 00:22 0:00 \_ [zvol]
root 1165 0.0 0.0 0 0 ? S 00:22 0:00 \_ [arc_prune]
root 1166 0.0 0.0 0 0 ? SN 00:22 0:00 \_ [zthr_procedure]
root 1167 0.0 0.0 0 0 ? SN 00:22 0:02 \_ [zthr_procedure]
root 1168 0.0 0.0 0 0 ? S 00:22 0:00 \_ [dbu_evict]
root 1169 0.0 0.0 0 0 ? SN 00:22 0:02 \_ [dbuf_evict]
root 1174 0.0 0.0 0 0 ? SN 00:22 0:00 \_ [z_vdev_file]
root 1175 0.0 0.0 0 0 ? S 00:22 0:01 \_ [l2arc_feed]
root 1996 0.0 0.0 0 0 ? I 04:06 0:40 \_ [kworker/2:0-mm_percpu_wq]
root 2023 0.0 0.0 0 0 ? I 04:06 0:08 \_ [kworker/3:0-mm_percpu_wq]
root 2041 0.0 0.0 0 0 ? S 04:06 0:00 \_ [kvm-nx-lpage-re]
root 2043 0.0 0.0 0 0 ? S 04:06 0:00 \_ [vhost-2038]
root 2044 0.0 0.0 0 0 ? S 04:06 0:00 \_ [vhost-2038]
root 2048 0.3 0.0 0 0 ? S 04:06 2:21 \_ [kvm-pit/2038]
root 2049 0.0 0.0 0 0 ? S 04:06 0:00 \_ [vhost-2038]
root 2473 0.0 0.0 0 0 ? I 08:22 0:00 \_ [kworker/2:1]
root 2837 0.0 0.0 0 0 ? I 09:59 0:00 \_ [kworker/0:2-cgroup_destroy]
root 2848 0.0 0.0 0 0 ? I 09:59 0:02 \_ [kworker/0:3-mm_percpu_wq]
root 2945 0.0 0.0 0 0 ? I 13:44 0:00 \_ [kworker/3:2-cgroup_destroy]
root 2974 0.0 0.0 0 0 ? I 15:44 0:00 \_ [kworker/u8:0-events_power_efficient]
root 2977 0.0 0.0 0 0 ? I 15:44 0:00 \_ [kworker/1:0-cgroup_destroy]
root 2987 0.0 0.0 0 0 ? I 15:44 0:00 \_ [kworker/1:3-mm_percpu_wq]
root 2991 0.0 0.0 0 0 ? I 15:55 0:00 \_ [kworker/u8:1-btrfs-endio]
root 2992 0.0 0.0 0 0 ? I 16:04 0:00 \_ [kworker/u8:2-flush-btrfs-1]
root 3030 0.0 0.0 0 0 ? I 16:09 0:00 \_ [kworker/u8:3-btrfs-worker]
root 3031 0.0 0.0 0 0 ? I 16:09 0:00 \_ [kworker/u8:4-btrfs-endio-write]
root 1 0.0 0.2 167456 10432 ? Ss 00:21 0:02 /sbin/init
root 432 0.0 0.3 69940 13220 ? S<s 00:21 0:00 /lib/systemd/systemd-journald
root 463 0.0 0.1 21468 4528 ? Ss 00:21 0:00 /lib/systemd/systemd-udevd
root 631 0.0 0.4 280148 17952 ? SLsl 00:21 0:09 /sbin/multipathd -d -s
systemd+ 667 0.0 0.1 90000 4360 ? Ssl 00:21 0:00 /lib/systemd/systemd-timesyncd
systemd+ 704 0.0 0.1 18528 6640 ? Ss 00:21 0:00 /lib/systemd/systemd-networkd
systemd+ 713 0.0 0.2 23892 10484 ? Ss 00:21 0:00 /lib/systemd/systemd-resolved
root 729 0.0 0.1 241032 7000 ? Ssl 00:21 0:01 /usr/lib/accountsservice/accounts-daemon
root 732 0.0 0.0 8536 2596 ? Ss 00:21 0:00 /usr/sbin/cron -f
message+ 737 0.0 0.1 7516 4124 ? Ss 00:21 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root 741 0.0 0.0 81928 3548 ? Ssl 00:21 0:03 /usr/sbin/irqbalance --foreground
root 742 0.0 0.3 29264 15724 ? Ss 00:21 0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
syslog 744 0.0 0.1 224348 4480 ? Ssl 00:21 0:00 /usr/sbin/rsyslogd -n -iNONE
root 747 0.0 0.6 1147048 27704 ? Ssl 00:21 0:06 /usr/lib/snapd/snapd
root 750 0.0 0.1 16652 6100 ? Ss 00:21 0:00 /lib/systemd/systemd-logind
daemon 755 0.0 0.0 3792 2208 ? Ss 00:21 0:00 /usr/sbin/atd -f
root 769 0.0 0.0 5828 1592 tty1 Ss+ 00:21 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root 786 0.0 0.3 108096 14016 ? Ssl 00:21 0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root 787 0.0 0.1 12176 6104 ? Ss 00:21 0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
root 1253 0.0 0.2 13800 8020 ? Ss 00:42 0:00 \_ sshd: ubuntu [priv]
ubuntu 1352 0.0 0.1 13940 4828 ? S 00:42 0:10 \_ sshd: ubuntu@pts/0
ubuntu 1353 0.0 0.1 10032 4448 pts/0 Ss 00:42 0:00 \_ -bash
root 3032 0.0 0.1 11016 4648 pts/0 S+ 16:09 0:00 \_ sudo ps fauxww
root 3033 0.0 0.0 10956 3680 pts/0 R+ 16:09 0:00 \_ ps fauxww
root 798 0.0 0.1 236420 6960 ? Ssl 00:21 0:00 /usr/lib/policykit-1/polkitd --no-debug
root 914 0.0 0.0 4644 296 ? Ss 00:21 0:00 /bin/sh /snap/lxd/19647/commands/daemon.start
root 1070 0.2 1.8 2016052 75320 ? Sl 00:21 2:06 \_ lxd --logfile /var/snap/lxd/common/lxd/logs/lxd.log --group lxd
lxd 1216 0.0 0.0 45356 1680 ? Ss 00:22 0:00 \_ dnsmasq --keep-in-foreground --strict-order --bind-interfaces --except-interface=lo --pid-file= --no-ping --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.92.145.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range 10.92.145.2,10.92.145.254,1h --listen-address=fd42:6cc1:9607:d5f3::1 --enable-ra --dhcp-range ::,constructor:lxdbr0,ra-stateless,ra-names -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd -g lxd
root 2013 0.0 0.0 94396 1688 ? Ssl 04:06 0:00 \_ /snap/lxd/19647/bin/virtiofsd --socket-path=/var/snap/lxd/common/lxd/logs/maas_lxd-vm/virtio-fs.config.sock -o source=/var/snap/lxd/common/lxd/virtual-machines/maas_lxd-vm/config
root 2040 0.0 0.0 94396 1940 ? Sl 04:06 0:00 \_ /snap/lxd/19647/bin/virtiofsd --socket-path=/var/snap/lxd/common/lxd/logs/maas_lxd-vm/virtio-fs.config.sock -o source=/var/snap/lxd/common/lxd/virtual-machines/maas_lxd-vm/config
root 1056 0.0 0.0 97812 140 ? Sl 00:21 0:00 lxcfs /var/snap/lxd/common/var/lib/lxcfs -p /var/snap/lxd/common/lxcfs.pid
ubuntu 1269 0.0 0.1 18532 7904 ? Ss 00:42 0:00 /lib/systemd/systemd --user
ubuntu 1272 0.0 0.0 168688 2996 ? S 00:42 0:00 \_ (sd-pam)
ubuntu 1393 0.0 0.0 7108 3596 ? Ss 00:42 0:00 \_ /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
lxd 2038 1.2 9.3 2956836 374396 ? Sl 04:06 9:23 /snap/lxd/19647/bin/qemu-system-x86_64 -S -name lxd-vm -uuid f5fec2be-21c7-4ffb-847f-f88589c06686 -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/snap/lxd/common/lxd/logs/maas_lxd-vm/qemu.conf -pidfile /var/snap/lxd/common/lxd/logs/maas_lxd-vm/qemu.pid -D /var/snap/lxd/common/lxd/logs/maas_lxd-vm/qemu.log -chroot /var/snap/lxd/common/lxd/virtual-machines/maas_lxd-vm -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas lxd
The qemu process looked suspicious, I confirmed that LXD says that the VM is stopped. I then killed that process and LXD was able to start the VM. In LP:1865515#67 Dimitri mentions the -no-reboot
option may be a concern.
Ok, so it's just qemu being in a bad state. We have a fix for this kind of thing already merged.
no-reboot is normal, we always want LXD in control of reboots.
Closing as LXD 4.13 has the fix for handing qemu hangs and we already backported to 4.0 just haven't done a new point release yet.
Required information
Issue description
I am working on fixing secure boot deployments with MAAS. Currently this is broken due to LP:1865515. I have been testing various solutions using LXD with secure boot enabled. When booting fails due to triggering a secure boot failure or encountering a bug in the shim/grub the VM turns off. That isn't a problem but I can't turn it back on unless I reboot the system LXD is running on.
Steps to reproduce
Information to attach
I tried manually running
touch /var/snap/lxd/common/lxd/logs/maas_lxd-vm/qemu.log
but I get the same error message.