# Change Disk size in VM from CLI

**URL:** <https://forum.opennebula.io/t/change-disk-size-in-vm-from-cli/10009>\
**Category:** Product Support\
**Created:** [October 8, 2021, 4:40pm UTC](https://forum.opennebula.io/t/change-disk-size-in-vm-from-cli/10009 "2021-10-08T16:40:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [October 8, 2021, 4:40pm UTC](https://forum.opennebula.io/t/change-disk-size-in-vm-from-cli/10009/1 "2021-10-08T16:40:48Z")

</div>

I’m trying to change the default disk size from the CLI before instantiating a VM

From sunstone it’s pretty easy

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/f/fcf3f972dab0367c5909e0b9314bae6a96f8850a.png)

But I can’t find how to do it in the API [onetemplate(1)](https://archives.opennebula.org/doc/4.4/cli/onetemplate.1.html)

Memory attribute changes RAM not disk size

---

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [October 11, 2021, 6:39am UTC](https://forum.opennebula.io/t/change-disk-size-in-vm-from-cli/10009/2 "2021-10-11T06:39:51Z")

</div>

Fixed, just had to add the “size” parameter in the disk section of the template. But I think this should be doable from the the onetemplate command
