[new feature] Virtualize real machine

Bug #783062 reported by Abbakus on 2011-05-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Virtualbricks
Wishlist
Abbakus

Bug Description

Virtualize the currently running machine giving the possibility to create destination image on a remote location to avoid the need for local space on a different device to host destination file.

Abbakus (abbakus) wrote :

First solution (quick and dirty)
--------------
dd if=/dev/deviceN of=/path/to/different/device/image.raw bs=1024 conv=notrunc,noerror
qemu-img convert -c -f raw -O qcow2 /path/to/different/device/image.raw /local/machine/image.qcow2
rm /path/to/different/device/image.raw
-------> ~Duplicate time and temporary space. A different local device is needed.

Second solution
--------------
mkfifo /tmp/tempfifo
dd if=/dev/deviceN of=/tmp/tempfifo bs=1024 conv=notrunc,noerror&
qemu-img convert -c -f raw -O qcow2 /tmp/tempfifo /path/to/different/device/image.qcow2
rm /tmp/tempfifo
---------> Does not work, qemu-img does not support fifo :-(

Third solution
--------------
modprobe nbd
qemu-nbd -c /dev/nbd0 /path/to/different/device/image.qcow2
partprobe /dev/nbd0
dd if=/dev/deviceN of=/dev/nbd0 conv=notrunc,noerror
qemu-nbd -d /dev/nbd0
----> Works but is pretty slow and nbd module is needed. No duplicate space to obtain qcow2 format.

Fifth solution
--------------
dd if=/dev/deviceN bs=2048 conv=notrunc,noerror|gzip|ssh remoteuser@remotemachine "cut - | gunzip | dd of=/path/to/image/image.raw bs=2048 conv=notrunc,noerror"
------> Slow but a different local device is not needed. I tried this one and works pretty good :)

Sixth solution
---------
combination of solutions above (especially Fourth and Fifth)
--------

Changed in virtualbrick:
importance: Undecided → Wishlist
assignee: nobody → Abbakus (abbakus)
milestone: none → 0.5
Abbakus (abbakus) wrote :

Did you notice the "Fourth solution" is missing? :-)

Fourth solution
------------------
Fdisk an image file then assign to loopback, format, mount and copy all files inside
------------

Sixth solution
---------
combination of solutions above (especially *Thirdh* and Fifth)
--------

Changed in virtualbrick:
milestone: 0.5 → none
Changed in virtualbrick:
status: New → Opinion
milestone: none → 1.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers