Hide Forgot
I'm wondering if there's a specific reason for not including a hook that gets called when a vm has finished starting. I would find that very convenient to have. For example, I want to perform some actions based on the pid of the started vm which is not really possible in a clean way at this moment. Correct me if I'm wrong though.
Hooks after the vm has started have been added to the QEMU and LXC drivers by: commit 6510c97bf5920044355d22646a91fb0a8fb9bf68 Author: Daniel P. Berrange <berrange> AuthorDate: 2012-05-28 15:04:31 +0100 Commit: Daniel P. Berrange <berrange> CommitDate: 2012-06-13 18:23:00 +0100 Add some missing hook functions A core use case of the hook scripts is to be able to do things to a guest's network configuration. It is possible to hook into the 'start' operation for a QEMU guest which runs just before the guest is started. The TAP devices will exist at this point, but the QEMU process will not. It can be desirable to have a 'started' hook too, which runs once QEMU has started. If libvirtd is restarted it will re-populate firewall rules, but there is no QEMU hook to trigger for existing domains. This is solved with a 'reconnect' hook. Finally, if attaching to an external QEMU process there needs to be an 'attach' hook script. This all also applies to the LXC driver * docs/hooks.html.in: Document new operations * src/util/hooks.c, src/util/hooks.c: Add 'started', 'reconnect' and 'attach' operations for QEMU. Add 'prepare', 'started', 'release' and 'reconnect' operations for LXC * src/lxc/lxc_driver.c: Add hooks for 'prepare', 'started', 'release' and 'reconnect' operations * src/qemu/qemu_process.c: Add hooks for 'started', 'reconnect' and 'reconnect' operations git describe: v0.9.12-202-g6510c97 contains: v0.9.13-rc1~81