Bug 1903400

Summary: Migrate a VM which is not running goes to pending state
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Matan Schatzman <mschatzm>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, gouyang, mschatzm, yzamir
Target Milestone: ---   
Target Release: 4.7.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: 2021-02-24 15:37:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
vm yaml none

Description Guohua Ouyang 2020-12-02 01:23:23 UTC
Created attachment 1735431 [details]
migrating pending if VMI is not running

Description of problem:
When migrating a VM which is not running:
- From cli, it throws an error:
$ virtctl migrate vm-example
Error migrating VirtualMachine Operation cannot be fulfilled on virtualmachine.kubevirt.io "vm-example": VM is not running

- From UI, the migration action is enabled and migrate the vm goes to pending state.

Version-Release number of selected component (if applicable):
master

How reproducible:
100%

Steps to Reproduce:
1. Create a VM which can be started but not be able to be scheduled.
2. Migrate the VM from CLI. 
3. Migrate the VM on UI.

Actual results:


Expected results:
Either disable migrate when VM is not running or throws the error like the cli do.

Additional info:

Comment 1 Guohua Ouyang 2020-12-02 01:23:59 UTC
Created attachment 1735432 [details]
vm yaml

Comment 3 Guohua Ouyang 2020-12-16 03:09:03 UTC
verified on 4.7.0-0.nightly-2020-12-13-202314, migration is not available when VMI is not running.

Comment 6 errata-xmlrpc 2021-02-24 15:37:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:5633