[Users] booting a vm on a raw file disk definated in a hook script

This is a multi-part message in MIME format. --------------090904070002010509050300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi all, I'm using this hook script : http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/vmdisk/before_... My goal is to boot a vm on a vm image imported form libvirt/kvm. I want to use this single image, that is to say without importing it into ovirt with tools like v2v. acathrow told me on irc that I'd have to change the boot order in the xml, but I don't know how to proceed for many reasons: * I can't create a vm through the UI which would boot on the disk created by the hook script without first creating a disk on the relevant storage domain. If I try I have those warnings : hook: Cannot run VM without at least one bootable disk. Alternatives: -Create a disk for this VM, and rerun the VM. -Change the boot sequence using the Edit VM command (Boot Option Sub-Tab). -Use the Run-Once command to select a different boot option and rerun the VM. * If I run a vm with the first disk from the storage domain and an additional disk from the hook script, how could I change the boot order in the xml definition file if I don't know the xml definition of the main disk? thanks all for your help -- Nathanaël Blanchet (glafouille) Supervision réseau Pôle exploitation et maintenance Département des systèmes d'information 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr --------------090904070002010509050300 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hi all,<br> <br> I'm using this hook script : <a class="moz-txt-link-freetext" href="http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/vmdisk/before_vm_start.py;h=191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=6817f1c6e3f5bc137d1f3bef45a2d0191465c7a3">http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/vmdisk/before_vm_start.py;h=191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=6817f1c6e3f5bc137d1f3bef45a2d0191465c7a3</a><br> My goal is to boot a vm on a vm image imported form libvirt/kvm. I want to use this single image, that is to say without importing it into ovirt with tools like v2v.<br> acathrow told me on irc that I'd have to change the boot order in the xml, but I don't know how to proceed for many reasons:<br> <ul> <li>I can't create a vm through the UI which would boot on the disk created by the hook script without first creating a disk on the relevant storage domain. If I try I have those warnings : <br> <br> hook: Cannot run VM without at least one bootable disk.<br> Alternatives:<br> -Create a disk for this VM, and rerun the VM.<br> -Change the boot sequence using the Edit VM command (Boot Option Sub-Tab).<br> -Use the Run-Once command to select a different boot option and rerun the VM.</li> <li>If I run a vm with the first disk from the storage domain and an additional disk from the hook script, how could I change the boot order in the xml definition file if I don't know the xml definition of the main disk?</li> </ul> <p><br> thanks all for your help<br> </p> <br> <pre class="moz-signature" cols="72">-- Nathanaël Blanchet (glafouille) Supervision réseau Pôle exploitation et maintenance Département des systèmes d'information 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 <a class="moz-txt-link-abbreviated" href="mailto:blanchet@abes.fr">blanchet@abes.fr</a> </pre> </body> </html> --------------090904070002010509050300--

On 05/25/2012 05:47 PM, Nathanaël Blanchet wrote:
Hi all,
I'm using this hook script : http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/vmdisk/before_... My goal is to boot a vm on a vm image imported form libvirt/kvm. I want to use this single image, that is to say without importing it into ovirt with tools like v2v. acathrow told me on irc that I'd have to change the boot order in the xml, but I don't know how to proceed for many reasons:
* I can't create a vm through the UI which would boot on the disk created by the hook script without first creating a disk on the relevant storage domain. If I try I have those warnings :
hook: Cannot run VM without at least one bootable disk. Alternatives: -Create a disk for this VM, and rerun the VM. -Change the boot sequence using the Edit VM command (Boot Option Sub-Tab). -Use the Run-Once command to select a different boot option and rerun the VM. * If I run a vm with the first disk from the storage domain and an additional disk from the hook script, how could I change the boot order in the xml definition file if I don't know the xml definition of the main disk?
thanks all for your help
1. i guess you can change the script to fix the boot order. 2. you can create a VM with a disk the same size, and just copy your converted disk over it (cp for nfs, dd for iscsi), instead of using the hook.

On 05/25/2012 05:47 PM, Nathanaël Blanchet wrote:
Hi all,
I'm using this hook script : http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/vmdisk/before_... My goal is to boot a vm on a vm image imported form libvirt/kvm. I want to use this single image, that is to say without importing it into ovirt with tools like v2v. acathrow told me on irc that I'd have to change the boot order in the xml, but I don't know how to proceed for many reasons:
* I can't create a vm through the UI which would boot on the disk created by the hook script without first creating a disk on the relevant storage domain. If I try I have those warnings :
hook: Cannot run VM without at least one bootable disk. Alternatives: -Create a disk for this VM, and rerun the VM. -Change the boot sequence using the Edit VM command (Boot Option Sub-Tab). -Use the Run-Once command to select a different boot option and rerun the VM. * If I run a vm with the first disk from the storage domain and an additional disk from the hook script, how could I change the boot order in the xml definition file if I don't know the xml definition of the main disk?
thanks all for your help
1. i guess you can change the script to fix the boot order. 2. you can create a VM with a disk the same size, and just copy your converted disk over it (cp for nfs, dd for iscsi), instead of using the hook. Today you cannot do that because the hook didn't designed to do that. By modifying the hook you can add a <boot order='1'/> to the disk and change
On 01.06.12 17:40, Itamar Heim wrote: the other device boot order to higher number. Take a look at this links: http://libvirt.org/formatdomain.html#elementsDisks http://libvirt.org/formatdomain.html#elementsNICSBoot and look for the string 'boot order'

Tanks all exactly what I was looking for :) Le 01/06/2012 17:16, Shahar Havivi a écrit : > On 01.06.12 17:40, Itamar Heim wrote: >> On 05/25/2012 05:47 PM, Nathanaël Blanchet wrote: >>> Hi all, >>> >>> I'm using this hook script : >>> http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=blob;f=vdsm_hooks/vmdisk/before_vm_start.py;h=191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=6817f1c6e3f5bc137d1f3bef45a2d0191465c7a3 >>> My goal is to boot a vm on a vm image imported form libvirt/kvm. I want >>> to use this single image, that is to say without importing it into ovirt >>> with tools like v2v. >>> acathrow told me on irc that I'd have to change the boot order in the >>> xml, but I don't know how to proceed for many reasons: >>> >>> * I can't create a vm through the UI which would boot on the disk >>> created by the hook script without first creating a disk on the >>> relevant storage domain. If I try I have those warnings : >>> >>> hook: Cannot run VM without at least one bootable disk. >>> Alternatives: >>> -Create a disk for this VM, and rerun the VM. >>> -Change the boot sequence using the Edit VM command (Boot Option >>> Sub-Tab). >>> -Use the Run-Once command to select a different boot option and >>> rerun the VM. >>> * If I run a vm with the first disk from the storage domain and an >>> additional disk from the hook script, how could I change the boot >>> order in the xml definition file if I don't know the xml definition >>> of the main disk? >>> >>> >>> thanks all for your help >> 1. i guess you can change the script to fix the boot order. >> 2. you can create a VM with a disk the same size, and just copy your >> converted disk over it (cp for nfs, dd for iscsi), instead of using >> the hook. > Today you cannot do that because the hook didn't designed to do that. > By modifying the hook you can add a<boot order='1'/> to the disk and change > the other device boot order to higher number. > > Take a look at this links: > http://libvirt.org/formatdomain.html#elementsDisks > http://libvirt.org/formatdomain.html#elementsNICSBoot > and look for the string 'boot order' -- Nathanaël Blanchet Supervision réseau Pôle exploitation et maintenance Département des systèmes d'information 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr
participants (3)
-
Itamar Heim
-
Nathanaël Blanchet
-
Shahar Havivi