[ovirt-users] how to import a disk image w/o associated vm

Andrew Lau andrew at andrewklau.com
Thu Apr 10 05:45:15 UTC 2014


On Wed, Apr 9, 2014 at 11:39 PM, Jeremiah Jahn
<jeremiah at goodinassociates.com> wrote:
> One of the things that I have to where I work, is pull and push disk
> images onto appliances and other physical things.  This is generally
> done with a little dd magic.   We'll start up the appliance in a
> virtual machine and mess with it in one way or another, then when
> we're done we'll take that image and use it to image our appliances
> that we send out.  So we have this collection of  some_system.img
> files laying around.  With virt-manager I can just stick the image
> file in a storage pool somewhere, create a new vm, and attach the
> image.
>
> So my question is how is this done in ovirt. v2v and
> engine-upload-image all want a pre-configured vm to work with. That is
> not what I have. Is there anyway to do this? I thought it'd be
> something like drop an img onto the export domain, and import it,
> create a vm around it. Once done export the image back to the export
> domain and move it someplace to be useful. This is not the case as far
> as I can tell. Am I missing something?

I was just looking at the same thing a few hours ago.. so far I've
found two possible options:

- Create the VM with your disk, find the uuid of that and dd your
source image onto this newly created image
- You should be able to manually create items in your export domain,
they just need a metadata file.

First is a VM export template and the second is an exported VM

[root at ov-engine1 images]# cat
39efaa5f-394c-4842-b791-8eff831bca83/10824522-7e89-4f39-821d-bd7371b23f76.meta
DOMAIN=a571b1f5-b3c6-45d6-99dc-cdc5bdcdc249
VOLTYPE=LEAF
CTIME=1397108117
FORMAT=RAW
IMAGE=39efaa5f-394c-4842-b791-8eff831bca83
DISKTYPE=2
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=1397108118
POOL_UUID=
DESCRIPTION=
TYPE=SPARSE
SIZE=41943040
EOF

[root at ov-engine1 images]# cat
9efe9fea-fb1d-4945-b10a-93d8914638bc/c06a63de-3761-485a-a6e9-92f6ed586254.meta
DOMAIN=a571b1f5-b3c6-45d6-99dc-cdc5bdcdc249
VOLTYPE=SHARED
CTIME=1397108361
FORMAT=RAW
IMAGE=9efe9fea-fb1d-4945-b10a-93d8914638bc
DISKTYPE=2
PUUID=00000000-0000-0000-0000-000000000000
LEGALITY=LEGAL
MTIME=1397108361
POOL_UUID=
SIZE=33554432
TYPE=SPARSE
DESCRIPTION=
EOF

I find the first option would probably be easier. Would be nice to see
a better alternative, ie. the glance import method is quite nice.

>
>
> -jj-
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users



More information about the Users mailing list