# How to attach a disk in VM through xm rpc API in opennebula 5.0.2?

**URL:** <https://forum.opennebula.io/t/how-to-attach-a-disk-in-vm-through-xm-rpc-api-in-opennebula-5-0-2/3282>\
**Category:** Product Support\
**Created:** [November 15, 2016, 10:22am UTC](https://forum.opennebula.io/t/how-to-attach-a-disk-in-vm-through-xm-rpc-api-in-opennebula-5-0-2/3282 "2016-11-15T10:22:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![surya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/surya/32/5097_2.png) [@surya](https://forum.opennebula.io/u/surya)\
**Post date:** [November 15, 2016, 10:22am UTC](https://forum.opennebula.io/t/how-to-attach-a-disk-in-vm-through-xm-rpc-api-in-opennebula-5-0-2/3282/1 "2016-11-15T10:22:53Z")

</div>

How to attach a disk in VM through xm rpc API in opennebula 5.0.2?while attaching a volatile disk in openebula manually it is not attaching first second showing disk then it disappear next second.how to implement the attaching a new disk in opennebula?

---

<div class="post-metadata">

**Author:** ![mcabrerizo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mcabrerizo/32/4829_2.png) [@mcabrerizo](https://forum.opennebula.io/u/mcabrerizo)\
**Post date:** [November 15, 2016, 3:06pm UTC](https://forum.opennebula.io/t/how-to-attach-a-disk-in-vm-through-xm-rpc-api-in-opennebula-5-0-2/3282/2 "2016-11-15T15:06:38Z")

</div>

Not sure it you’re working with Ranjitha, it that’s so please don’t double post to keep the forum clean and tidy 🙂

Check if that post gives you some orientation:

> [@When attaching the disk in opennebula by using xmlrpc one.vm.attach option.there is an error](https://forum.opennebula.io/t/when-attaching-the-disk-in-opennebula-by-using-xmlrpc-one-vm-attach-option-there-is-an-error/3283):
>
> I’m going to attach a new disk,suddenly the created disk was removed from the list.Any one Can solve the error…

Cheers!
