Attach cdrom iso when vm is powered on

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

Hello @Liorme

What error do you get?

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?

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