# Quick question about the XML-RPC API

**URL:** <https://forum.opennebula.io/t/quick-question-about-the-xml-rpc-api/5417>\
**Category:** Integration Support\
**Created:** [December 13, 2017, 10:04am UTC](https://forum.opennebula.io/t/quick-question-about-the-xml-rpc-api/5417 "2017-12-13T10:04:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssap](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ssap/32/5719_2.png) [@ssap](https://forum.opennebula.io/u/ssap)\
**Post date:** [December 13, 2017, 10:04am UTC](https://forum.opennebula.io/t/quick-question-about-the-xml-rpc-api/5417/1 "2017-12-13T10:04:20Z")

</div>

Hi there,

We are looking for a way to use opennebula XML-RPC API to execute linux commands like for example ‘growpart’ or ‘resize2fs’ inside guest VMs.

Is there any API methods that we can use to do this?

---

<div class="post-metadata">

**Author:** ![tinova](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/tinova/32/25_2.png) [@tinova](https://forum.opennebula.io/u/tinova)\
**Post date:** [December 13, 2017, 11:20am UTC](https://forum.opennebula.io/t/quick-question-about-the-xml-rpc-api/5417/2 "2017-12-13T11:20:02Z")

</div>

The only way that OpenNebula has to launch these commands is at boot time through the context packages:

[http://docs.opennebula.org/5.4/operation/vm\_setup/context\_overview.html](http://docs.opennebula.org/5.4/operation/vm_setup/context_overview.html)

The action is triggered if there is a disk resize, but there is no way to force this other than making the resize through OpenNebula and rebooting the VM.

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [December 14, 2017, 10:35am UTC](https://forum.opennebula.io/t/quick-question-about-the-xml-rpc-api/5417/3 "2017-12-14T10:35:05Z")

</div>

Not ideal, but for basic resizing on linux VMs the following snippet dropped as _/etc/udev/rules.d/90-diskresize.rules_ works for me:

```
SUBSYSTEM!="block", GOTO="oneend"
ACTION=="change", GOTO="onediskresize"
GOTO="oneend"
LABEL="onediskresize"
ENV{PATH}="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
PROGRAM!="/etc/one-context.d/loc-05-grow-rootfs", GOTO="oneend"
LABEL="oneend"

```

It is a little bit weird but crafted this way works on the udev implementations I hit.

Best Regards,  
Anton Todorov

---

<div class="post-metadata">

**Author:** ![ssap](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ssap/32/5719_2.png) [@ssap](https://forum.opennebula.io/u/ssap)\
**Post date:** [December 14, 2017, 11:52am UTC](https://forum.opennebula.io/t/quick-question-about-the-xml-rpc-api/5417/4 "2017-12-14T11:52:51Z")

</div>

Thanks, Anton!

The script is working perfectly 🙂
