From blanchet at abes.fr Fri May 25 10:47:25 2012 Content-Type: multipart/mixed; boundary="===============5938450798666636725==" MIME-Version: 1.0 From: =?utf-8?q?Nathana=C3=ABl_Blanchet_=3Cblanchet_at_abes=2Efr=3E?= To: users at ovirt.org Subject: [Users] booting a vm on a raw file disk definated in a hook script Date: Fri, 25 May 2012 16:47:22 +0200 Message-ID: <4FBF9B7A.90007@abes.fr> --===============5938450798666636725== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable This is a multi-part message in MIME format. --------------090904070002010509050300 Content-Type: text/plain; charset=3DISO-8859-1; format=3Dflowed Content-Transfer-Encoding: 8bit Hi all, I'm using this hook script : = http://gerrit.ovirt.org/gitweb?p=3Dvdsm.git;a=3Dblob;f=3Dvdsm_hooks/vmdisk/= before_vm_start.py;h=3D191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=3D6817f1= c6e3f5bc137d1f3bef45a2d0191465c7a3 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=C3=ABl Blanchet (glafouille) Supervision r=C3=A9seau P=C3=B4le exploitation et maintenance D=C3=A9partement des syst=C3=A8mes d'information 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 = T=C3=A9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr --------------090904070002010509050300 Content-Type: text/html; charset=3DISO-8859-1 Content-Transfer-Encoding: 7bit Hi all,

I'm using this hook script : http://gerrit.ovirt.org/gitweb?p=3Dvdsm.git;a=3Dblob;f=3Dvdsm_hooks/vmd= isk/before_vm_start.py;h=3D191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=3D68= 17f1c6e3f5bc137d1f3bef45a2d0191465c7a3
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:


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
bl=
anchet(a)abes.fr 
--------------090904070002010509050300-- --===============5938450798666636725== Content-Type: multipart/alternative MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="attachment.bin" VGhpcyBpcyBhIG11bHRpLXBhcnQgbWVzc2FnZSBpbiBNSU1FIGZvcm1hdC4KLS0tLS0tLS0tLS0t LS0wOTA5MDQwNzAwMDIwMTA1MDkwNTAzMDAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFy c2V0PUlTTy04ODU5LTE7IGZvcm1hdD1mbG93ZWQKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzog OGJpdAoKSGkgYWxsLAoKSSdtIHVzaW5nIHRoaXMgaG9vayBzY3JpcHQgOiAKaHR0cDovL2dlcnJp dC5vdmlydC5vcmcvZ2l0d2ViP3A9dmRzbS5naXQ7YT1ibG9iO2Y9dmRzbV9ob29rcy92bWRpc2sv YmVmb3JlX3ZtX3N0YXJ0LnB5O2g9MTkxZDVjMWFmNTMzZTExZDY5OWIxZDcxNWQzYzFlYTYwZTI4 Yjc4NztoYj02ODE3ZjFjNmUzZjViYzEzN2QxZjNiZWY0NWEyZDAxOT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A8 L3VsPgogICAgPHA+PGJyPgogICAgICB0aGFua3MgYWxsIGZvciB5b3VyIGhlbHA8YnI+CiAgICA8 L3A+CiAgICA8YnI+CiAgICA8cHJlIGNsYXNzPSJtb3otc2lnbmF0dXJlIiBjb2xzPSI3MiI+LS0g Ck5hdGhhbmEmZXVtbDtsIEJsYW5jaGV0IChnbGFmb3VpbGxlKQoKU3VwZXJ2aXNpb24gciZlYWN1 dGU7c2VhdQpQJm9jaXJjO2xlIGV4cGxvaXRhdGlvbiBldCBtYWludGVuYW5jZQpEJmVhY3V0ZTtw YXJ0ZW1lbnQgZGVzIHN5c3QmZWdyYXZlO21lcyBkJ2luZm9ybWF0aW9uCjIyNyBhdmVudWUgUHJv ZmVzc2V1ci1KZWFuLUxvdWlzLVZpYWxhCjM0MTkzIE1PTlRQRUxMSUVSIENFREVYIDUgCQpUJmVh Y3V0ZTtsLiAzMyAoMCk0IDY3IDU0IDg0IDU1CkZheCAgMzMgKDApNCA2NyA1NCA4NCAxNAo8YSBj bGFzcz0ibW96LXR4dC1saW5rLWFiYnJldmlhdGVkIiBocmVmPSJtYWlsdG86YmxhbmNoZXRAYWJl cy5mciI+YmxhbmNoZXRAYWJlcy5mcjwvYT4gPC9wcmU+CiAgPC9ib2R5Pgo8L2h0bWw+CgotLS0t LS0tLS0tLS0tLTA5MDkwNDA3MDAwMjAxMDUwOTA1MDMwMC0tCg== --===============5938450798666636725==-- From iheim at redhat.com Fri Jun 1 10:40:35 2012 Content-Type: multipart/mixed; boundary="===============3455342512654766996==" MIME-Version: 1.0 From: Itamar Heim To: users at ovirt.org Subject: Re: [Users] booting a vm on a raw file disk definated in a hook script Date: Fri, 01 Jun 2012 17:40:28 +0300 Message-ID: <4FC8D45C.7000800@redhat.com> In-Reply-To: 4FBF9B7A.90007@abes.fr --===============3455342512654766996== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 05/25/2012 05:47 PM, Nathana=C3=ABl Blanchet wrote: > Hi all, > > I'm using this hook script : > http://gerrit.ovirt.org/gitweb?p=3Dvdsm.git;a=3Dblob;f=3Dvdsm_hooks/vmdis= k/before_vm_start.py;h=3D191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=3D6817= f1c6e3f5bc137d1f3bef45a2d0191465c7a3 > 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. --===============3455342512654766996==-- From shaharh at redhat.com Fri Jun 1 11:16:44 2012 Content-Type: multipart/mixed; boundary="===============7144482531290809212==" MIME-Version: 1.0 From: Shahar Havivi To: users at ovirt.org Subject: Re: [Users] booting a vm on a raw file disk definated in a hook script Date: Fri, 01 Jun 2012 18:16:41 +0300 Message-ID: <20120601151640.GC3038@redhat.com> In-Reply-To: 4FC8D45C.7000800@redhat.com --===============7144482531290809212== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 01.06.12 17:40, Itamar Heim wrote: > On 05/25/2012 05:47 PM, Nathana=C3=ABl Blanchet wrote: > >Hi all, > > > >I'm using this hook script : > >http://gerrit.ovirt.org/gitweb?p=3Dvdsm.git;a=3Dblob;f=3Dvdsm_hooks/vmdi= sk/before_vm_start.py;h=3D191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=3D681= 7f1c6e3f5bc137d1f3bef45a2d0191465c7a3 > >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 to the disk and cha= nge 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' --===============7144482531290809212==-- From blanchet at abes.fr Fri Jun 1 12:08:57 2012 Content-Type: multipart/mixed; boundary="===============8348782231847300818==" MIME-Version: 1.0 From: =?utf-8?q?Nathana=C3=ABl_Blanchet_=3Cblanchet_at_abes=2Efr=3E?= To: users at ovirt.org Subject: Re: [Users] booting a vm on a raw file disk definated in a hook script Date: Fri, 01 Jun 2012 18:08:54 +0200 Message-ID: <4FC8E916.2070103@abes.fr> In-Reply-To: 20120601151640.GC3038@redhat.com --===============8348782231847300818== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Tanks all exactly what I was looking for :) Le 01/06/2012 17:16, Shahar Havivi a =C3=A9crit : > On 01.06.12 17:40, Itamar Heim wrote: >> On 05/25/2012 05:47 PM, Nathana=C3=ABl Blanchet wrote: >>> Hi all, >>> >>> I'm using this hook script : >>> http://gerrit.ovirt.org/gitweb?p=3Dvdsm.git;a=3Dblob;f=3Dvdsm_hooks/vmd= isk/before_vm_start.py;h=3D191d5c1af533e11d699b1d715d3c1ea60e28b787;hb=3D68= 17f1c6e3f5bc137d1f3bef45a2d0191465c7a3 >>> 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 to the disk and c= hange > 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=C3=ABl Blanchet Supervision r=C3=A9seau P=C3=B4le exploitation et maintenance D=C3=A9partement des syst=C3=A8mes d'information 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 = T=C3=A9l. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet(a)abes.fr --===============8348782231847300818==--