qcow2 to bootable iso

CptCharis

Well-Known Member
Joined
Feb 27, 2018
Messages
563
Reaction score
465
Credits
982
Hello everybody.
I have a nice installation of arch i3 in my kvm virtual machine and I would like to make it an iso so I can transfer in to a real machine.
I google around and the best way o found is below command
Code:
qemu-img convert -f qcow2 -O raw my-qcow2.img /dev/sdb
the command produce a raw image from qcow2 image and copy it into a usb stick.
Once I try to boot up from this usb stick
Arch grub menu page is open normally but after that it drop to
Rootfs
Error msg: device UUID=‘number-of-device’ not found.
Dropped in an emergency shell.
It something that looks normal since the hard disk is not there but is there any way to produce a bootable usb somehow?
Thanks a lot.
 


wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
8,951
Reaction score
7,922
Credits
37,703
G'day Capta :), I may not be your Man to help, but can you tell us the source of the linux command for qemu-img?

It may help.

Cheers

Chris

Friday here in Oz so Avagudweegend
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
6,259
Reaction score
4,732
Credits
45,987
I did that once and got it working but it was a long time ago so can't remember exactly what I did, keep in mind if you want this to work with uefi boot your vm/raw image also has to have efi boot enabled. As for converting a virtual machine to a physical machine and viceversa, the Archwiki has a page dedicated to that topic.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
8,951
Reaction score
7,922
Credits
37,703
OK, bearing in mind that the question there was asked and answered over 9 years ago, conditions may have changed.

Below that one answer are a number of comments dated 2018 through to 2020, they may be more relevant.

One says

Code:
qemu-img dd -f qcow2 -O raw bs=4M if=/vm-images/image.qcow2 of=/dev/sdd1

I wonder if that would be likely to work?

Wiz
 
OP
CptCharis

CptCharis

Well-Known Member
Joined
Feb 27, 2018
Messages
563
Reaction score
465
Credits
982
OK, bearing in mind that the question there was asked and answered over 9 years ago, conditions may have changed.

Below that one answer are a number of comments dated 2018 through to 2020, they may be more relevant.

One says

Code:
qemu-img dd -f qcow2 -O raw bs=4M if=/vm-images/image.qcow2 of=/dev/sdd1

I wonder if that would be likely to work?

Wiz
Exactly the same situation Chris. Same error.
 
OP
CptCharis

CptCharis

Well-Known Member
Joined
Feb 27, 2018
Messages
563
Reaction score
465
Credits
982
I did that once and got it working but it was a long time ago so can't remember exactly what I did, keep in mind if you want this to work with uefi boot your vm/raw image also has to have efi boot enabled. As for converting a virtual machine to a physical machine and viceversa, the Archwiki has a page dedicated to that topic.
Thanks. I tried but I faced same other issues.
e.x permission issues with share folders, rsync command not response etc.
anyway keep searching. Thanks again
 

Members online


Top