Bug 1512850
| Summary: | Unable to boot VM from CD-ROM | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine-sdk-java | Reporter: | Mirko Solic <mirko.solic> |
| Component: | Core | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Lucie Leistnerova <lleistne> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.1.3 | CC: | bugs, juan.hernandez, lveyde, omachace |
| Target Milestone: | ovirt-4.1.8 | Flags: | rule-engine:
ovirt-4.1+
|
| Target Release: | 4.1.6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | java-ovirt-engine-sdk4-4.1.6 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-12-11 16:29:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
To fix this we need to fix the code generator. That is what the proposed patch does. Once that fix is merged and the new code generator is released, we will need to re-generate the SDK. Package was added to oVirt 4.1.8 RC2 release. VM from cdrom booted successfully verified in java-ovirt-engine-sdk4-4.1.6-1.el7ev.noarch with ovirt-engine-4.1.8.1-0.1.el7.noarch |
Description of problem: I'm trying to boot VM from CD-ROM, using SDK. This is code I use connection.systemService().vmsService() .vmService("123") .start() .vm( vm() .os( operatingSystem().boot(boot().devices(BootDevice.CDROM))) ) .send(); Response I get from server is 400. Looking further into code I realised that SDK produces wrong request. It looks like this: <action> <vm> <os> <boot> <devices> <boot_device>cdrom</boot_device> </devices> </boot> </os> </vm> </action> Problem is in tag <boot_device>, it should be <device> The same I see in engine.log 2017-11-14 10:27:06,967+01 ERROR [org.ovirt.engine.api.restapi.resource.validation.IOExceptionMapper] (default task-30) [] Exception: java.io.IOException: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"boot_device"). Expected elements are <{}device> at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:199) [restapi-jaxrs.jar:] at org.ovirt.engine.api.restapi.xml.JAXBProvider.readFrom(JAXBProvider.java:161) [restapi-jaxrs.jar:] Version-Release number of selected component (if applicable): I'm using java SDK version 4.1.5 and I'm connecting to Ovirt 4.1.6. I tried the same code with SDK version 4.2.0.alpha2, but had the same problem. How reproducible: Run this code. connection.systemService().vmsService() .vmService("123") .start() .vm( vm() .os( operatingSystem().boot(boot().devices(BootDevice.CDROM))) ) .send();