qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Wrap a disk partition to make a disk


From: Dale R. Worley
Subject: [Qemu-discuss] Wrap a disk partition to make a disk
Date: Mon, 15 Sep 2014 10:30:43 -0400

I can see situations where I have a disk partition (either a real
partition, /dev/sdx7, or in a file) that I want to present to a
virtual machine as a partition on a disk, but the partition isn't
inside a disk image.

It struck me that one can straightforwardly "wrap" a partition with an
MBR, partition table, and a few sectors of padding to make a disk
image.  You can put the MBR, partition table, and padding in a small
temporary file, and then use "dm" to assemble a virtual disk device
that looks like a disk image containing the partition.  This virtual
disk can be made available to Qemu.

Has anyone written a program to do this?

Dale



reply via email to

[Prev in Thread] Current Thread [Next in Thread]