Upload img file to Storage Domain

Hi there, I'm spending a fair amount of time to find out how (if possible) to upload a .img image to a oVirt Storage Domain and be able to mount it in a VM as a disk. It is a OpenWRT image and there is no OVF from it, so it's a raw image which I wanted to use as a disc. Tried both with engine-iso-uploader and engine-image-uploader but they refure for diferent reasons. Is that possible at all ? Fernando

On 8 June 2016 at 15:58, Fernando Frediani <fernando.frediani@upx.com.br> wrote:
Hi there,
I'm spending a fair amount of time to find out how (if possible) to upload a .img image to a oVirt Storage Domain and be able to mount it in a VM as a disk.
It is a OpenWRT image and there is no OVF from it, so it's a raw image which I wanted to use as a disc. Tried both with engine-iso-uploader and engine-image-uploader but they refure for diferent reasons.
Is that possible at all ?
Uploading of QCOW images from GUI will hopefully land in 4.0. In the meantime you can work around it like this: 1. Create a VM and install centos/some other Linux on it 2. Create a new VM disk and attach to VM, not the disk device 3. Copy the image from the file to the disk device with virt-resize. 4. Detach the disk from the VM and build a new VM around it Optionally: 1. Convert the VM from step #4 to a template 2. Re use the VM from step #1 to upload more images. HTH, -- Barak Korren bkorren@redhat.com RHEV-CI Team

On Wed, Jun 8, 2016 at 4:12 PM, Barak Korren <bkorren@redhat.com> wrote:
On 8 June 2016 at 15:58, Fernando Frediani <fernando.frediani@upx.com.br> wrote:
Hi there,
I'm spending a fair amount of time to find out how (if possible) to upload a .img image to a oVirt Storage Domain and be able to mount it in a VM as a disk.
It is a OpenWRT image and there is no OVF from it, so it's a raw image which I wanted to use as a disc. Tried both with engine-iso-uploader and engine-image-uploader but they refure for diferent reasons.
Is that possible at all ?
Uploading of QCOW images from GUI will hopefully land in 4.0.
I has landed, the last 4.0 build should support it in ovirt builds. It may have a bug that you have to approve additional certificate to get the upload working, this is fixed upstream. Amit, can you confirm?
In the meantime you can work around it like this: 1. Create a VM and install centos/some other Linux on it 2. Create a new VM disk and attach to VM, not the disk device 3. Copy the image from the file to the disk device with virt-resize. 4. Detach the disk from the VM and build a new VM around it
Optionally: 1. Convert the VM from step #4 to a template 2. Re use the VM from step #1 to upload more images.
HTH,
-- Barak Korren bkorren@redhat.com RHEV-CI Team _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Thanks for that. That worked. I installed a temporary Linux distribution, downloded the .img file to its filesystem, made a dd to /dev/vdb and remove the temporary Linux distribution disk, then let the disk boot from the remaining disk. Far from ideal but at least worked. Fernando Em 08/06/2016 10:12, Barak Korren escreveu:
On 8 June 2016 at 15:58, Fernando Frediani <fernando.frediani@upx.com.br> wrote:
Hi there,
I'm spending a fair amount of time to find out how (if possible) to upload a .img image to a oVirt Storage Domain and be able to mount it in a VM as a disk.
It is a OpenWRT image and there is no OVF from it, so it's a raw image which I wanted to use as a disc. Tried both with engine-iso-uploader and engine-image-uploader but they refure for diferent reasons.
Is that possible at all ?
Uploading of QCOW images from GUI will hopefully land in 4.0.
In the meantime you can work around it like this: 1. Create a VM and install centos/some other Linux on it 2. Create a new VM disk and attach to VM, not the disk device 3. Copy the image from the file to the disk device with virt-resize. 4. Detach the disk from the VM and build a new VM around it
Optionally: 1. Convert the VM from step #4 to a template 2. Re use the VM from step #1 to upload more images.
HTH,

--Apple-Mail=_94047A80-BCD2-444A-8934-B09A8AAD6A12 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Alternatively you can put the image manually to any location, reachable = by qemu and use vmdisk hook to attach the image to VM at start. -- Dmitry Glushenok Jet Infosystems http://www.jet.msk.su <http://www.jet.msk.su/>+7-495-411-7601 (ext. = 1237)
8 =D0=B8=D1=8E=D0=BD=D1=8F 2016 =D0=B3., =D0=B2 15:58, Fernando = Frediani <fernando.frediani@upx.com.br> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0= =D0=BB(=D0=B0): =20 Hi there, =20 I'm spending a fair amount of time to find out how (if possible) to = upload a .img image to a oVirt Storage Domain and be able to mount it in = a VM as a disk. =20 It is a OpenWRT image and there is no OVF from it, so it's a raw image = which I wanted to use as a disc. Tried both with engine-iso-uploader and = engine-image-uploader but they refure for diferent reasons. =20 Is that possible at all ? =20 Fernando _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--Apple-Mail=_94047A80-BCD2-444A-8934-B09A8AAD6A12 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D"">Alternatively you can put the image manually = to any location, reachable by qemu and use vmdisk hook to attach the = image to VM at start.</div><br class=3D""><div class=3D""> <div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; orphans: = auto; text-align: start; text-indent: 0px; text-transform: none; = white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; = orphans: auto; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; = orphans: auto; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; = orphans: auto; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; = orphans: auto; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-stroke-width: 0px; word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><div class=3D"">--</div><div class=3D""><div class=3D"" = style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;"><div class=3D"" = style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;"><div class=3D"" = style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;"><div class=3D"">Dmitry = Glushenok</div><div class=3D"">Jet Infosystems</div><div class=3D""><a = href=3D"http://www.jet.msk.su" = class=3D"">http://www.jet.msk.su</a></div></div></div></div>+7-495-411-760= 1 (ext. 1237)</div></div></div></div></div></div> </div> <br class=3D""><div><blockquote type=3D"cite" class=3D""><div class=3D"">8= =D0=B8=D1=8E=D0=BD=D1=8F 2016 =D0=B3., =D0=B2 15:58, Fernando Frediani = <<a href=3D"mailto:fernando.frediani@upx.com.br" = class=3D"">fernando.frediani@upx.com.br</a>> = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0):</div><br = class=3D"Apple-interchange-newline"><div class=3D"">Hi there,<br = class=3D""><br class=3D"">I'm spending a fair amount of time to find out = how (if possible) to upload a .img image to a oVirt Storage Domain and = be able to mount it in a VM as a disk.<br class=3D""><br class=3D"">It = is a OpenWRT image and there is no OVF from it, so it's a raw image = which I wanted to use as a disc. Tried both with engine-iso-uploader and = engine-image-uploader but they refure for diferent reasons.<br = class=3D""><br class=3D"">Is that possible at all ?<br class=3D""><br = class=3D"">Fernando<br = class=3D"">_______________________________________________<br = class=3D"">Users mailing list<br class=3D""><a = href=3D"mailto:Users@ovirt.org" class=3D"">Users@ovirt.org</a><br = class=3D"">http://lists.ovirt.org/mailman/listinfo/users<br = class=3D""></div></blockquote></div><br class=3D""></body></html>= --Apple-Mail=_94047A80-BCD2-444A-8934-B09A8AAD6A12--
participants (4)
-
Barak Korren
-
Fernando Frediani
-
Nir Soffer
-
Дмитрий Глушенок