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): python-virtinst-0.300.2-3.el5 How reproducible: 100% 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: https://www.redhat.com/archives/et-mgmt-tools/2008-February/msg00140.html
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 -f|--force I'd like to request this for inclusion post-beta. Thoughts?
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.
Thanks for your thoughts Daniel, here here! :)
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.
Created attachment 296947 [details] Remove check for file existence
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.
dev ack for dan...
(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.
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.
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.
Created attachment 297204 [details] Remove check for file existence in cli tools. This applies after the force option patch. Upstream cset 365.
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
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. http://rhn.redhat.com/errata/RHEA-2008-0371.html