# Feature Request : VM Backup & Disk resize

**URL:** <https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200>\
**Category:** Integration Support\
**Created:** [May 4, 2016, 1:50pm UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200 "2016-05-04T13:50:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesarems](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jamesarems/32/5454_2.png) [@jamesarems](https://forum.opennebula.io/u/jamesarems)\
**Post date:** [May 4, 2016, 1:50pm UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/1 "2016-05-04T13:50:29Z")

</div>

Hi ,

Kindly look below feature request. Almost all functions in OpenNebula and sunstone are good and am satisfied with it. But am facing some difficulties with absents of below features . I think it most important function for every cloud services .

1 . VM Backup .

There is no option to backup a running VM in current OpenNebula . This is much needed one. Or there is no option for VM export in “qcow2” or “raw” formats …etc .

2 . VM Disk resize

I can able to resize VM Memory , but not able to resize stopped VM disk size . If i need to increase VM space i need to add another disk to that VM . Is there any option to resize vm base storage like vmware and xen ?

3 . VM live migration including snapshots .

I am able to live migrate VM without any snapshot attached on it . But when i took snapshot and went for live migration server is giving error.  
`migrate: Command "virsh --connect qemu:///system migrate --live one-9 qemu+ssh://node2.cloud.ae/system" failed: error: Requested operation is not valid: cannot migrate domain with 1 snapshots`  
Is this is a bug with QEMU or Opennebula?

Please consider this points

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [May 5, 2016, 8:02am UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/2 "2016-05-05T08:02:11Z")

</div>

> jamesarems [https://forum.opennebula.io/users/jamesarems](https://forum.opennebula.io/users/jamesarems)  
> May 4
> 
> Hi ,
> 
> Kindly look below feature request. Almost all functions in OpenNebula and  
> sunstone are good and am satisfied with it. But am facing some difficulties  
> with absents of below features . I think it most important function for  
> every cloud services .

Thanks for the feedback! 🙂

> 1 . VM Backup .
> 
> There is no option to backup a running VM in current OpenNebula . This is  
> much needed one. Or there is no option for VM export in “qcow2” or “raw”  
> formats …etc .

In 4.x releases this can be done per disk-wise with the disk-saveas option,  
there is also a VM saveas option that clones the template and disk images  
(basically iterates over the disks doing a disk-saveas, creates a new  
template and points to the disk copies). In 5.0 we have included a  
instantiate to persistent action that will create a fresh private  
persistent copy of the template. I am not sure if you are aware about this  
features, or they are not enough to implement your use case.

2 . VM Disk resize

> I can able to resize VM Memory , but not able to resize stopped VM disk  
> size . If i need to increase VM space i need to add another disk to that VM  
> . Can we able to resize vm base storage like vmware and xen ?

You are right disk size can only be set at deployment time. Mainly a hot  
resize of a disk also requires work from the VM mainly to resize the FS in  
the disk (which may or may not support resizing). At boot time there is an  
autogrow-fs feature that can be used.

Also you can always attach clean disks to the VM to increase storage. Again  
this needs work from the VM (e.g. add the new disk to a VG to extend a  
logical volumen and the FS within)

> 3 . VM live migration including snapshots .
> 
> I am able to live migrate VM without any snapshot attached on it . But  
> when i took snapshot and went for live migration server is giving error.  
> migrate: Command “virsh --connect  
> qemu:///system migrate --live one-9 qemu+ssh://node2.cloud.ae/system”  
> failed: error: Requested operation is not valid: cannot migrate domain  
> with 1 snapshots  
> Is this bug?

There is a limitation on current versions of libvirt to preserve system  
snapshots while live-migrating the VM. We have an issue for this and  
possible work-arounds…

Again thanks for sharing

> ## Please consider this points .
> 
> Visit Topic  
> [https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/1](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/1)  
> or reply to this email to respond
> 
> To stop receiving notifications for this particular topic, click here  
> [https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/unsubscribe](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/unsubscribe).  
> To unsubscribe from these emails, change your user preferences  
> [https://forum.opennebula.io/my/preferences](https://forum.opennebula.io/my/preferences)

Ruben S. Montero, PhD  
Project co-Lead and Chief Architect  
OpenNebula - Flexible Enterprise Cloud Made Simple  
[www.OpenNebula.org](http://www.OpenNebula.org) | [rsmontero@opennebula.org](mailto:rsmontero@opennebula.org) | @OpenNebula

---

<div class="post-metadata">

**Author:** ![jamesarems](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jamesarems/32/5454_2.png) [@jamesarems](https://forum.opennebula.io/u/jamesarems)\
**Post date:** [May 24, 2016, 1:43pm UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/3 "2016-05-24T13:43:38Z")

</div>

Hi Ruben,

Thanks you very much for your reply .

1 ) For the backup scenario , I can save disk using `onevm` and `oneimage` commands . But how can i export that to a location ? .

Eg : onevm disk-saveas 90 0 export qcow2 /tmp/90.qcow2 (Like this) .

What i am trying to tell you is , if my KVM host failed or got crashed i can use these exported image .  
I am not a big fan of Proxmox but they done this job perfectly .  
2 ) As default qemu-guest-agent is not supported by Opennebula . VM export is only works when vm is on pause/ shutdown state . If i turned off the machine it is not controlled by qemu and not listing under ,  
`virsh list`

So  
`virt-clone --connect=qemu:///system -o one-93 -n NewVM -f /opt/NewVM.qcow2`

above command will not work.  
So by default KVM/Qemu supports offline export but not under Opennebula .  
Please give a solution for this .

---

<div class="post-metadata">

**Author:** ![Astor\_Palmeira](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Astor\_Palmeira](https://forum.opennebula.io/u/Astor_Palmeira)\
**Post date:** [June 7, 2016, 8:52pm UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/4 "2016-06-07T20:52:49Z")

</div>

Hi James and Ruben,

A contribution for this discussion, I found this link about backup with Opnenebula:

> **[report.pdf](https://dsn.felk.cvut.cz/wiki/_media/projekty/backup/data/report.pdf)**
>
> 194.13 KB

Best regards

---

<div class="post-metadata">

**Author:** ![Dian\_Sukmono\_Aji](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@Dian\_Sukmono\_Aji](https://forum.opennebula.io/u/Dian_Sukmono_Aji)\
**Post date:** [June 17, 2016, 8:02am UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/5 "2016-06-17T08:02:46Z")

</div>

Hi All,

I just bump in to this forum a while ago, and i think would be nice if we can do SaveAs a Storage to a new location on the data store with entered filename like Backup\_master.qcow2 instead of /var/lib/one//datastores/102/bcfa05b1b2738a1f5e380c77269d0155 or something like backup and downloaded to some location on the pc.

Best Regards

---

<div class="post-metadata">

**Author:** ![feldsam](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/feldsam/32/4441_2.png) [@feldsam](https://forum.opennebula.io/u/feldsam)\
**Post date:** [December 3, 2017, 12:16am UTC](https://forum.opennebula.io/t/feature-request-vm-backup-disk-resize/2200/6 "2017-12-03T00:16:15Z")

</div>

Hi all, I just release my own backup script [Contribution: OpenNebula backup script for QCOW2 datastores](https://forum.opennebula.io/t/contribution-opennebula-backup-script-for-qcow2-datastores/5368/1)
