# Live editing/tuning disk IOPS limits?

**URL:** <https://forum.opennebula.io/t/live-editing-tuning-disk-iops-limits/13437>\
**Category:** Operations\
**Created:** [January 8, 2025, 7:37am UTC](https://forum.opennebula.io/t/live-editing-tuning-disk-iops-limits/13437 "2025-01-08T07:37:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [January 8, 2025, 7:37am UTC](https://forum.opennebula.io/t/live-editing-tuning-disk-iops-limits/13437/1 "2025-01-08T07:37:32Z")

</div>

Hi all,

is it possible to tune parameters of a running VM, in particular `DISK/WRITE_IOPS_SEC`? I tried to update the VM template in Sunstone (VM →Conf →Update Configuration →Advanced, and then adding `WRITE_IOPS_SEC = "50"` to the `DISK = [...]` section), but as long as I save the template, it remains unchanged.

This is probably related to this old thread:

> [@Manage IOPs Limit for VMs](https://forum.opennebula.io/t/manage-iops-limit-for-vms/7464):
>
> Hello, I’m running into trouble limiting the drive speed of the VMs. At the moment there are several VMs installed with no IOPs limit configured. Is there a possibility to set a global Limit to make sure that the VMs are running, on let`s say a maximum of 500 IOPs per VM? I have tried to change the Template, deattached the current storage from the VM, created a new VM with the new Template and attached the old Storage to the VM. After i have attached the old Storage the Limit is gone and th…

Thanks,

-Yenya

---

<div class="post-metadata">

**Author:** ![pczerny](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/pczerny/32/6224_2.png) [@pczerny](https://forum.opennebula.io/u/pczerny)\
**Post date:** [January 16, 2025, 8:44am UTC](https://forum.opennebula.io/t/live-editing-tuning-disk-iops-limits/13437/3 "2025-01-16T08:44:07Z")

</div>

Unfortunately, there is no option to update VM disk attributes, not even for powered-off VMs. The best you can do is detach the disk and attach it again with new attributes.

---

<div class="post-metadata">

**Author:** ![DeBuXer](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/debuxer/32/8434_2.png) [@DeBuXer](https://forum.opennebula.io/u/DeBuXer)\
**Post date:** [January 30, 2025, 3:39pm UTC](https://forum.opennebula.io/t/live-editing-tuning-disk-iops-limits/13437/4 "2025-01-30T15:39:10Z")

</div>

If you want to do this live, it must be done on the hypervisor where the instance is running. With libvirt, you can do it as follows:

Show which targets the instance has:

```auto
virsh domblklist one-<id>

```

Show the current settings of the target:

```auto
virsh blkdeviotune one-<id> vdX
or
virsh blkdeviotune one-<id> sdX

```

Update the settings live:

```auto
virsh blkdeviotune one-<id> sdX --live --write-iops-sec <value>

```

And don’t forget to modify the instance with `onedb` afterward, so that the settings are not lost when you power off and power on the instance.

```auto
onedb update-body vm --id <id>

<WRITE_IOPS_SEC><![CDATA[<value>]]></WRITE_IOPS_SEC>

```
