Description of problem:
Add vm from template, with cdrom payload fail on:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
<reason>Operation Failed</reason>
<detail>org.apache.commons.lang.SerializationException: org.codehaus.jackson.map.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: org.ovirt.engine.core.common.action.VmManagementParametersBase["vmPayload"]->org.ovirt.engine.core.common.businessentities.VmPayload["deviceId"])</detail>
</fault>
It was discovered in payload automatic test:
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Compute/view/3.5-git/view/Dashboard/job/3.5-git-compute-virt-payloads-nfs/
and also restored manually
Version-Release number of selected component (if applicable):
VT7
(On VT6 it worked fine).
How reproducible:
100%
Steps to Reproduce (via REST api):
Create vm from template with cdrom payload (The template used in the automatic test is sealed rhel based, but on manual reproduce, same failure occur with some basic template, with nothing installed on it):
url: https://<engine fqdn>:443/ovirt-engine/api/vms/
method: POST
body:
<vm>
<name>test_payload_by_poster</name>
<cluster>
<name>golden_env_mixed_1</name>
</cluster>
<template>
<name>golden_mixed_virtio</name>
</template>
<payloads>
<payload type="cdrom">
<files>
<file>
<name>payload.cdrom</name>
<content>cdrom payload via create</content>
</file>
</files>
</payload>
</payloads>
</vm>
Actual results:
1. VM creation operation failed with the error in description.
2. VM is seen in UI, stuck in lock status, and it's disk also locked.
Expected results:
VM should have been created.