qemu-discuss
[Top][All Lists]
Advanced

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

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


From: Tony Su
Subject: Re: [Qemu-discuss] Wrap a disk partition to make a disk
Date: Mon, 15 Sep 2014 11:08:27 -0700

 I think what you're suggesting is commonly done by

1. Create an empty disk image
2. dd the partition into the disk image

Tony

On Mon, Sep 15, 2014 at 7:30 AM, Dale R. Worley <address@hidden> 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]