Bug 1298509

Summary: [upgrade from 3.5] Failed to clone VM after upgrade
Product: [oVirt] ovirt-engine Reporter: Israel Pinto <ipinto>
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED DUPLICATE QA Contact: Israel Pinto <ipinto>
Severity: high Docs Contact:
Priority: high    
Version: 3.6.0.3CC: bugs, gklein, ipinto, michal.skrivanek
Target Milestone: ovirt-3.6.3Flags: gklein: ovirt-3.6.z?
gklein: blocker?
rule-engine: planning_ack?
michal.skrivanek: devel_ack+
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-20 10:44:18 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1285700    
Attachments:
Description Flags
engine_log_1
none
engine_log_2 none

Description Israel Pinto 2016-01-14 10:02:42 UTC
Created attachment 1114746 [details]
engine_log_1

Description of problem:
Upgrade engine from 3.5.7 to 3.6.2 with running VM form 3.5.7,
Clone VM that created in 3.5.


Version-Release number of selected component (if applicable):
engine 3.5: 3.5.7-0.1.el6ev 
engine 3.6: 3.6.2-0.1.el6


Steps to Reproduce:
1. Create VM and start it on Host_1
2. Upgrade Host_2 and Host_1 to 7.2 
3. Upgrade Cluster level to 3.6
4. Stop VM and clone it

Actual results:
Clone VM failed, see error below


Expected results:
Clone VM should succeed 


Additional info:
From engine log:
2016-01-13 09:14:26,194 WARN  [org.ovirt.engine.core.bll.CloneVmCommand]
(ajp-/127.0.0.1:8702-3) [b615746] CanDoAction of action 'CloneVm' failed for user admin@internal. 
Reasons: VAR__ACTION__ADD,VAR__TYPE__VM,ACTION_TYPE_FAILED_ILLEGAL_NUM_OF_MONITORS

Comment 1 Israel Pinto 2016-01-14 10:03:32 UTC
Created attachment 1114747 [details]
engine_log_2

Comment 2 Shmuel Melamud 2016-01-18 21:09:04 UTC
Israel, can you give me some additional information?

1. Number of monitors set in the VM.
2. Display type.
3. Display protocols (VNC, SPICE).
4. Was VM running during engine upgrade?
4. Was VM restored after engine upgrade from a snapshot that was made before the upgrade?

Comment 3 Israel Pinto 2016-01-19 07:25:00 UTC
(In reply to Shmuel Melamud from comment #2)
> Israel, can you give me some additional information?
> 
> 1. Number of monitors set in the VM.
> 2. Display type.
> 3. Display protocols (VNC, SPICE).
> 4. Was VM running during engine upgrade?
> 4. Was VM restored after engine upgrade from a snapshot that was made before
> the upgrade?

1. Number of monitors is: 1 
2. Display type is (if you meant Video type): QXL  
3. Display protocol is: SPICE
4. The VM was from 3.5 and it was running during the upgrade, i stopped the after it was migrate to 3.6 host and then is did the CloneVM, The clone is done after the upgrade.
5. It did not restore from snapshot.

Comment 4 Michal Skrivanek 2016-01-19 10:28:28 UTC
please verify both the configuration is as expected(in general subtab) and also the running info in the main tab (same protocol) and that you can connect to the console when running.
Also, was the VM launched by Run Once originally before the upgrade?

Comment 5 Israel Pinto 2016-01-19 11:27:42 UTC
1. The clone VM failed so all the info is about the origin vm, and i did not change and setting of this VM.
2. I did not launch it with run once.

Comment 6 Shmuel Melamud 2016-01-19 11:51:15 UTC
I couldn't reproduce the bug with the steps provided.

Looking into the code, ACTION_TYPE_FAILED_ILLEGAL_NUM_OF_MONITORS may be returned if number of monitors in bigger than 1 (with VNC) or bigger than maximum number set in ValidNumOfMonitors option (with SPICE only).

So, in addition to what Michal says, possibly ValidNumOfMonitors option was tainted during the upgrade or before? Is it possible to create any VM after the upgrade?

Comment 7 Israel Pinto 2016-01-19 13:23:32 UTC
The problem is with VM that create in 3.5, if we will create VM after the upgrade it will create over 3.6 host.

Comment 8 Shmuel Melamud 2016-01-19 15:18:02 UTC
Yes. But cloning a VM is indeed creation of a VM with the same parameters. If creation of a VM with "QXL, SPICE and 1 monitor" succeeds on 3.6 but cloning a similar VM fails, need to know what's the difference between two VMs.

So, the question is: Is it possible to create a VM with "QXL, SPICE and 1 monitor" after the upgrade?

Comment 9 Shmuel Melamud 2016-01-20 10:44:18 UTC
As we investigated yesterday, the VM at issue was restored from snapshot created before the upgrade to 3.6. Due to bug 1293299, graphics devices were not present in the VM after that. VmHandler.isNumOfMonitorsLegal() in this case returns false always.

Fix for bug 1293299 must fix this bug also. Marking as duplicate.

*** This bug has been marked as a duplicate of bug 1293299 ***