Bug 1371781

Summary: virt-install doesn't be triggered as noautoconsole when --wait=0
Product: Red Hat Enterprise Linux 7 Reporter: Xiaodai Wang <xiaodwan>
Component: virt-managerAssignee: Pavel Hrdina <phrdina>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: juzhou, mxie, mzhan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.4.1-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 21:02:03 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:

Description Xiaodai Wang 2016-08-31 06:00:31 UTC
Description of problem:
virt-install doesn't be triggered as noautoconsole when --wait=0

Version-Release number of selected component (if applicable):
virt-manager-1.4.0-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Check --wait option in man page of virt-install, "a value of 0 triggers the same results as noautoconsole".
       --wait WAIT
           Amount of time to wait (in minutes) for a VM to complete its install.  Without this option, virt-install will wait for the console to close (not necessarily indicating the
           guest has shutdown), or in the case of --noautoconsole, simply kick off the install and exit. Any negative value will make virt-install wait indefinitely, a value of 0
           triggers the same results as noautoconsole. If the time limit is exceeded, virt-install simply exits, leaving the virtual machine in its current state.

2. Run virt-install with --wait=0.
# virt-install --name test --memory 1024 --disk /var/lib/libvirt/images/test.img,size=3 -l http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.3-20160825.1/compose/Server/x86_64/os/ --wait=0

Actual results:
virt-install doesn't exit.

Expected results:
virt-install should be triggered same as noautoconsole when --wait=0.

Additional info:

Comment 2 Pavel Hrdina 2017-01-18 12:23:09 UTC
Upstream commit:

commit f07a3021d99298e3b157f6c18b880dcb3ac19b62
Author: Pavel Hrdina <phrdina>
Date:   Wed Jan 18 13:11:43 2017 +0100

    virt-install: fix --wait=0 to behave like --noautoconsole

Comment 4 zhoujunqin 2017-03-15 09:52:06 UTC
I can reproduce this bug with package:
virt-manager-1.4.0-2.el7.noarch
virt-install-1.4.0-2.el7.noarch
virt-manager-common-1.4.0-2.el7.noarch

Then try to verify this bug with new build:
virt-manager-1.4.1-1.el7.noarch
virt-install-1.4.1-1.el7.noarch
virt-manager-common-1.4.1-1.el7.noarch
libvirt-3.1.0-2.el7.x86_64

Steps:
2. Run virt-install with --wait=0.
# virt-install --name test --memory 1024 --connect  qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 --cdrom /root/Downloads/RHEL-6.8-20160414.0-Server-x86_64-dvd1.iso   --wait=0

Starting install...
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.

3. Run virt-install with --noautoconsole

# virt-install --name test --memory 1024 --connect  qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 --cdrom /root/Downloads/RHEL-6.8-20160414.0-Server-x86_64-dvd1.iso   --noautoconsole

Starting install...
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.

Result:
1. --wait=0 behaves like --noautoconsole
2. After step2, use virt-viewer to connect to vm to finish installation successfully.

So move this bug from ON_QA to VERIFIED status.

Comment 5 errata-xmlrpc 2017-08-01 21:02:03 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