> dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1<br><br>I think if you do this, you are only backing up the first 512 bytes of the logical volume, not the MBR.<br><br>Someone correct me if I am wrong.<br>
<br>-- <br>Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)<br>Alma Maters:<br>(1) Singapore Polytechnic<br>(2) National University of Singapore<br>My Primary Blog: <a href="http://teo-en-ming-aka-zhang-enming.blogspot.com">http://teo-en-ming-aka-zhang-enming.blogspot.com</a><br>
My Secondary Blog: <a href="http://enmingteo.wordpress.com">http://enmingteo.wordpress.com</a><br>My Youtube videos: <a href="http://www.youtube.com/user/enmingteo">http://www.youtube.com/user/enmingteo</a><br>Email: <a href="mailto:space.time.universe@gmail.com">space.time.universe@gmail.com</a><br>
Mobile Phone (Starhub Prepaid): +65-8369-2618<br>Street: Bedok Reservoir Road<br>Country: Singapore<br><br><div class="gmail_quote">On Thu, Nov 12, 2009 at 9:36 AM, Geert Janssens <span dir="ltr"><<a href="mailto:info@kobaltwit.be">info@kobaltwit.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Thursday 12 November 2009, Mr. Teo En Ming (Zhang Enming) wrote:<br>
> Hi All,<br>
><br>
> I have several Xen virtual machines within logical volumes using LVM2. I<br>
> did not use disk images for performance reasons.<br>
><br>
> Conventionally, if I want to clone my virtual machines, I have to dd the LV<br>
> to an image file. But this consumes a lot of time and harddisk space.<br>
><br>
> So, instead of doing that, I want to use losetup and kpartx with my logical<br>
> volumes, which contain operating systems of virtual machines.<br>
><br>
> I can backup the filesystems of a virtual machine in this way:<br>
><br>
> # losetup /dev/loop1 /dev/virtualmachines/windows7-x64<br>
><br>
</div>Are you sure you need to call losetup first ?<br>
<br>
I remember I used kpartx directly on the lvm containing my vbd.<br>
<br>
Also, I think you can treat the lvm based vbd as a real disk.<br>
<br>
So<br>
dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1<br>
<br>
should backup your mbr.<br>
<br>
Anyone correct me if I'm wrong please.<br>
<br>
Geert<br>
<br>
--<br>
Kobalt W.I.T.<br>
Web & Information Technology<br>
Brusselsesteenweg 152<br>
1850 Grimbergen<br>
<br>
Tel  : +32 479 339 655<br>
Email: <a href="mailto:info@kobaltwit.be">info@kobaltwit.be</a><br>
<br>
<br>
_______________________________________________<br>
Xen-users mailing list<br>
<a href="mailto:Xen-users@lists.xensource.com">Xen-users@lists.xensource.com</a><br>
<a href="http://lists.xensource.com/xen-users" target="_blank">http://lists.xensource.com/xen-users</a><br>
</blockquote></div><br><br clear="all"><br><br>