[Top][All Lists]

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

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

From: Djordje Dragic
Subject: Re: [Qemu-discuss] Wrap a disk partition to make a disk
Date: Tue, 16 Sep 2014 10:22:43 +0200

I've heard its not easy to add some data to a beginning of huge file, in Linux,
without a lot of copying.

Some people on internet have used .vmdk format for this. 
It enables you to have MBR and other partitions in separate files from that one 
If qemu can use .vmdk, that might be a good solution.

On Mon, 15 Sep 2014 10:30:43 -0400
address@hidden (Dale R. Worley) wrote:

> 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]