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 SUSE's MicroOS #1456

Open
e-minguez opened this issue Apr 4, 2023 · 7 comments
Open

Add support for SUSE's MicroOS #1456

e-minguez opened this issue Apr 4, 2023 · 7 comments

Comments

@e-minguez
Copy link
Contributor

Description

https://en.opensuse.org/Portal:MicroOS

@e-minguez
Copy link
Contributor Author

I'm currently trying to make it work but unfortunately it seems the /mnt mountpoint is read only so the mkdir -p -m 700 "${LIMA_CIDATA_MNT}" command here https://github.com/lima-vm/lima/blob/master/pkg/cidata/cidata.TEMPLATE.d/user-data#L35 fails.

However I'm able to ssh into the VM properly. It seems the LIMA_CIDATA_MNT variable is hardcoded https://github.com/lima-vm/lima/blob/master/docs/internal.md#environment-variables-1 I guess it would be nice to make it configurable (?)

The configuration file I've used is this one:

# This example requires Lima v0.7.0 or later
images:
# Hint: run `limactl prune` to invalidate the "Current" cache
- location: https://download.opensuse.org/tumbleweed/appliances/openSUSE-MicroOS.x86_64-OpenStack-Cloud.qcow2
  arch: "x86_64"
- location: https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-MicroOS.aarch64-OpenStack-Cloud.qcow2
  arch: "aarch64"
mounts:
- location: "~"
- location: "/tmp/lima"
  writable: true

I think this is related to #1372 as well.

@afbjorklund
Copy link
Member

afbjorklund commented Apr 4, 2023

I think on CoreOS /mnt is a symlink to /var/mnt, but in general I think Lima needs some modifications in order to support read-only systems... Currently there is alpine-lima, which uses a read-write but temporary filesystem (a.k.a. "LiveCD")

Even if it is able to find the scripts, I think that they will still fail when they try for instance to install packages (due to the filesystem being read-only). To actually support them (CoreOS/MicroOS), it needs to install on passive partition and reboot.


Where does OpenSUSE expect to find the configdrive ?

At least the label seems to be the same, always something.

The filesystem volume label must be cidata.

https://en.opensuse.org/Portal:MicroOS/cloud-init

EDIT: Just a temporary location, enough to get user-data.

subp.py[DEBUG]: Running command ['mount', '-o', 'ro', '-t', 'auto', '/dev/sr0', '/run/cloud-init/tmp/tmppztoyvpn'] with allowed return codes [0] (shell=False, capture=True)

@e-minguez
Copy link
Contributor Author

I've tried a quick & dirty workaround which is ssh into the VM, edit the 00-lima.boot.sh to use /tmp instead and then run the script... and it seems to work until some point.. the package installation fails of course.

@afbjorklund
Copy link
Member

afbjorklund commented Apr 4, 2023

Ultimately it might need lima-flatcar and lima-microos images, with all the required configuration and packages already done. But they are still annoying to use, with random reboots and "everything" being read-only...

@afbjorklund
Copy link
Member

Made some ignition hacks in PR #1653 for Fedora, not sure if they would also work on openSUSE ?

The package installation is skipped altogether, and (some of) the boot scripts were "ported" to yaml

@afbjorklund
Copy link
Member

Haven't heard anything, so I don't think there is much interest in running immutable OS in Lima

@afbjorklund
Copy link
Member

afbjorklund commented Jan 15, 2024

It claims to have cloud-init support now, https://en.opensuse.org/Portal:MicroOS#Cloud-Init_Based_Configuration

Haven't tried if the other changes (done for Fedora and Container Linux) was enough, to also work with MicroOS?
But otherwise the reasons for not including MicroOS (with ignition and systemd) are the same as in #1372 (comment)

The /mnt and /run locations are still hardcoded in Lima, when it comes to the healthchecks (for ssh and boot)

  • /bin/cp /mnt/lima-cidata/meta-data /run/lima-ssh-ready
  • /bin/cp /mnt/lima-cidata/meta-data /run/lima-boot-done

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

No branches or pull requests

3 participants