4

Hi all :) I want to create a KVM image from an existing iso file (for glance on OpenStack), but I didn't find how to do it. Can you help me please?

6
  • Normally you would just boot the iso with KVM.
    – Panther
    May 9, 2013 at 23:53
  • I try it but it didn't work. I must have an existing KVM image to add it to Glance and run it with nova compute.
    – Malek
    May 10, 2013 at 0:02
  • KVM will boot most any live iso image. Are you wanting to create a custom iso ? Clone installations ?
    – Panther
    May 10, 2013 at 0:06
  • I want to create a pre-installed disk images from iso file.
    – Malek
    May 10, 2013 at 0:10
  • 1
    So boot the image, install from the image, and clone the resulting hard disk. help.ubuntu.com/community/KVM/CreateGuests
    – Panther
    May 10, 2013 at 0:17

2 Answers 2

4

Create a VM with a size (6G below) (it will be small until the install is done into it)

qemu-img create myvm.img -f qcow2 6G

Then install the iso into your vm

kvm -m 750 -cdrom ${PWD}/whatever.iso -boot d myvm.img

And run it in 990M of memory:

kvm -m 990 myvm.img
1
  • ubfan, could you review other answer below?
    – Fabby
    Jul 15, 2018 at 13:10
3

This isn’t correct. This is for booting a KVM instance using an image that was created and a foreign ISO.

Maybe something similar to this in order to "convert" an ISO to an qcow2 image. I might be confused about the OP. I was looking to convert an ISO to qcow2.

Your instructions seem right to boot an ISO for an blank qcow2 disk image for a hard drive for 6G.

qemu-img convert -f raw -O qcow2 eProx-Clover.iso eProx-Clover.qcow2

(but it has to flagged as a bootable ISO in order to boot with -d.)

2
  • The question is not all that clear, and the comments add some additional inconsistencies, but the poster is not just trying to convert an ISO to something. glance is used to register/store kvm images, so create the KVM image by installing the ISO, (call this the "pre-install" image?), run it and install any additional packages, then register/store it with glance. My answer stopped at the last "run" step, since the poster didn't specify what if any additional packages they wanted.
    – ubfan1
    Jul 15, 2018 at 16:39
  • This is the solution if your ISO simply doesn't boot and you know it's a bootable ISO.
    – xdevs23
    Apr 28, 2020 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .