Quick question about the XML-RPC API

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?

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


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.

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"
PROGRAM!="/etc/one-context.d/loc-05-grow-rootfs", GOTO="oneend"

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

Best Regards,
Anton Todorov


Thanks, Anton!

The script is working perfectly :slight_smile:

1 Like