Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The image should be a hard drive image, not ISO9660 #123

Closed
AkihiroSuda opened this issue Mar 8, 2024 · 8 comments
Closed

The image should be a hard drive image, not ISO9660 #123

AkihiroSuda opened this issue Mar 8, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@AkihiroSuda
Copy link
Member

All the official Lima templates except Alpine uses hard drive images, and it is hard to maintain ISO booting specifically for Alpine

@AkihiroSuda AkihiroSuda added the enhancement New feature or request label Mar 8, 2024
@afbjorklund
Copy link
Member

afbjorklund commented Mar 8, 2024

Being able to use a "LiveCD" ISO with Lima is a great feature (since the docker-machine days), and I hope that it is never removed from Lima...

@AkihiroSuda
Copy link
Member Author

The ISO build can continue to be supported, but probably not as a "Tier 1"

@jandubois
Copy link
Member

The ISO build can continue to be supported, but probably not as a "Tier 1"

That just means you want to remove the ⭐ on the Alpine entry on https://lima-vm.io/docs/templates/, or anything else? I'm fine with removing the ⭐.

@AkihiroSuda
Copy link
Member Author

The ISO build can continue to be supported, but probably not as a "Tier 1"

That just means you want to remove the ⭐ on the Alpine entry on https://lima-vm.io/docs/templates/, or anything else? I'm fine with removing the ⭐.

Yes, inclined to demote Alpine from Tier 1 ⭐ to Tier 2 ☆

@jandubois
Copy link
Member

it is hard to maintain ISO booting specifically for Alpine

I assume you mean the cidata boot scripts and not the logic in Go here.

I think some of the logic (like 04-persistent-data-volume) should be moved to the distro instead of being hard-coded in Lima (e.g. I sometimes wanted an Alpine VM without the persistent disk).

This wasn't possible originally, but I think we have most of the pieces in place to implement something like

additionalDisks:
- name: data
  internal: true

provision:
- mode: boot
  script: lima-setup-peristent-disk /etc /home /root /tmp /usr/local /var/lib

The internal: true setting would create a non-shared additional disk that would be created and deleted automatically as the instance is created/deleted.

And we would need to implement mode: boot support for Alpine.

Then the script can be included in the ISO and you can have templates with and without persistent disks, and could even configure which directories you want to persist.

We would still have to keep the current boot scripts for backwards compatibility with older existing instances, so we would also need a mechanism to disable the builtin support.

@jandubois
Copy link
Member

As for creating a hard drive image for Alpine, are there any tools that would convert an ISO into a disk image? If this is easy to do, then I'm happy to add it.

But if it is a completely separate process to build, then I'm personally not interested and would wait for somebody else to implement it.

@afbjorklund
Copy link
Member

When I made my distributions, it was separate build targets. Same rootfs, but different imaging tools at the end...
It was Buildroot rather than Alpine, but I assume that it is the same underlying mkisofs and mkfs.ext4 programs?

I used the LiveCD for containers (same as in docker-machine, and here), but then used resizable HDD for kubernetes.
The main other difference there was changing to from openrc/musl to systemd/glibc, which made it much bigger.

@jandubois
Copy link
Member

The template://alpine is a regular modifiable image now, so this issue can be closed.

The comment about moving the persistent storage out from Lima to alpine-lima has been copied to #131.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants