Red Hat Bugzilla – Bug 1256831
Cannot install @'Fedora Workstation" on F22 image
Last modified: 2015-08-26 02:47:28 EDT
Description of problem:
When I try to create F22 image with Gnome installed with:
virt-builder fedora-22 -o disk_f22_desktop_64bit.img --size 20G --run-command "dnf -y remove firewalld*; dnf -y update; dnf install @'Fedora Workstation'" --root-password password:weakpassword
it fails with:
Total download size: 999 M
Installed size: 2.6 G
[Errno 9] Bad file descriptor
Is this ok [y/N]: virt-builder: error: dnf -y remove firewalld*; dnf -y update; dnf install
@'Fedora Workstation': command exited with an error
Version-Release number of selected component (if applicable):
Created attachment 1066888 [details]
stdout and stderr output with -x -v args
I can reproduce the issue, will debug further what is going on.
On the other hand, splitting the dnf invocation in separate virt-builder operations seems to work properly:
$ virt-builder fedora-22 \
-o disk_f22_desktop_64bit.img \
--size 20G \
--run-command "dnf -y remove firewalld*" \
--install "@Fedora Workstation" \
Also if you really want to use a single --run-command for some reason,
then you should use && instead of ; to separate the commands:
--run-command 'cmd1 && cmd2 && cmd3'
otherwise you don't know if cmd1 or cmd2 failed.
Actually, I see now why the original command fails. You needed
to use 'dnf -y ...', since otherwise dnf will try to interactively
prompt, and will fail or hang since there is no tty.
Yes, it seems that this was it. I got confused by "[Errno 9] Bad file descriptor" error.
As a side-note, I cannot use --update and --install because I want to run "setarch i686" before commands, see 1256405.