Skip to content

More work on Incus agents#2564

Merged
stgraber merged 8 commits intolxc:mainfrom
bensmrs:agents
Oct 20, 2025
Merged

More work on Incus agents#2564
stgraber merged 8 commits intolxc:mainfrom
bensmrs:agents

Conversation

@bensmrs
Copy link
Copy Markdown
Contributor

@bensmrs bensmrs commented Oct 16, 2025

No description provided.

@bensmrs bensmrs requested a review from stgraber as a code owner October 16, 2025 12:11
@bensmrs
Copy link
Copy Markdown
Contributor Author

bensmrs commented Oct 16, 2025

@stgraber, I’m gonna need some help in the agent selection logic. For ISO mounts, the agent is selected in an architecture-dependent way, which is not used for 9p mounts. Could you please have a look?

@github-actions github-actions bot added the Documentation Documentation needs updating label Oct 16, 2025
@bensmrs bensmrs force-pushed the agents branch 3 times, most recently from fdfa652 to 9972665 Compare October 16, 2025 15:26
@stgraber
Copy link
Copy Markdown
Member

@stgraber, I’m gonna need some help in the agent selection logic. For ISO mounts, the agent is selected in an architecture-dependent way, which is not used for 9p mounts. Could you please have a look?

Yeah, the reason for that is pretty simple. In the 9p case, we can just share a folder on the host containing all the agent builds (/opt/incus/agent/ in Zabbly packages). That's cheap as it's the same data available for everyone through QEMU's built-in sharing.

For ISOs, now we need to actually generate a .iso for every instance using that. We don't want to waste space as each agent build can be around 20MB, so instead we expect the ISO to only contain the binary the instance needs. We should know the architecture of the instance already (d.architecture) and we can tell the OS through image.os.

@bensmrs
Copy link
Copy Markdown
Contributor Author

bensmrs commented Oct 16, 2025

Yeah, the reason for that is pretty simple. In the 9p case, we can just share a folder on the host containing all the agent builds (/opt/incus/agent/ in Zabbly packages). That's cheap as it's the same data available for everyone through QEMU's built-in sharing.

Oh I actually missed that incus-agent is a script to call the right agent. In my tests, I just injected the macOS agent binary. I’ll look into it.

@bensmrs
Copy link
Copy Markdown
Contributor Author

bensmrs commented Oct 16, 2025

Oooh I actually got lost in the agent dance and overlooked that the config and agent shares are actually different!
So there’s a little more work to do, and an additional splitting for the incus-agent script between a Linux-specific one and a Darwin-specific one.
I placed myself in the very convenient case where /Volumes/config/incus-agent is the actual agent binary (and it works fine).

@bensmrs bensmrs marked this pull request as draft October 16, 2025 22:55
@bensmrs bensmrs force-pushed the agents branch 2 times, most recently from 0798804 to 89f645c Compare October 19, 2025 20:46
@bensmrs bensmrs marked this pull request as ready for review October 19, 2025 21:23
@bensmrs
Copy link
Copy Markdown
Contributor Author

bensmrs commented Oct 19, 2025

Ok that should be good now, both config and config+agent setups should be supported. I haven’t taken any care to handle CDROM installation, because macOS supports 9p, so not really worth the time I think.

@stgraber stgraber merged commit ee07b91 into lxc:main Oct 20, 2025
66 of 72 checks passed
@bensmrs bensmrs deleted the agents branch December 4, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation needs updating

Development

Successfully merging this pull request may close these issues.

2 participants