Hi<div><br></div><div>I should also point out that I can clone</div><div><br></div><div>virt-clone --original centos6template-DONTSTART -n centos6.new -f /dev/vgpool/centos6.new</div><div><br></div><div>If non existing LVM volume exists....</div>

<div><br></div><div>I can confirm that it 100% using LVM volumes I just can't clone into existing LVM volumes (I can on Ubuntu 10.04)</div><div><br></div><div>Is this a config issue?</div><div><br></div><div>any help would be welcomed.</div>

<div><br></div><div>Regards</div><div><br></div><div><br><br><div class="gmail_quote">On 12 July 2012 10:20, Morgan Cox <span dir="ltr"><<a href="mailto:morgancoxuk@gmail.com" target="_blank">morgancoxuk@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
I'm pretty sure there is nothing wrong with the LVM partitioning - I<br>
am using the same partitioning/methods on a older (ubuntu 10.04)<br>
server.<br>
<br>
Just a note it is a Ubuntu 12.04 server that has the issue...<br>
<br>
-------------------------------<br>
vgdisplay vgpool<br>
  --- Volume group ---<br>
  VG Name               vgpool<br>
  System ID<br>
  Format                lvm2<br>
  Metadata Areas        1<br>
  Metadata Sequence No  55<br>
  VG Access             read/write<br>
  VG Status             resizable<br>
  MAX LV                0<br>
  Cur LV                6<br>
  Open LV               3<br>
  Max PV                0<br>
  Cur PV                1<br>
  Act PV                1<br>
  VG Size               874.77 GiB<br>
  PE Size               4.00 MiB<br>
  Total PE              223941<br>
  Alloc PE / Size       35789 / 139.80 GiB<br>
  Free  PE / Size       188152 / 734.97 GiB<br>
  VG UUID               uPK29Y-cygJ-irzN-4rX1-9MLk-WDQ5-3UWlRo<br>
<br>
------------------------------<br>
<br>
lvcreate -L 4000M -n lvol0 vgpool<br>
  Logical volume "lvol0" created<br>
<br>
mkfs -t ext4 -m 1 -v /dev/vgpool/lvol0<br>
<br>
virt-clone -o centos6template-DONTSTART -n centos6.new -f /dev/vgpool/lvol0<br>
<div class="im">ERROR    Clone onto existing storage volume is not supported:<br>
</div>'/dev/vgpool/lvol0'<br>
<br>
Still getting the same thing<br>
<br>
Any ideas how to troubleshoot this further ?<br>
<br>
Regards<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On 12 July 2012 07:04, Lei Cui <<a href="mailto:lcui@redhat.com">lcui@redhat.com</a>> wrote:<br>
> Hi Morgan,<br>
> I could not reproduce your issue on RHEL6.3, would you please check your existing LVM is working fine?<br>
> I doubt about your command:<br>
>> virt-clone --original NAME.test --name NAME -f /dev/vgpool/NAME<br>
> '/dev/vgpool/NAME' is it a logic volume?In this scenario, I think it should be the LVM device name following '-f'. As in man doc about virt-clone, here is the explanation of -f parameter<br>
> "<br>
>        -f DISKFILE, --file=DISKFILE<br>
>          Path to the file, disk partition, or logical volume to use as the backing store for the new guest's virtual disk.<br>
> "<br>
> Here are my steps for clone a guest to existing LVM, the new guest could be created successfully and start normally. Please refer to<br>
> 1. Create a LVM<br>
> 1) fdisk /dev/sdb<br>
> With a serious input in fdisk command to create a Linux LVM type partition(8e)<br>
> 2) pvcreate /dev/sdb1<br>
> 3) vgcreate -s 16M vg0 /dev/sdb1<br>
> 4) lvcreate -L 60000M -n lvol0 vg0<br>
> 5) mkfs -t ext3 -m 1 -v /dev/vg0/lvol0<br>
> 6) vgdisplay vg0 (check the lvm status)<br>
> 2. Clone a guest to existing LVM<br>
> 1) virt-clone -o vm1 -n vm1-new -f /dev/vg0/lvol0<br>
><br>
> after a while, pop up 'Clone vm1-new created successfully.<br>
><br>
> thanks<br>
> Lei<br>
><br>
><br>
> ----- 原始邮件 -----<br>
> 发件人: "yupzhang" <<a href="mailto:yupzhang@redhat.com">yupzhang@redhat.com</a>><br>
> 收件人: <a href="mailto:v2v-qe-list@redhat.com">v2v-qe-list@redhat.com</a><br>
> 发送时间: 星期四, 2012年 7 月 12日 上午 10:23:23<br>
> 主题: [v2v-qe] Fwd: Re: [virt-tools-list] [libvirt-users] I can't virt-clone into an existing LVM now (ERROR: clone onto existing storage volume is not supported:) - i could in previous lbvirt versions? (deployment scripts no longer work...)<br>


