This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 434786 - virt-install is now interactive
virt-install is now interactive
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python-virtinst (Show other bugs)
All Linux
low Severity low
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
: Regression
Depends On:
  Show dependency treegraph
Reported: 2008-02-25 09:32 EST by Alexander Todorov
Modified: 2009-12-14 16:18 EST (History)
3 users (show)

See Also:
Fixed In Version: RHEA-2008-0371
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 12:45:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Remove check for file existence (2.76 KB, patch)
2008-03-05 16:49 EST, Cole Robinson
no flags Details | Diff
add --force option (2.76 KB, patch)
2008-03-05 16:58 EST, Cole Robinson
no flags Details | Diff
add --force option to cli utilities (the actual patch this time) (3.60 KB, patch)
2008-03-06 09:58 EST, Cole Robinson
no flags Details | Diff
Add --force option to cli utils. (14.99 KB, patch)
2008-03-07 11:22 EST, Cole Robinson
no flags Details | Diff
Remove check for file existence in cli tools. (1.96 KB, patch)
2008-03-07 11:23 EST, Cole Robinson
no flags Details | Diff

  None (edit)
Description Alexander Todorov 2008-02-25 09:32:45 EST
Description of problem:
New feature in virt-install that will check for disk file existence makes it
interactive and breaks automated instllations of virtual guests.

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

How reproducible:

Steps to Reproduce:
1. virt-install -n test -r 512 -f /tmp/test.img -s 5 --vnc -p -l
http://server/path. The /tmp/test.img file is created
2. Shutdown the domain "test" and delete it
3. Run 1) again. The file /tmp/test.img exists and user is prompted to verify of
they wish to overwrite.
Actual results:
virt-install prompt:
Do you really want to use the file (yes or no)? 

Expected results:
virt-install proceeds unattended.

Additional info:
The problem has been discussed upstream:
Comment 2 James Laska 2008-02-26 09:13:31 EST
This is impacted our automated cd|dvd installation tests that use xen.  We can
change our test scripts to adjust, but the mailing thread seems to indicate this
is a common workflow (scripting around virt-install).

Let's use this bug to track adding a new cmdline option to virt-install.

  -y|--yes      or

I'd like to request this for inclusion post-beta.  Thoughts?
Comment 3 Daniel Berrange 2008-02-26 09:26:31 EST
This check is frankly a complete waste of time & should never have been added
upstream - using an existing pre-allocated file is very common use case.
Checking if the file is used in a existing VM is fine, but complaining merely
because the file exists is wrong. The check in question needs to be removed
completely, and there is no need for  a '--force' flag.
Comment 4 James Laska 2008-02-26 09:36:25 EST
Thanks for your thoughts Daniel, here here! :)
Comment 6 Cole Robinson 2008-03-05 16:48:31 EST
Removing the file check is definitely a plus, but I think a --force option is a
good path to avoid any of these issues in the future.
Comment 7 Cole Robinson 2008-03-05 16:49:37 EST
Created attachment 296947 [details]
Remove check for file existence
Comment 8 Cole Robinson 2008-03-05 16:58:26 EST
Created attachment 296949 [details]
add --force option

Posted upstream, if no one objects I'll commit by end of the day tomorrow. At
the very least for 5.2 we should take in the first patch (remove file existence
check) but my vote is for the --force option as well to provide users with a
way to avoid any prompting issues in the future.
Comment 9 Bill Burns 2008-03-05 17:03:04 EST
dev ack for dan...
Comment 10 Alexander Todorov 2008-03-06 04:39:17 EST
(In reply to comment #8)
> Created an attachment (id=296949) [edit]
> add --force option

That patch is the same as in comment #7. Can you attach the correct one please.
Comment 11 Cole Robinson 2008-03-06 09:58:15 EST
Created attachment 297055 [details]
add --force option to cli utilities (the actual patch this time)

Whoops, sorry about that! Here's the actual patch. This was ack'd for upstream
so I'll pull both of these patches in for 5.2.
Comment 12 Cole Robinson 2008-03-07 11:22:47 EST
Created attachment 297203 [details]
Add --force option to cli utils.

This version actually applies to cvs. Its made up of upstream csets 350, 351,
352, and 374 (the actual force option change). The 35* csets were some not too
intrusive cli reworks that the force change depends on, otherwise it would be a
pretty ugly patch and needless fork.
Comment 13 Cole Robinson 2008-03-07 11:23:56 EST
Created attachment 297204 [details]
Remove check for file existence in cli tools.

This applies after the force option patch. Upstream cset 365.
Comment 14 Cole Robinson 2008-03-07 12:39:30 EST
Committed and built:

$ brew latest-pkg dist-5E-qu-candidate python-virtinst
Build                                     Tag                   Built by
----------------------------------------  --------------------  ----------------
python-virtinst-0.300.2-6.el5             dist-5E-qu-candidate  crobinso
Comment 17 errata-xmlrpc 2008-05-21 12:45:43 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.