simulator: improve podman compatibility for container-backed VMs#4014
Open
hickeng wants to merge 1 commit into
Open
simulator: improve podman compatibility for container-backed VMs#4014hickeng wants to merge 1 commit into
hickeng wants to merge 1 commit into
Conversation
Add helpers and options that let vcsim container-backed VMs work
correctly under rootless podman-docker:
commandError(cmd, err, stderr) – consistent error logging that
includes the command's stderr so failures are easier to diagnose.
RUN.network ExtraConfig – explicit container network name;
needed for rootless podman where the default bridge does not
provide cross-container IP connectivity.
RUN.mountdmi ExtraConfig – error hint when /dev/mem mount
fails (rootless podman permission issue).
syncNetworkConfigToVMGuestProperties – now calls ctx.Update for
every modified property and retries IP resolution after container
start to handle delayed IP assignment.
watchContainer callback – updated to accept a *Context so callers
can trigger property change notifications.
test/helper.go – adds IsRootlessPodman() and ContainerNetworkFromSpec()
helpers; Example_runContainer in feature_test.go uses them so the
curl probe joins the same bridge network as the nginx VM.
AI-Tool-Used: Cursor
AI-Tool-Use-Level: medium
AI-Code-Category: non-production
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: George Hicken <george.hicken@broadcom.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add helpers and options that let vcsim container-backed VMs work correctly
under rootless podman-docker:
command's stderr so failures are easier to diagnose.
rootless podman where the default bridge does not provide cross-container
IP connectivity.
(rootless podman permission issue).
modified property and retries IP resolution after container start to handle
delayed IP assignment.
property change notifications.
helpers; Example_runContainer in feature_test.go uses them so the curl probe
joins the same bridge network as the nginx VM.
How Has This Been Tested?
Unit and sim testing