As you are running Windows, I will assume that you are using HVM,
and therefore that /dev/virtualmachines/windows7-x64 is a hard disk image.
As such, the command you listed will back up the MBR, including the
partition table. That isn't to say that Windows 7 doesn't have additional
boot information outside of the MBR, but that information would be included
in a file system backup. Wikipedia has the structure of the MBR in a table
at http://en.wikipedia.org/wiki/Master_boot_record. On that note, I often
use bs=446 when I want the MBR without the partition table, but if you are
backing up the partition as opposed to the file structure, then you might as
well keep the partition table (or even just back up the image).
Dustin
From: fedora-xen-bounces@xxxxxxxxxx [mailto:fedora-xen-bounces@xxxxxxxxxx]
On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: Thursday, November 12, 2009 04:45
To: Geert Janssens
Cc: Community assistance, encouragement, and advice for using Fedora.;
xen-users@xxxxxxxxxxxxxxxxxxx; Fedora Xen
Subject: [Fedora-xen] Re: [Xen-users] How to Backup and Restore MBR within
Logical Volumes?
> dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
I think if you do this, you are only backing up the first 512 bytes of the
logical volume, not the MBR.
Someone correct me if I am wrong.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe@xxxxxxxxx
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
On Thu, Nov 12, 2009 at 9:36 AM, Geert Janssens <info@xxxxxxxxxxxx> wrote:
On Thursday 12 November 2009, Mr. Teo En Ming (Zhang Enming) wrote:
> Hi All,
>
> I have several Xen virtual machines within logical volumes using LVM2. I
> did not use disk images for performance reasons.
>
> Conventionally, if I want to clone my virtual machines, I have to dd the
LV
> to an image file. But this consumes a lot of time and harddisk space.
>
> So, instead of doing that, I want to use losetup and kpartx with my
logical
> volumes, which contain operating systems of virtual machines.
>
> I can backup the filesystems of a virtual machine in this way:
>
> # losetup /dev/loop1 /dev/virtualmachines/windows7-x64
>
Are you sure you need to call losetup first ?
I remember I used kpartx directly on the lvm containing my vbd.
Also, I think you can treat the lvm based vbd as a real disk.
So
dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
should backup your mbr.
Anyone correct me if I'm wrong please.
Geert
--
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen
Tel : +32 479 339 655
Email: info@xxxxxxxxxxxx
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|