ISO domains can contain iso or vfd images. If one tries to insert a vfd image using the REST API, the insertion is successful, and then Windows fails to read the image saying its format is invalid. It would be nicer to reject such changes > PUT //api/vms/d14e4ddc-3dc5-4157-8e4d-f0f807856884/cdroms/00000000-0000-0000-0000-000000000000?current= HTTP/1.1 > Soup-Debug-Timestamp: 1380559590 > Soup-Debug: SoupSessionAsync 1 (0x6af960), SoupMessage 8 (0xb3a1d0), SoupSocket 9 (0x7f8d80) > 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="virtio-win-1.2.0.vfd"/> > </cdrom> < HTTP/1.1 200 OK < Soup-Debug-Timestamp: 1380559590 < Soup-Debug: SoupMessage 8 (0xb3a1d0) < Date: Mon, 30 Sep 2013 16:46:27 GMT < Pragma: No-cache < Cache-Control: no-cache < Expires: Thu, 01 Jan 1970 01:00:00 CET < Content-Type: application/xml < Content-Length: 111 < Vary: Accept-Encoding < Connection: close < < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> < <cdrom> < <file id="virtio-win-1.2.0.vfd"/> < </cdrom>
is the suffix check enough? i.e. .iso for cdrom and .vfd for floppy?
The 'file' resources have a 'type' attribute as documented in api?schema and in https://access.redhat.com/site/documentation//en-US/Red_Hat_Enterprise_Virtualization/3.2/html/Developer_Guide/sect-Sub-Collections-2.html so I was thinking this could be used. However it's not present when I look at the xml returned by a 3.2 or 3.3 instance.
Verified upstream in ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch (rc1). Request PUT /ovirt-engine/api/vms/<uuid>/cdroms/00000000-0000-0000-0000-000000000000?current with body <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cdrom> <file id="virtio-win-1.2.0.vfd"/> </cdrom> returns: <fault> <reason>Operation Failed</reason> <detail>[Cannot edit VM. Invalid CD image format.]</detail> </fault>
RHEV-M 3.5.0 has been released