><br>
> Hi Lei,<br>
><br>
> Please have a look this problem of virt-clone.<br>
><br>
> Thanks<br>
> Yuping<br>
> -------- Original Message --------<br>
> Subject:        Re: [virt-tools-list] [libvirt-users] I can't virt-clone into an existing LVM now (ERROR: clone onto existing storage volume is not supported:) - i could in previous lbvirt versions? (deployment scripts no longer work...)<br>


> Date:   Wed, 11 Jul 2012 08:38:31 -0600<br>
> From:   Eric Blake <<a href="mailto:eblake@redhat.com">eblake@redhat.com</a>><br>
> Organization:   Red Hat<br>
> To:     Morgan Cox <<a href="mailto:morgancoxuk@gmail.com">morgancoxuk@gmail.com</a>><br>
> CC:     <a href="mailto:libvirt-users@redhat.com">libvirt-users@redhat.com</a> , virt-tools-list <<a href="mailto:virt-tools-list@redhat.com">virt-tools-list@redhat.com</a>><br>
><br>
> [adding virt-tools-list]<br>
><br>
> On 07/11/2012 04:36 AM, Morgan Cox wrote:<br>
>> Hi<br>
>><br>
>> To deploy KVM vms I use a KVM template + script - which is cloned, then<br>
>> cloned again and resized - using virt-resize.<br>
>><br>
>> i.e<br>
>><br>
>> ----------------------------------------------------<br>
>><br>
>> virt-clone --original debian6template-DONTSTART --name NAME.test -f<br>
>> /dev/vgpool/NAME.test<br>
>><br>
>> virsh vol-create-as vgpool NAME 8G<br>
>><br>
>> virt-clone --original NAME.test --name NAME -f /dev/vgpool/NAME<br>
>><br>
>> virt-resize --expand /dev/sda1 /dev/vgpool/NAME.test /dev/vgpool/NAME<br>
>><br>
>> ----------------------------------------------------<br>
>><br>
>> The reason I clone twice is because I know that virt-clone does things to<br>
>> prep it for a new install, also the whole point was to be able to specify a<br>
>> size to be clone into (hence the use of virt-resize)<br>
>><br>
>> This worked fine on our Ubuntu 11.10 server, however in Ubuntu 12.04 when I<br>
>> try to do the same I get the error<br>
>><br>
>> 'ERROR    Clone onto existing storage volume is not supported:<br>
>> '/dev/vgpool/test'<br>
><br>
> virt-clone is a separate package from libvirt, I'm hoping that someone<br>
> on the virt-tools-list has more insight into whether this was an<br>
> accidental regression.<br>
><br>
>><br>
>> If I can't virt-clone into an existing LVM I know I can clone once - then<br>
>> resize with LVM, then virt-resize into the partition (then virt-sysprep) -<br>
>> however the issue with that is that it is far more fiddly to mange...<br>
>><br>
>> Previously could just make a 20GB partition and use virt-resize to expand<br>
>> into - using the above method I would have to increase the LVM to the value<br>
>> I want minus the size of the template..<br>
>> i.e I have to specify - the  amount to increase by, rather than the final<br>
>> size I want.... The templates also change size (when I update them, etc)<br>
>> which would mean re-writting the script after every update.<br>
>><br>
>> Is there a way I can re-enable being able to virt-clone to an existing LVM<br>
>> partition ? As mentioned it works 100% fine in Ubuntu 10.04<br>
>><br>
><br>
><br>
> --<br>
> Eric Blake <a href="mailto:eblake@redhat.com">eblake@redhat.com</a> <a href="tel:%2B1-919-301-3266" value="+19193013266">+1-919-301-3266</a><br>
> Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
</div></div></blockquote></div><br></div>