Morgan Cox
2012-Jul-11 10:36 UTC
[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 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' 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 Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120711/dd019756/attachment.htm>
Eric Blake
2012-Jul-11 14:38 UTC
[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...)
[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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 620 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120711/c15879cb/attachment.sig>
Seemingly Similar Threads
- Virt-resize error (ntfs) : Fatal error: exception Guestfs.Error("ntfsresize_opts: /dev/vda2)
- LVM SR-backend, vm-clone - find out dependent logical volumes
- Clone Xen Guest (LVM)
- [Marketing Mail] Create CentOS 6 system as "clone" of another - with LVM and different disk sizes
- [Marketing Mail] Re: [External] Re: [Marketing Mail] Create CentOS 6 system as "clone" of another - with LVM and different disk sizes