[virt-tools-list] [v2v-qe] Fwd: Re: [libvirt-users] I can't virt-clone into an existing LVM now (ERROR: clone onto existing storage volume is not supported:)

Morgan Cox morgancoxuk at gmail.com
Thu Jul 12 09:20:26 UTC 2012


Hi

I'm pretty sure there is nothing wrong with the LVM partitioning - I
am using the same partitioning/methods on a older (ubuntu 10.04)
server.

Just a note it is a Ubuntu 12.04 server that has the issue...

-------------------------------
vgdisplay vgpool
  --- Volume group ---
  VG Name               vgpool
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  55
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                6
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               874.77 GiB
  PE Size               4.00 MiB
  Total PE              223941
  Alloc PE / Size       35789 / 139.80 GiB
  Free  PE / Size       188152 / 734.97 GiB
  VG UUID               uPK29Y-cygJ-irzN-4rX1-9MLk-WDQ5-3UWlRo

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

lvcreate -L 4000M -n lvol0 vgpool
  Logical volume "lvol0" created

mkfs -t ext4 -m 1 -v /dev/vgpool/lvol0

virt-clone -o centos6template-DONTSTART -n centos6.new -f /dev/vgpool/lvol0
ERROR    Clone onto existing storage volume is not supported:
'/dev/vgpool/lvol0'

Still getting the same thing

Any ideas how to troubleshoot this further ?

Regards




On 12 July 2012 07:04, Lei Cui <lcui at redhat.com> wrote:
> Hi Morgan,
> I could not reproduce your issue on RHEL6.3, would you please check your existing LVM is working fine?
> I doubt about your command:
>> virt-clone --original NAME.test --name NAME -f /dev/vgpool/NAME
> '/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
> "
>        -f DISKFILE, --file=DISKFILE
>          Path to the file, disk partition, or logical volume to use as the backing store for the new guest's virtual disk.
> "
> Here are my steps for clone a guest to existing LVM, the new guest could be created successfully and start normally. Please refer to
> 1. Create a LVM
> 1) fdisk /dev/sdb
> With a serious input in fdisk command to create a Linux LVM type partition(8e)
> 2) pvcreate /dev/sdb1
> 3) vgcreate -s 16M vg0 /dev/sdb1
> 4) lvcreate -L 60000M -n lvol0 vg0
> 5) mkfs -t ext3 -m 1 -v /dev/vg0/lvol0
> 6) vgdisplay vg0 (check the lvm status)
> 2. Clone a guest to existing LVM
> 1) virt-clone -o vm1 -n vm1-new -f /dev/vg0/lvol0
>
> after a while, pop up 'Clone vm1-new created successfully.
>
> thanks
> Lei
>
>
> ----- 原始邮件 -----
> 发件人: "yupzhang" <yupzhang at redhat.com>
> 收件人: v2v-qe-list at redhat.com
> 发送时间: 星期四, 2012年 7 月 12日 上午 10:23:23
> 主题: [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...)
>
> Hi Lei,
>
> Please have a look this problem of virt-clone.
>
> Thanks
> Yuping
> -------- Original Message --------
> 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...)
> Date:   Wed, 11 Jul 2012 08:38:31 -0600
> From:   Eric Blake <eblake at redhat.com>
> Organization:   Red Hat
> To:     Morgan Cox <morgancoxuk at gmail.com>
> CC:     libvirt-users at redhat.com , virt-tools-list <virt-tools-list at redhat.com>
>
> [adding virt-tools-list]
>
> On 07/11/2012 04:36 AM, Morgan Cox wrote:
>> Hi
>>
>> To deploy KVM vms I use a KVM template + script - which is cloned, then
>> cloned again and resized - using virt-resize.
>>
>> i.e
>>
>> ----------------------------------------------------
>>
>> virt-clone --original debian6template-DONTSTART --name NAME.test -f
>> /dev/vgpool/NAME.test
>>
>> virsh vol-create-as vgpool NAME 8G
>>
>> virt-clone --original NAME.test --name NAME -f /dev/vgpool/NAME
>>
>> virt-resize --expand /dev/sda1 /dev/vgpool/NAME.test /dev/vgpool/NAME
>>
>> ----------------------------------------------------
>>
>> The reason I clone twice is because I know that virt-clone does things to
>> prep it for a new install, also the whole point was to be able to specify a
>> size to be clone into (hence the use of virt-resize)
>>
>> This worked fine on our Ubuntu 11.10 server, however in Ubuntu 12.04 when I
>> try to do the same I get the error
>>
>> 'ERROR    Clone onto existing storage volume is not supported:
>> '/dev/vgpool/test'
>
> virt-clone is a separate package from libvirt, I'm hoping that someone
> on the virt-tools-list has more insight into whether this was an
> accidental regression.
>
>>
>> If I can't virt-clone into an existing LVM I know I can clone once - then
>> resize with LVM, then virt-resize into the partition (then virt-sysprep) -
>> however the issue with that is that it is far more fiddly to mange...
>>
>> Previously could just make a 20GB partition and use virt-resize to expand
>> into - using the above method I would have to increase the LVM to the value
>> I want minus the size of the template..
>> i.e I have to specify - the  amount to increase by, rather than the final
>> size I want.... The templates also change size (when I update them, etc)
>> which would mean re-writting the script after every update.
>>
>> Is there a way I can re-enable being able to virt-clone to an existing LVM
>> partition ? As mentioned it works 100% fine in Ubuntu 10.04
>>
>
>
> --
> Eric Blake eblake at redhat.com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org




More information about the virt-tools-list mailing list