-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boxbuild stuck at zypper
& runs into an interactive shell within VM
#26
Comments
I am not sure if it is helpful, but i paste the beautified qemu command, fetched from qemu-system-x86_64 \
-m 8096 \
-machine accel=kvm \
-cpu host \
-nographic \
-nodefaults \
-snapshot \
-kernel /var/tmp/kiwi/boxes/leap/kernel.x86_64 \
-append console=hvc0 root=/dev/vda1 rd.plymouth=0 kiwi="--profile Live system build" sharing-backend=_9p_ \
-drive file=/var/tmp/kiwi/boxes/leap/Leap-Box.x86_64-1.42.1-System-BuildBox.qcow2,if=virtio,driver=qcow2,cache=off,snapshot=on \
-netdev user,id=user0 \
-device virtio-net-pci,netdev=user0 \
-device virtio-serial \
-chardev stdio,id=virtiocon0 \
-device virtconsole,chardev=virtiocon0 \
-fsdev local,security_model=mapped,id=fsdev0,path=/home/$user/repos/kiwi-descriptions/suse/x86_64/suse-leap-15.2 \
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=kiwidescription \
-fsdev local,security_model=mapped,id=fsdev1,path=/tmp/myimage5 \
-device virtio-9p-pci,id=fs1,fsdev=fsdev1,mount_tag=kiwibundle \
-initrd /var/tmp/kiwi/boxes/leap/initrd.x86_64 \
-smp 4 |
Hi, I try to reproduce this today. My first guess is on the network. We run kvm using the virtio net emulation which allows a pass through of the network traffic from the box to the guest and kvm manages the connection on the host without requiring the user to configure any network host/guest configuration. virtio net has its limitations and depending on how complex your host network we might run into issues there... just a guess though
yes you are right, if you run it as root first the box images will be downloaded and stored as root. If you run it as user and a new box exists the existing one cannot be moved due to the permissions issue. Maybe we should switch the download location into the calling user's home directory. Could you open an extra issue for this one ? Thanks much
This behavior is intentional. We boot the box with a box console such that you always have access to this environment as long as the build runs in the box. It's actually an opportunity to get access to the virtual machine. The VM is by default called in snapshot mode, thus any changes are not persistent. If you run with --box-debug the environment stays open (the box does not reboot) and you can work/debug/develop inside of the box. As I did not see a security issue with this console, it's always at your hand when you build. |
Are you sure it's stuck and not just downloading the packages. There is a log file which should tell you more:
Let me know what that tells you My build is currently running and looks good so far |
My build has finished
so I can't reproduce it so far |
Hello @schaefi, thank you for the reply.
I will have a look if it is a network issue. I am just a bit curious, because i could actually build other distributions (e.g. debian) successfully. But you might be right,
Sure, I will open another ticket.
Haha, it's not a bug, but a feature! I am totally fine with it.
Sure, here is the result.
How long takes your boxed build to complete? |
Hmm, indeed that's a strange behavior from zypper and I haven't seen this so far. You said you killed this after 20min and nothing happens ? really weird
I would have expected that yes
ok this means the basic network functionality is there and working.
This is expected. The kiwi build uses non-standard zypper paths to avoid conflicts. If you just call "zypper repos" it would lookup repos defined in the standard path on the box VM and there are none. So at least this is working as expected :-))
It was done in under 2minutes. So on normal circumstances I would have expected your build to be done in less than 5minutes. And you should always see progress in the log Hmm Can you try the following:
This just restarts the build in the box. Does it get stuck at the same stage again ? Please note: There is no control character support in the console. So if you hit Ctrl-C or something this will exit your VM process not the process running inside the VM blocking your console ;) Thanks for your patience. So far I have no idea |
Well, it seems i was not patient enough. The build completed after ~35min. I guess Start time: Solution: Ask the boss for better hardware. Thank you @schaefi! |
I am trying to build an appliance, using the
boxbuild
feature. The box has been pulled from the internet and everything seems supercool! :) 👍 Sadly, i am not able to build an image:zypper
. Something weird i experienced on every build: I actually get a command-prompt in the VM.tar
. This happened, because i first ran theboxbuild
as root and the boxes belonged to root in/var/tmp/kiwi
. After deleting/var/lib/kiwi
, i could run it with low privileges. The images were downloaded again. But i ran into the same issue asroot
.Problem description
I am using the following command to trigger the build. Note: Instead of using
--type
i use--profile
, changing it made no difference for me.kiwi-ng --profile Live system boxbuild --box leap -- \ --description /home/${USER}/kiwi-descriptions/suse/x86_64/suse-leap-15.2 \ --target-dir /tmp/myimage
In the same CLI i triggerd the build, i receive the command prompt on the VM and the process is stuck in
Processing:
.End of the
result.log
:Expected behaviour
zypper
successfully./var/tmp/kiwi/boxes
Steps to reproduce
appliance-builder
repostiory (https://osinside.github.io/kiwi/installation.html#installation-from-obs)kiwi-ng
from the vendor repo. (https://osinside.github.io/kiwi/installation.html#installation-from-obs)python3-kiwi_boxed_plugin
from the vendor repo: (https://osinside.github.io/kiwi/self_contained.html)git clone https://github.com/OSInside/kiwi-descriptions
kiwi-ng --profile Live system boxbuild --box leap -- \ --description /home/${USER}/kiwi-descriptions/suse/x86_64/suse-leap-15.2 \ --target-dir /tmp/myimage
OS and Software information
openSUSE Leap 15.2
?
The text was updated successfully, but these errors were encountered: