beringresearch / macpine

Lightweight Linux VMs on MacOS
https://beringresearch.github.io/macpine/
Apache License 2.0
897 stars 22 forks source link

--shared not working with alpine_3.19.1 #187

Open joshuahhh opened 5 months ago

joshuahhh commented 5 months ago

Describe the bug Although --shared seems to work fine with the default Alpine version, it doesn't work when combined with --image alpine_3.19.1.

To Reproduce Running

sudo alpine launch \
  --name shelly \
  --image alpine_3.19.1 \
  --shared

produces the output

2024/04/09 17:04:14 booting shelly
2024/04/09 17:04:14 shelly started (17577)
2024/04/09 17:04:14 getting instance IP address from DHCP leases
..2024/04/09 17:04:23 shelly stopped
2024/04/09 17:04:23 unable to set up DNS: dial tcp 192.168.64.6:22: connect: connection refused

(tho sometimes it instead hangs roughly forever, printing out periods).

Host computer (please complete the following information):

Additional context

macpine is great! Thanks a bunch.

idroz commented 5 months ago

Hi there!

This seems to be a general issue with Alpine 3.19, which is related to a grub update (https://gitlab.alpinelinux.org/alpine/aports/-/issues/15672)

The latest version of Alpine that seems to be working correctly is 3.18. If you need these later versions of Alpine through macpine, you could launch macpine with the default image (3.16) and then edit /etc/apk/repositories on the guest and set them to 3.18, followed by apk update and apk upgrade.

If you need the image, you could publish it through macpine publish and reuse for later builds.

I think for now, I'll keep monitoring this issue until a more stable work around is introduced.