|
libvirt reports "running" as soon as QEMU is up, long before the guest
has booted, so the panel had no way to say when a VM is actually usable.
After a successful start, a detached script polls the VM's sshd and
sends a notification once it accepts connections, or a warning after
five minutes.
Host and port come from `ssh -G <vm>`: a Host alias named after the VM
may put sshd on a non-default port (buildsystem listens on 2290, and a
probe of port 22 never succeeded). Without an alias `ssh -G` echoes the
name back, and the guest agent's IPv4 address on port 22 is used. The
probe is a plain `nc -z`, so no authentication or key is involved.
Detached rather than a Process so several VMs can wait at once and the
wait survives a shell reload. Only starts issued from the panel are
watched; a VM started from virt-manager or the CLI is not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|