I'd like to do some reporting from the system setup progress for virtualised (libvirt/kvm) Ubuntu servers. I expected some kind of such system to already exist out there, but couldn't find anything. Is it possible that there's no such thing?

For a custom solution I've found there's a good interface available via virt-install's --channel option. Essentially I can start a daemon listening for messages on the host and on the client pipe messages to either a virtio device or to a pre-configured address using netcat.

Alternatively I could make sure kernel logging is done into a file on the host and send my messages that way.

Are there some other reasonable / tried solutions?

  • I know what you want, but I do not understand why. Do you want to know when the system is ready?
    – Nils
    Dec 21, 2012 at 21:23
  • @Nils - by notifying the server after each stage in the setup, you know the order of each setup stage, how long each stage took, and at what stage a setup failed, for instance. This helps to diagnose automated deployment problems.
    – Rob
    Dec 21, 2012 at 23:35
  • And you are using plain virt-install? What exactly are the options you use? On physical servers I watch the DHCPD, tftpd, nfsd and httpd logs for the servers of the corresponding stages. Each stage logs to its own local log - but in my case this is kickstart/CentOS.
    – Nils
    Dec 23, 2012 at 22:14

2 Answers 2


I'm not familiar with deploying virtual Ubuntu servers, but I've deployed virtual CentOS servers using a kickstart script from a Cobbler web server. The script installs curl, and then it uses curl to "ping" a URL (unique to each machine) on the web server after each stage of the setup.

I'm not familiar with Vagrant, but I imagine it has similar features.


Well, the KVM guest environment is completely isolated from the guest and apart from some serial communication it's not quite possible to talk with the host as being a feature. You've already found that part about setting up a communication channel.

I would suggest to use a preseeded configuration and to go with one of these approaches.

  • Make it power off after installation. Put this in the preseed file:

    d-i cdrom-detect/eject boolean true
    d-i finish-install/reboot_in_progress note
    d-i debian-installer/exit/poweroff boolean true

    After installation, the machine will be powered off automatically. This way it's easy to have some indication as to whether the installation has finished, but it's not too clear on how successful it was. However, you can check whether the CD has been ejected (disconnected) and have at least a rough idea it was.

  • Have it run a post-installation command, also using preseeding:

    d-i preseed/late_command string some_command_available_in_installer


    d-i preseed/late_command string echo "FINISHED" > /dev/ttyS4

    (change target device) with a Device Logfile on the host.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .