You are not logged in.

#1 2015-11-05 22:04:07

hatahata50
Banned
Registered: 2014-11-29
Posts: 47
Website

make a real machine from virtual image (qcow2)

Hi all .
i have done  this on openbsd  .

i boot arch .
and by using openbsd as kvm host , i make world of openbsd .
and copy the contents of qcow2 to sdb1 , and i boot openbsd current on sdb1 .



why kvm ? ->        if compiling  fails  , i only erase the qemu image file .
                       and if succeed ,           back up is easy only to copy  the qemu image file .
               
details is here .
http://openbsd-akita.blogspot.jp/2015/1 … chine.html

archlinux also can do the same thing .
------
regards , tuyosi

Last edited by hatahata50 (2015-11-09 07:35:06)

Offline

#2 2015-11-08 03:17:26

techwiz
Member
Registered: 2012-01-26
Posts: 48

Re: make a real machine from virtual image (qcow2)

Not quite sure what you're asking here, but I think you're trying to write a qemu image to a disk? If the qemu disk is raw, you could probably just use `dd` to copy onto a physical disk, assuming the disk and image are identical. The other option I guess would be to mount the qemu disk and copy out the contents.

Offline

#3 2015-11-09 04:19:26

hatahata50
Banned
Registered: 2014-11-29
Posts: 47
Website

Re: make a real machine from virtual image (qcow2)

yes, i write a qemu  qcaw2 image to a disk by tar over ssh .
and
i can boot not by virtual image  but by  ***real*** hard disk .

can you believe this fact ?
see http://openbsd-akita.blogspot.jp/2015/1 … chine.html again .
particurely  [ yikes   3rd story ]  is a writing about Linux .
 
i dreamed the impossible dream but it becames true .

big memory fast CPU machine compile i386 code on kvm virtual mchine , and compiled binary is sent to real partition(sda3)
and PC is booted on that partition(sda3) .
it is paniful to compile on genuine i386 machine (slow CPU  little memory)


[---kvm host------------( kvm  guest)-----]
                                         |
                                         |  tar over ssh
                                         -----------------------------> {sdb1}

i hear that aqemu can do this also , is it true or not ?
because in debiandog i can not boot aqemu .

Last edited by hatahata50 (2015-11-09 09:27:10)

Offline

#4 2015-11-09 17:30:51

c0mm0ner
Member
Registered: 2015-11-09
Posts: 93

Re: make a real machine from virtual image (qcow2)

You could mount your qcow-file locally using qemu-nbd and copy the content. Using incremental copies you would as well minimize the amount of data to transfer.

Offline

#5 2015-11-09 20:15:51

hatahata50
Banned
Registered: 2014-11-29
Posts: 47
Website

Re: make a real machine from virtual image (qcow2)

your hint is great .
i read https://www.kumari.net/index.php/system … qemu-image .

and try
# modprobe nbd max_part=8
# qemu-nbd --connect=/dev/nbd0 /mnt/sda3/home/yuma/TC-5.img
# mount /dev/nbd0p1 /mnt/kvm
# ls /mnt/kvm
lost+found mydata.tgz tce

COPY

sudo umount /mnt/kvm
sudo qemu-nbd --disconnect /dev/nbd0


lol  suplendid !

in Linux chose of qemu-nbd is much better than tar over ssh .
  qemu-nbd  is more safe because copy the content of not running OS .)

thanks very much .

about arch's qemu of my writing :  http://hatahata50.blogspot.jp/2015/10/a … -qemu.html
                                                       ( written in japanese , but there is machine tranlation  at the end . )


(PS)
http://qemuandopenbsd.blogspot.jp/2015/ … qcow2.html

Last edited by hatahata50 (2015-11-15 00:34:04)

Offline

Board footer

Powered by FluxBB