Bug 1395154

Summary: Vm status via REST API does not reflect 'Copying disk' when a vm is imported with v2v
Product: [oVirt] ovirt-engine Reporter: sefi litmanovich <slitmano>
Component: BLL.VirtAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Israel Pinto <ipinto>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, tjelinek
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
ipinto: testing_plan_complete+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:40:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description sefi litmanovich 2016-11-15 09:55:30 UTC
Description of problem:
When importing a vm with v2v feature (doesn't matter what the source is), the vm appears in the system right away with status 'down' and then when the image is starting to copy to SD, the status in the UI changes to 'Copying disk 1/(number of disks)'.
In REST API the status is 'down' all through the process (as in DB the status is always down).
We need to reflect the status from UI to REST API as well, so user has some indication of the copying process.

Version-Release number of selected component (if applicable):
4.1.0-0.0.master.20161112231308.git672bd31.el7.centos

How reproducible:
always

Steps to Reproduce:
1. Import a vm via v2v from KVM provider or VmWare.
2. Sample status of the vm once it appears in the system, via REST API and UI

Actual results:
vm status changes to 'Copying disk' in UI and stays at status 'down' in API.

Expected results:
UI and API values should be the same.

Additional info:

Comment 1 Tomas Jelinek 2016-11-23 09:23:55 UTC
This information should be loadable the same way as the migration progress.
So, it needs to be added to the VmStatisticalQuery.

Comment 2 Shahar Havivi 2017-03-22 10:49:41 UTC
The status is change in the UI and not part of the VM status,
The status is actually right since the VM status is down - the REST way is to add status_detail as you can see here:

<status>down</status>
<status_detail>Copying disk 1/1</status_detail>

Comment 3 Israel Pinto 2017-08-07 14:37:46 UTC
Verify with:
Version 4.2.0-0.0.master.20170725202023.git561151b.el7.centos

Steps:
1. Start V2V import process
2. Check VM status_detail via REST API, status_detail should be Copying disk 
3. Check VM status_detail after importing finished, status_detail should be None

PASS

Comment 4 Sandro Bonazzola 2017-12-20 11:40:07 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.