Rebooting selfbuilt vyos with cloud-init

First, I needed a 1.4 (or 1.5) VyOS qcow2 with cloud-init capability, but unfortunately there are no such images provided by the VyOS team. At least not publicly.
So I createed the image myself with the help of these tools: GitHub - vyos/vyos-vm-images and using the latest rolling-release (VyOS 1.5-rolling-202311060023) iso image.

Everything seemed to work out after some tweaking, but when I try to reboot or shutdown the vyos, it hangs at such message:

     Stopping session-9.scope - Session 9 of User vyos...

[ OK ] Removed slice system-modpr…lice - Slice /system/modprobe.
[ OK ] Stopped target - Cloud-init target.
[ OK ] Stopped target cryptsetup.…get - Local Encrypted Volumes.
[ OK ] Stopped target - Graphical Interface.
[ OK ] Stopped target integrityse…Local Integrity Protected Volumes.
[ OK ] Stopped target - Timer Units.
[ OK ] Stopped e2scrub_all.timer▒▒etadata Check for All Filesystems.
[ OK ] Stopped fstrim.timer - Discard unused blocks once a week.
[ OK ] Stopped logrotate.timer - Daily rotation of log files.
[ OK ] Stopped systemd-tmpfiles-c… Cleanup of Temporary Directories.
[ OK ] Stopped target veritysetup… - Local Verity Protected Volumes.
[ OK ] Stopped target - VyOS target.
[ OK ] Stopped cloud-final.servic… Execute cloud user/final scripts.
[ OK ] Stopped target - Multi-User System.
[ OK ] Stopped target - Login Prompts.
[ OK ] Stopped target stunnel.tar…services - per-config-file target.
Stopping acpid.service - ACPI event daemon…
[ OK ] Stopped arpwatch.service - arpwatch service.
Stopping atd.service - Deferred execution scheduler…
Stopping atop.service …op advanced performance monitor…
Stopping cron.service …round program processing daemon…
Stopping getty@tty1.service - Getty on tty1…
Stopping netplug.service▒▒s up/down network automatically…
Stopping qemu-guest-agent.service - QEMU Guest Agent…
Stopping rsyslog.service - System Logging Service…
Stopping sendmail.service▒▒d scalable Mail Transport Agent…
Stopping serial-getty@ttyS…ice - Serial Getty on ttyS0…
Stopping snmpd.service…agement Protocol (SNMP) Daemon…
Stopping ssh-session-clean…SD Secure Shell session cleanup…
Stopping ssh.service - OpenBSD Secure Shell server…
Stopping…et Up Additional Binary Formats…
Stopping systemd-random-se…ice - Load/Save Random Seed…
Stopping systemd-update-ut…rd System Boot/Shutdown in UTMP…
Stopping zabbix-agent2.service - Zabbix Agent 2…
[ OK ] Stopped acpid.service - ACPI event daemon.
[ OK ] Stopped cron.service -…kground program processing daemon.
[ OK ] Stopped qemu-guest-agent.service - QEMU Guest Agent.
[ OK ] Stopped atd.service - Deferred execution scheduler.
[ OK ] Stopped rsyslog.service - System Logging Service.
[ OK ] Stopped atop.service - Atop advanced performance monitor.
[ OK ] Stopped snmpd.service …anagement Protocol (SNMP) Daemon…
[ OK ] Stopped ssh.service - OpenBSD Secure Shell server.
[ OK ] Stopped getty@tty1.service - Getty on tty1.
[ OK ] Stopped serial-getty@ttyS0…rvice - Serial Getty on ttyS0.
[ OK ] Stopped sendmail.service▒▒and scalable Mail Transport Agent.
[ OK ] Stopped ssh-session-cleanu…nBSD Secure Shell session cleanup.
[ OK ] Stopped systemd-binfmt.ser… Set Up Additional Binary Formats.
[ OK ] Stopped systemd-random-see…rvice - Load/Save Random Seed.
[ OK ] Stopped zabbix-agent2.service - Zabbix Agent 2.
[ OK ] Stopped session-9.scope - Session 9 of User vyos.
[ OK ] Stopped session-8.scope - Session 8 of User vyos.
[ OK ] Stopped systemd-update-utm…cord System Boot/Shutdown in UTMP.
[ OK ] Removed slice system-getty.slice - Slice /system/getty.
[ OK ] Removed slice system-seria… - Slice /system/serial-getty.
[ OK ] Unset automount proc-sys-f…rmats File System Automount Point.
Stopping atopacct.service▒▒ Atop process accounting daemon…
Stopping auditd.service - Security Auditing Service…
Stopping…ice - User Login Management…
Stopping user@1002.service - User Manager for UID 1002…
[ OK ] Stopped atopacct.service▒▒ - Atop process accounting daemon.
[ OK ] Stopped netplug.service▒▒ngs up/down network automatically.
[ OK ] Stopped user@1002.service - User Manager for UID 1002.
Stopping systemd-user-sess…vice - Permit User Sessions…
Stopping user-runtime-dir@…untime Directory /run/user/1002…
[ OK ] Stopped auditd.service - Security Auditing Service.
[ OK ] Stopped systemd-logind.service - User Login Management.
[ OK ] Stopped systemd-tmpfiles-s…te Volatile Files and Directories.
[ OK ] Unmounted run-credentials-…ls/systemd-tmpfiles-setup.service.
[ OK ] Stopped systemd-user-sessi…ervice - Permit User Sessions.
[ OK ] Unmounted run-user-1002.mount - /run/user/1002.
[ OK ] Stopped user-runtime-dir@1… Runtime Directory /run/user/1002.
[ OK ] Removed slice user-1002.slice - User Slice of UID 1002.
[ OK ] Stopped target - Remote File Systems.
Stopping dbus.service - D-Bus System Message Bus…
Stopping vyos-router.service - VyOS Router…
[ OK ] Stopped dbus.service - D-Bus System Message Bus.
[ 5758.881807] vyos-router[5192]: Stopping VyOS router:.
[ 5758.886638] vyos-router[5192]: Un-mounting VyOS Config…done.
[ OK ] Unmounted opt-vyatta-config.mount - /opt/vyatta/config.
— hangs forever —

Which means I have to forcefully destroy the VM, before I can boot it up again.
I wonder if this is caused by the fact that I had to built the KVM image myself and there is something wrong with it, or is the problem with the release?

Also, any chance VyOS team provides snapshots or RCs for 1.4 or 1.5? Can’t find them anywhere.

how are you rebooting it? are you smashing it with sudo reboot or systemctl reboot, or using the built in vyos-shell command to reboot?

Builtin vyos-shell reboot or the (graceful) shutdown command from virsh - same result.

have you tried the less graceful way? are you hosting the vm yourself or is in the cloud?

Forceful shutdown of course works, but is not a desirable solution.

Hi there,

sorry for diggin’ up such an old conversation as my introduction here, but, I’m facing the same issue.
Was there ever a solution to this?

Please feel free to ignore if it is not customary to re-visit older posts around here.


It’s actually not a very old issue, but it still persists.
Have not tried any newer rolling versions, but I would assume it has not changed.
What’s your version?

Last I tried was 20231204something