[libvirt-users] Boot delay

Is there a method of tweaking the boot sequence of a KVM instance so that you can delay the process for X number of seconds? I don't have enough time between starting the KVM and connecting via VNC. Thanks Jeff

On 13.06.2011 15:25, Jeff wrote:
Is there a method of tweaking the boot sequence of a KVM instance so that you can delay the process for X number of seconds? I don't have enough time between starting the KVM and connecting via VNC.
You might consider using virt-viewer. It simply waits for domain to boot, if it is down. Your other option is to create hook script: http://libvirt.org/hooks.html and put conditional sleep there, because libvirt just before running a domain tries to execute qemu with some arguments (e.g. -help) to qeury its capabilities. And you don't want your hook script to delay that. So you need something like this: if [ $2 == "start" ]; then sleep 5 fi
Thanks
Jeff
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
Michal

On Mon, Jun 13, 2011 at 05:21:02PM +0200, Michal Privoznik wrote:
Your other option is to create hook script: http://libvirt.org/hooks.html
That looks useful. On several Ubuntu systems, with Ubuntu libvirt 0.8.8 and 0.8.3 packages installed, there's no libvirt/hooks/ directory at all. Is this a directory that can simply be created and used under libvirt, or does using this feature on Ubuntu require custom installation? Thanks, Whit

On 13.06.2011 17:42, Whit Blauvelt wrote:
On Mon, Jun 13, 2011 at 05:21:02PM +0200, Michal Privoznik wrote:
Your other option is to create hook script: http://libvirt.org/hooks.html
That looks useful.
On several Ubuntu systems, with Ubuntu libvirt 0.8.8 and 0.8.3 packages installed, there's no libvirt/hooks/ directory at all. Is this a directory that can simply be created and used under libvirt, or does using this feature on Ubuntu require custom installation? Yes. But you might need to restart libvirtd. Thanks, Whit
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

Is there a virt-viewer for Windows? On Jun 13, 2011, at 10:21 AM, Michal Privoznik wrote:
On 13.06.2011 15:25, Jeff wrote:
Is there a method of tweaking the boot sequence of a KVM instance so that you can delay the process for X number of seconds? I don't have enough time between starting the KVM and connecting via VNC.
You might consider using virt-viewer. It simply waits for domain to boot, if it is down.
Your other option is to create hook script: http://libvirt.org/hooks.html and put conditional sleep there, because libvirt just before running a domain tries to execute qemu with some arguments (e.g. -help) to qeury its capabilities. And you don't want your hook script to delay that.
So you need something like this:
if [ $2 == "start" ]; then sleep 5 fi
Thanks
Jeff
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
Michal
participants (3)
-
Jeff
-
Michal Privoznik
-
Whit Blauvelt