# Attach cdrom iso when vm is powered on

**URL:** <https://forum.opennebula.io/t/attach-cdrom-iso-when-vm-is-powered-on/7544>\
**Category:** Operations\
**Created:** [August 8, 2019, 12:37pm UTC](https://forum.opennebula.io/t/attach-cdrom-iso-when-vm-is-powered-on/7544 "2019-08-08T12:37:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liorme](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/liorme/32/6115_2.png) [@Liorme](https://forum.opennebula.io/u/Liorme)\
**Post date:** [August 8, 2019, 12:37pm UTC](https://forum.opennebula.io/t/attach-cdrom-iso-when-vm-is-powered-on/7544/1 "2019-08-08T12:37:26Z")

</div>

i cannot attach a cdrom ISO when a vm is powered on. is there a way to solve this?

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [August 9, 2019, 8:16am UTC](https://forum.opennebula.io/t/attach-cdrom-iso-when-vm-is-powered-on/7544/2 "2019-08-09T08:16:52Z")

</div>

Hello @Liorme

What error do you get?

---

<div class="post-metadata">

**Author:** ![Liorme](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/liorme/32/6115_2.png) [@Liorme](https://forum.opennebula.io/u/Liorme)\
**Post date:** [August 9, 2019, 3:33pm UTC](https://forum.opennebula.io/t/attach-cdrom-iso-when-vm-is-powered-on/7544/3 "2019-08-09T15:33:32Z")

</div>

yes. this is what i get from the log : The CDROM image can only be added as an IDE device when the VM is in the powered off state

i don’t think it’s an error, i think it’s by design. is there any way to go around it?

---

<div class="post-metadata">

**Author:** ![Liorme](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/liorme/32/6115_2.png) [@Liorme](https://forum.opennebula.io/u/Liorme)\
**Post date:** [August 11, 2019, 9:37am UTC](https://forum.opennebula.io/t/attach-cdrom-iso-when-vm-is-powered-on/7544/4 "2019-08-11T09:37:56Z")

</div>

found this :  
Attaching a CDROM to a Virtual Machine  
You can attach a CDROM to a Virtual Machine creating first an OpenNebula image from an ISO file.  
Then the CDROM can be attached to a Virtual Machine template or can be attached to deployed Virtual Machine,  
ONLY if the Virtual Machines is in the POWEROFF state. OpenNebula tries to connect the ISO file as an IDE CDROM drive which is not a hot-pluggable device that’s why the Virtual Machine must not be RUNNING (powered  
on). so it’s a behavior, not a problem. maybe a workaround somehow?  
i’m guessing the problem is that he’s trying to add another cdrom to the system, which is not available hot. but if the opennebula were to attach an iso to an existing cdrom (like vmware does), it will work
