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

Re: [virt-tools-list] Sparse in Virt-clone



Hi Richard,
Thanks for the input,

I have mentioned In my previous mail the code snippet which is affecting the size of the cloned image, But I am not sure if this is the correct way to do this.

I managed to get a fully working cloned VM (from virt-clone) with size even less than the original one . That is the reason I am confused about this Code change.

And I also want to know why sparse in VolumeDisk.py  code snippet mentioned in my previous mail is initially FALSE

Regards,
Pankaj Rawat
NECHCL ST



-----Original Message-----
From: Richard W.M. Jones [mailto:rjones redhat com]
Sent: 12 September 2012 15:16
To: Pankaj Rawat
Cc: 'virt-tools-list redhat com'
Subject: Re: [virt-tools-list] Sparse in Virt-clone


On Wed, Sep 12, 2012 at 07:28:46AM +0000, Pankaj Rawat wrote:
>
> Hi all,
>
> I am trying to clone a lvm2 image following thing haapens when I clone
> a image with virt-clone command
>
> virt-clone --prompt --force --original  lvm_thin_1 --name  lvm_thin_2
> --file /dev/volgrp/lvm_thin2
>
> Now when I clone this,  It clone successfully but the cloned image is
> fully expanded ,  I mean it takes all 100% space

virt-clone doesn't give you much value here.  It basically makes a few changes to the libvirt XML configuration (like assigning a new name and UUID) which you could easily do yourself.

So the real question is how to copy a thin-provisioned LV and keep it sparse.  I don't see a way to do this, but you could create a snapshot of the original using the regular tools (lvcreate).

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw



DISCLAIMER:

-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended

for the named recipient(s) only. 

It shall not attach any liability on the originator or NECHCL or its

affiliates. Any views or opinions presented in 

this email are solely those of the author and may not necessarily reflect the

opinions of NECHCL or its affiliates. 

Any form of reproduction, dissemination, copying, disclosure, modification,

distribution and / or publication of 

this message without the prior written consent of the author of this e-mail is

strictly prohibited. If you have 

received this email in error please delete it and notify the sender

immediately. .

-----------------------------------------------------------------------------------------------------------------------


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