Skip to content

Conversation

@gamora12
Copy link
Contributor

Add workflows for running tests on MSHV using Azure infrastructure.

Add workflow to setup Azure infra to validate MSHV.
This is used to provision the environment before executing tests
on it.

Signed-off-by: AASTHA RAWAT <[email protected]>
Add workflow to run integration tests on mshv. It calls the azure
infra setup workflow and executes integration tests in the
provisioned environment.

Signed-off-by: AASTHA RAWAT <[email protected]>
Use mshv runner for mshv workflows. Disable manual trigger.

Signed-off-by: AASTHA RAWAT <[email protected]>
@gamora12 gamora12 requested a review from a team as a code owner September 25, 2025 13:21
fi
done
sudo ./scripts/dev_cli.sh tests --hypervisor mshv --integration -- -- --skip common_parallel::test_tpm --skip common_parallel::test_cpu_topology_421 --skip common_parallel::test_cpu_topology_142 --skip common_parallel::test_cpu_topology_262 --skip common_sequential::test_snapshot_restore_basic --skip common_sequential::test_snapshot_restore_with_fd --skip common_sequential::test_snapshot_restore_pvpanic --skip virtio_net_latency_us --skip common_parallel::test_cpu_hotplug
Copy link
Contributor

Choose a reason for hiding this comment

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

May be this skips tests could be retrieved from somewhere else, like a environment variable or a file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this can be done.

Copy link
Contributor

Choose a reason for hiding this comment

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

What value would it add?

I imagine this list would shrink over time, so would it really be worth it?

Also, how would the environment variable be set?

Copy link
Contributor

Choose a reason for hiding this comment

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

What value would it add?

I imagine this list would shrink over time, so would it really be worth it?

Also, how would the environment variable be set?

Not that much of value just clean code.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should disable the tests in integration.rs file may be. @likebreath ?

Copy link
Member

Choose a reason for hiding this comment

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

In the integration.rs file we do have some build time filtering of tests that don't work on mshv. You will need to make sure you just pass the --no-default features --features mshv when running/building the tests. You can still use a CH binary that is both kvm and mshv - we just want to conditional build the test suite.

Copy link
Contributor

@russell-islam russell-islam Oct 7, 2025

Choose a reason for hiding this comment

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

I think since this CI will be still testing mode for some time, we can merge this as now and work in parallel to make changes in integration.rs and eventually remove these tests from here. We should create an issue @gamora12 and start working. @rbradford ??

Copy link
Contributor Author

@gamora12 gamora12 Oct 8, 2025

Choose a reason for hiding this comment

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

Yeah, that's fine by me. I'm already working on it; I can raise a separate PR for these changes as well.

Pull requests from forked repos cannot access GitHub secrets which
results in failure of MSHV CI. Switching to pull_request_target
resolves this. It allows the workflow to run with access to repo secrets
and ensures that code from the base branch is used instead of forked
code, preventing potential security risks.

Signed-off-by: AASTHA RAWAT <[email protected]>
branches:
- test_mshv_ci
pull_request:
on: [pull_request_target, merge_group]
Copy link
Member

Choose a reason for hiding this comment

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

It's not recommended to use this - from the docs:

This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request

We should run on merge_group as then the code has already been reviewed and can be sure isn't extracting secrets.

Copy link
Contributor Author

@gamora12 gamora12 Oct 8, 2025

Choose a reason for hiding this comment

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

With pull_request_target, the CI will only run the base repository code. Even if someone tries to introduce code change that accesses secrets, the code won't be run until it's merged. The runner vm has access to the secrets but it only runs the workflow code (not the PR code), the cloud-hypervisor code will be run on a separate azure vm (which doesn't have access to secrets & can't label or comment on PR), so we're actually safe.

Copy link
Member

Choose a reason for hiding this comment

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

Ah - yes! Because dev_cli.sh is run inside a separately created VM. I'm happy if you're happy with that.

@rbradford rbradford added this pull request to the merge queue Oct 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 8, 2025
@rbradford
Copy link
Member

ERROR: ***"error":***"code":"InvalidTemplateDeployment","message":"The template deployment 'vm_deploy_ulKg2DbNfsgQSGv0OIOQoYwMYACZoIxN' is not valid according to the validation procedure. The tracking id is 'eb456ac7-e971-4bd9-891f-3afb269fbdea'. See inner errors for details.","details":[***"code":"SkuNotAvailable","message":"The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D16s_v5' is currently not available in location 'westus2'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details."***]***

@gamora12
Copy link
Contributor Author

ERROR: ***"error":***"code":"InvalidTemplateDeployment","message":"The template deployment 'vm_deploy_ulKg2DbNfsgQSGv0OIOQoYwMYACZoIxN' is not valid according to the validation procedure. The tracking id is 'eb456ac7-e971-4bd9-891f-3afb269fbdea'. See inner errors for details.","details":[***"code":"SkuNotAvailable","message":"The requested VM size for resource 'Following SKUs have failed for Capacity Restrictions: Standard_D16s_v5' is currently not available in location 'westus2'. Please try another size or deploy to a different location or different zone. See https://aka.ms/azureskunotavailable for details."***]***

@likebreath this should be fixed by updating the secret I've shared with you.

@rbradford rbradford added this pull request to the merge queue Oct 11, 2025
Merged via the queue into main with commit bb9d352 Oct 11, 2025
41 checks passed
@likebreath likebreath moved this from 🆕 New to ✅ Done in Cloud Hypervisor Roadmap Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants