Skip to content
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

Add support for running in Windows via WSL2 #24

Open
ckyrouac opened this issue May 2, 2024 · 2 comments
Open

Add support for running in Windows via WSL2 #24

ckyrouac opened this issue May 2, 2024 · 2 comments

Comments

@ckyrouac
Copy link
Collaborator

ckyrouac commented May 2, 2024

I don't think anyone has tested what happens when trying to run on WSL. It might just work, or need some tweaks.

@KristoferHansson
Copy link

I just tried, with WSL2 and VERSION="22.04.3 LTS (Jammy Jellyfish)" and had to spend some time to get it working

started at https://docs.fedoraproject.org/en-US/bootc/getting-started/

❯ podman machine init --rootful --now
Looking up Podman Machine image at quay.io/podman/machine-os:5.1 to create VM
Extracting compressed file: podman-machine-default-amd64.qcow2: done
Image resized.
Machine init complete
Starting machine "podman-machine-default"
Error: qemu exited unexpectedly with exit code 1, stderr: Could not access KVM kernel module: Permission denied
qemu-system-x86_64: -accel kvm: failed to initialize kvm: Permission denied

followed: https://serverfault.com/questions/1043441/how-to-run-kvm-nested-in-wsl2-or-vmware/1115773 to solve kvm issue

installed qemu (via brew) because the initial apt install installed (QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.23)) and that gave me:
qemu-system-x86_64: -netdev stream,id=vlan,addr.type=unix,addr.path=/Users/sopalenski/.colima/default/daemon/gvproxy.sock: Parameter 'type' does not accept value 'stream'`
Updated qemu got me past that issue

❯ qemu-system-x86_64 --version
QEMU emulator version 9.1.1

tried again:
Error: failed to find virtiofsd: exec: "virtiofsd": executable file not found in $PATH
cloned, built and "installed" https://gitlab.com/virtio-fs/virtiofsd because it's no longer included in podman(?)

./podman-bootc run --filesystem=xfs quay.io/centos-bootc/centos-bootc:stream9

Booting the VM...
Error: unable to initialize VM: unable to load existing libvirt domain: virError(Code=38, Domain=7, Message='Failed to connect socket to '/run/user/1000/libvirt/libvirt-sock': No such file or directory')

Solved by:
sudo apt install libvirt-clients libvirt-daemon-system

New error:

Booting the VM...
Error: runBootcVM: unable to start virtual machine domain: virError(Code=1, Domain=0, Message='internal error: Could not run
'/usr/bin/swtpm_setup'. exitstatus: 1; Check error log '/home/kha/.cache/libvirt/qemu/log/podman-bootc-76da7cb48e06-swtpm.log
' for details.')

ran in to some issues with incompatible versions of tpms and swtpm, but eventually solved it by building from source

[root@localhost ~]# bootc status
No staged image present
Current booted image: quay.io/centos-bootc/centos-bootc:stream9
Image version: stream9.20241101.0 (2024-11-01 05:07:24.300680501 UTC)
Image digest: sha256:893b636bbc5725378ce602f222f26c29f51334f93243ae8657d31391634eb024
No rollback image present

@germag
Copy link
Collaborator

germag commented Nov 5, 2024

Hi,

cloned, built and "installed" https://gitlab.com/virtio-fs/virtiofsd because it's no longer included in podman(?)

yes, (at least in fedora) you need to install the podman-machine subpackage to install all the dependencies for podman machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants