Skip to content

using lima instead of vagrant file - #3571

Open
gat786 wants to merge 1 commit into
youki-dev:mainfrom
gat786:use-lima
Open

using lima instead of vagrant file#3571
gat786 wants to merge 1 commit into
youki-dev:mainfrom
gat786:use-lima

Conversation

@gat786

@gat786 gat786 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds files

  • scripts/vms/fedora.yaml
  • scripts/vms/ubuntu.yaml
  • scripts/lima-install.sh
    and updates justfile to make it so that you can create and destroy a fedora
    that can be used for development purpose using the limactl toolkit

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test updates
  • CI/CD related changes
  • Other (please describe):

Testing

  • Added new unit tests
  • Added new integration tests
  • Ran existing test suite
  • Tested manually (please provide steps)

Related Issues

Fixes #3139

Additional Context

@gat786 gat786 changed the title Use lima using lima instead of vagrant file May 29, 2026
@gat786

gat786 commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

This is just an attempt to get feedback from the team on how they think this approach is.

@saku3 saku3 added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label May 29, 2026
@utam0k

utam0k commented Jun 3, 2026

Copy link
Copy Markdown
Member

What would the use cases be?

@gat786

gat786 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Hey @utam0k, there was an open issue about moving away from using vagrant towards the CNCF managed project lima.

#3139

I had taken that ticket, but I did not understand lima nor youki that much at that point and it took me a long time to understand them and start working, but this PR I have raised is like the initial step towards it, I see that we use vagrant for

  1. Dev Environment
  2. Dev Environment (rootful)
  3. Running Containerd2Youki tests
  4. PodmanE2E tests

the version which I have right now here only creates a Dev Environment. It uses the scripts that were already present in the CI/CD pipelines as of now.

@saku3

saku3 commented Jun 8, 2026

Copy link
Copy Markdown
Member

The issue description is quite short, so it is not clear how much was originally intended to be in scope, but I think standardizing Lima as a development environment would be valuable.

I also use Lima for development myself, so I would like to see this PR move forward.

However, I think developer-facing documentation for the Lima-based development environment should be included in this PR as well. This would make it easier for other contributors to set up the same environment and use it consistently.

Comment thread scripts/vms/fedora.yaml Outdated
@@ -0,0 +1,84 @@
# Lima configuration for SELinux development environment with Fedora
vmType: qemu

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should not be added unless this template only works with qemu

Comment thread scripts/vms/fedora.yaml Outdated
@@ -0,0 +1,84 @@
# Lima configuration for SELinux development environment with Fedora
vmType: qemu
arch: default

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should not be needed

Comment thread scripts/vms/fedora.yaml Outdated
digest: sha256:846574c8a97cd2d8dc1f231062d73107cc85cbbbda56335e264a46e3a6c8ab2f
- location: https://mirror.cs.princeton.edu/pub/mirrors/fedora/linux/releases/43/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-43-1.6.aarch64.qcow2
arch: aarch64
digest: sha256:66031aea9ec61e6d0d5bba12b9454e80ca94e8a79c913d37ded4c60311705b8b

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use:

base: template:fedora-43

or

# no mount
template:_images/fedora-43

Comment thread scripts/vms/fedora.yaml Outdated

hostResolver:
hosts:
host.lima.internal: host.lima.internal

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This host address does not seem used?

Comment thread scripts/vms/fedora.yaml Outdated

mounts:
- location: "~"
writable: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need to mount the host home directory?

Comment thread scripts/vms/fedora.yaml
writable: true
- location: "{{.Param.ScriptDirectory}}" # Mount the directory containing the script
mountPoint: "/tmp/provision_scripts" # Mount to a directory in VM
writable: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could potentially use limactl cp -r (or limactl shell --sync) instead of these mounts

Comment thread scripts/vms/lima-install.sh Outdated
curl -fsSL "https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz" | tar Cxzvm /usr/local

# For Lima v1.1 onward
curl -fsSL "https://github.com/lima-vm/lima/releases/download/${VERSION}/lima-additional-guestagents-${VERSION:1}-$(uname -s)-$(uname -m).tar.gz" | tar Cxzvm /usr/local

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional guestagents do not seem used

Comment thread scripts/vms/lima-install.sh Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script does not seem used in CI?

@gat786
gat786 force-pushed the use-lima branch 4 times, most recently from 74a4a7a to 10f31ce Compare July 21, 2026 16:32
Signed-off-by: Ganesh Tiwari <ganesht049@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch to lima from Vagrant

4 participants