[libvirt-users] Retry reboots in xmls files for libvirt

Hi, I have a virtual machine defined by xml that start from pxe (network boot), my problem is that sometimes the dhcp server is not ready when the virtual machine try to boot. I need that the virtual machine keep asking for dhcp (network reboot) many times, until dhcp is ready and can start the virtual machine with a valid ip. How can I configure that in the xml file? BR //Fernando

On Thu, Jan 16, 2014 at 04:59:20PM +0100, Fernando Porro wrote:
Hi,
I have a virtual machine defined by xml that start from pxe (network boot), my problem is that sometimes the dhcp server is not ready when the virtual machine try to boot.
I need that the virtual machine keep asking for dhcp (network reboot) many times, until dhcp is ready and can start the virtual machine with a valid ip.
How can I configure that in the xml file?
I'm not sure you can configure that for ipxe or qemu, but you can set the reboot timeout for the machine in <os> tag like this: <bios rebootTimeout='0'/> that means immediate reboot when there is no place to boot from. In order for it not to boot from any other device or for any other details, see http://libvirt.org/formatdomain.html Have a nice day, Martin
BR
//Fernando
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

Hi, I am not using quemu, i am using XEN, is there any option to allow me to do that? In the libvirt documentation specify that those options are only available on quemu. BR //Fernando 2014/1/16 Martin Kletzander <mkletzan@redhat.com>
On Thu, Jan 16, 2014 at 04:59:20PM +0100, Fernando Porro wrote:
Hi,
I have a virtual machine defined by xml that start from pxe (network boot), my problem is that sometimes the dhcp server is not ready when the virtual machine try to boot.
I need that the virtual machine keep asking for dhcp (network reboot) many times, until dhcp is ready and can start the virtual machine with a valid ip.
How can I configure that in the xml file?
I'm not sure you can configure that for ipxe or qemu, but you can set the reboot timeout for the machine in <os> tag like this:
<bios rebootTimeout='0'/>
that means immediate reboot when there is no place to boot from. In order for it not to boot from any other device or for any other details, see http://libvirt.org/formatdomain.html
Have a nice day, Martin
BR
//Fernando
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

On Mon, Jan 20, 2014 at 04:14:34PM +0100, Fernando Porro wrote:
Hi,
I am not using quemu, i am using XEN, is there any option to allow me to do that?
In the libvirt documentation specify that those options are only available on quemu.
I don't know whether xen knows how to do that or how to request any kind of this configuration, sorry. But if you fond how this is made for xen, it might be pretty easy to wire up in libvirt. Martin
BR
//Fernando
2014/1/16 Martin Kletzander <mkletzan@redhat.com>
On Thu, Jan 16, 2014 at 04:59:20PM +0100, Fernando Porro wrote:
Hi,
I have a virtual machine defined by xml that start from pxe (network boot), my problem is that sometimes the dhcp server is not ready when the virtual machine try to boot.
I need that the virtual machine keep asking for dhcp (network reboot) many times, until dhcp is ready and can start the virtual machine with a valid ip.
How can I configure that in the xml file?
I'm not sure you can configure that for ipxe or qemu, but you can set the reboot timeout for the machine in <os> tag like this:
<bios rebootTimeout='0'/>
that means immediate reboot when there is no place to boot from. In order for it not to boot from any other device or for any other details, see http://libvirt.org/formatdomain.html
Have a nice day, Martin
BR
//Fernando
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
participants (2)
-
Fernando Porro
-
Martin Kletzander