As described in https://access.redhat.com/site/documentation//en-US/Red_Hat_Enterprise_Virtualization/3.2/html/Developer_Guide/sect-Sub-Collections-2.html , it's possible to change the CD image used by a running VM through the REST API using ?current. However after changing it, it's not possible to read back this value, a GET on api/vms/d14e4ddc-3dc5-4157-8e4d-f0f807856884/cdroms/00000000-0000-0000-0000-000000000000 or api/vms/d14e4ddc-3dc5-4157-8e4d-f0f807856884/cdroms/00000000-0000-0000-0000-000000000000?current always return the name of the ISO that was used by the VM when it was started. > PUT //api/vms/d14e4ddc-3dc5-4157-8e4d-f0f807856884/cdroms/00000000-0000-0000-0000-000000000000?current= HTTP/1.1 > Soup-Debug-Timestamp: 1380621345 > Soup-Debug: SoupSessionAsync 1 (0x6b1960), SoupMessage 4 (0xa84b90), SoupSocket 5 (0x7fa400) > Host: rhevm33.spice.lab.eng.brq.redhat.com > Content-Type: application/xml > Filter: true > Connection: Keep-Alive > Authorization: Basic [teuf.eng.brq.redhat.com:*********] > > <cdrom> > <file id="10Zig.iso"/> > </cdrom> < HTTP/1.1 200 OK < Soup-Debug-Timestamp: 1380621346 < Soup-Debug: SoupMessage 4 (0xa84b90) < Date: Tue, 01 Oct 2013 09:55:43 GMT < Pragma: No-cache < Cache-Control: no-cache < Expires: Thu, 01 Jan 1970 01:00:00 CET < Content-Type: application/xml < Content-Length: 100 < Vary: Accept-Encoding < Connection: close < < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> < <cdrom> < <file id="10Zig.iso"/> < </cdrom>
*** Bug 876994 has been marked as a duplicate of this bug. ***
Martin, both patches in the external tracker are merged. Can this bug be moved to MODIFIED, or is there still something missing?
seems automation failed to move the status
Verified in ovirt-engine-3.4.0-0.11.beta3.el6.noarch. Verification steps: 1. Create a VM with attached CD "CentOS-6.5-x86_64-minimal.iso" at boot time. Check the CD: -~- GET /ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000 <cdrom href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8" id="5d4f3c8a-7514-400d-a0f7-5c6c51178ba8"/> <file id="CentOS-6.5-x86_64-minimal.iso"/> </cdrom> -~- 2. Run the VM and check the current CD (should be the same): -~- GET /ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000;current <cdrom href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8" id="5d4f3c8a-7514-400d-a0f7-5c6c51178ba8"/> <file id="CentOS-6.5-x86_64-minimal.iso"/> </cdrom> -~- 3. Eject the CD (in GUI: VM -> Change CD -> [Eject]) and check the current CD again (should be empty): -~- GET /ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000;current <cdrom href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8" id="5d4f3c8a-7514-400d-a0f7-5c6c51178ba8"/> </cdrom> -~- 4. Change CD to "debian-6.0.6-amd64-netinst.iso" and yet check the current CD (now there should be the new one): -~- GET /ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000;current <cdrom href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8" id="5d4f3c8a-7514-400d-a0f7-5c6c51178ba8"/> <file id="debian-6.0.6-amd64-netinst.iso"/> </cdrom> -~- 5. Finally, check again the CD attached at every boot time (should be the CD defined in step 1): -~- GET /ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000 <cdrom href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"> <vm href="/ovirt-engine/api/vms/5d4f3c8a-7514-400d-a0f7-5c6c51178ba8" id="5d4f3c8a-7514-400d-a0f7-5c6c51178ba8"/> <file id="CentOS-6.5-x86_64-minimal.iso"/> </cdrom> -~-
Closing as part of 3.4.0