Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1441902

Summary: virt-manager shows wrong domain status when click "Begin Installation" failed for second time
Product: Red Hat Enterprise Linux 7 Reporter: zhoujunqin <juzhou>
Component: virt-managerAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4CC: crobinso, kuwei, mxie, phrdina, tzheng, xiaodwan, yualiu
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.4.1-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 21:04:33 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
virt-manager debug log none

Description zhoujunqin 2017-04-13 03:50:12 UTC
Description of problem:
virt-manager shows wrong domain status when "Begin Installation" failed for second time

Version-Release number of selected component (if applicable):
libvirt-3.2.0-2.el7.x86_64
virt-manager-1.4.1-1.el7.noarch
libvirt-python-3.2.0-1.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a new vm using UEFI bios + Q35 chipset
1.1 
Launch virt-manager
# virt-manager
1.2 
Click NEW button at the top of "Virtual Machine Manager" window.
1.3 
Configure guest information in installation steps and check "Customize configuration before install" in last page, then click "Finish".
1.4
Firware:  /usr/share/OVMF/OVMF_CODE.secboot.fd
Chipset: Q35
1.5 
Select default disk and remove it.
1.6 
Click "Add hardware" button, then add a ide storage for domain.
1.7 
Begin installation
Result: Failed to install domain with error
"Error starting domain: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type".
1.8 
Close above error message window, then click "Begin Installation" again.
Result: 
I will encounter a error window: Unable to complete install: 'Domain has already been started!'

Then i check domain status:
# virsh domstate rhel6.8 --reason
shut off (failed)

Actual results:
As description.

Expected results:
Fix it.

Additional info:
I cannot reproduce this issue with virt-manager-1.4.0-2.el7.noarch

Comment 3 zhoujunqin 2017-04-13 03:51:50 UTC
Created attachment 1271322 [details]
virt-manager debug log

Comment 4 Cole Robinson 2017-04-13 18:25:36 UTC
Fixed upstream here:

commit 2099a1946e22b62d31b954dc3e7b813404c2d019
Author: Christophe Fergeau <cfergeau>
Date:   Thu Apr 13 11:18:46 2017 +0200

    Reset Guest.domain to None on domain creation error

Comment 5 Pavel Hrdina 2017-05-16 16:53:49 UTC
These two upstream patches are required as well to fix it properly:

commit 93085d2b9d4a3dd6cbb9edfeae9b6cefee9419c1
Author: Cole Robinson <crobinso>
Date:   Thu Apr 13 14:56:03 2017 -0400

    guest: Don't repeatedly overwrite self.domain

commit 8181e8609867fe6ed101e48212d42a1c38373539
Author: Cole Robinson <crobinso>
Date:   Thu Apr 27 13:11:13 2017 -0400

    guest: Only use define+start logic for vz

Comment 8 zhoujunqin 2017-05-25 08:21:25 UTC
I can reproduce this bug with build:
virt-manager-1.4.1-4.el7.noarch
libvirt-3.2.0-5.virtcov.el7.x86_64
qemu-kvm-rhev-2.9.0-6.el7.x86_64

Then try to verify this bug with new build:
virt-manager-1.4.1-5.el7.noarch
libvirt-3.2.0-5.virtcov.el7.x86_64
qemu-kvm-rhev-2.9.0-6.el7.x86_64

Steps:
1. Do steps as Comment 0, 
After get error in step1.7 when click "Begin installation"
Result: Failed to install domain with error
"Error starting domain: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type".

2. Close above error message window, then click "Begin Installation" again.
Result: Will get same error as step1.7, no error like 'Unable to complete install: 'Domain has already been started!' showing.

3. Close above error message window, then remove the ide storage added in step1.6, click 'Begin installation' again.

Result: Installation started without error, and guest can be installed successfully.
So move this bug from ON_QA to VERIFIED.

Comment 9 errata-xmlrpc 2017-08-01 21:04:33 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, 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/RHBA-2017:2072