Skip to content

Conversation

@ambarve
Copy link
Contributor

@ambarve ambarve commented Oct 28, 2025

This PR adds following two commits:

  1. Set disk identifier for confidential UVM's scratch

Confidential UVMs boot with a scratch that is completely empty (not even a partition table
on it). The UVM formats it as a part of the boot flow. However, the UVM needs a way to
correctly identify and distinguish between the scratch & boot VHDs. We do this by setting
a pre-defined GUID in the VirtualDiskIdentifier field of the VHD metadata. A fixed
pre-defined GUID will be set in the metadata of every UVM's scratch.

  1. Pass CWCOW UVM measurements to sidecar GCS

A reference_info.cose file is usually shipped along with other UVM boot files. This file
contains signed measurements of the UVM. We need to pass the contents of this file to the
sidecar GCS so that it can make it available to the containers running inside the UVM.

@ambarve ambarve requested a review from a team as a code owner October 28, 2025 21:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the github.com/Microsoft/go-winio dependency from v0.6.2 to v0.6.3-0.20251027160822-ad3df93bed29 and integrates new functionality for VHD identifier management and UVM reference information handling in confidential computing scenarios.

Key changes:

  • Updates go-winio dependency to add virtual disk identifier get/set functionality
  • Implements UVM reference info file handling for confidential WCOW VMs
  • Sets predefined GUID identifier on scratch VHDs for reliable disk identification
  • Removes deprecated // +build constraint comments in favor of //go:build directives

Reviewed Changes

Copilot reviewed 7 out of 38 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
go.mod, go.sum, vendor/modules.txt Updates go-winio dependency to v0.6.3-0.20251027160822-ad3df93bed29
vendor/github.com/Microsoft/go-winio/vhd/vhd.go Adds GetVirtualDiskIdentifier and SetVirtualDiskIdentifier functions for VHD management
vendor/github.com/Microsoft/go-winio/vhd/zvhd_windows.go Adds Windows syscall implementations for virtual disk information operations
vendor/github.com/Microsoft/go-winio/pkg/bindfilter/bind_filter.go Simplifies error messages by replacing fmt.Errorf with errors.New for static errors
vendor/github.com/Microsoft/go-winio/*.go Removes deprecated // +build constraint comments
internal/uvm/create_wcow.go Defines unformattedScratchIdentifier GUID and sets it on scratch VHDs
internal/uvm/security_policy.go Adds WithWCOWUVMReferenceInfo option to handle UVM reference info files
internal/uvm/start.go Integrates UVM reference info file into confidential UVM setup
internal/oci/uvm.go Adds annotation parsing for UVM reference info file path
internal/protocol/guestresource/resources.go Updates WCOWConfidentialOptions struct with EncodedUVMReference field
internal/gcs-sidecar/host.go Stores UVM reference info from security policy request
vendor/github.com/Microsoft/go-winio/.golangci.yml Adds linter exclusion for gosec G115 integer overflow warnings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ambarve ambarve force-pushed the cwcow_scratch_guid branch 2 times, most recently from 597d8d4 to dbe8c71 Compare October 28, 2025 21:10
@ambarve ambarve force-pushed the cwcow_scratch_guid branch from dbe8c71 to 120822c Compare October 29, 2025 16:27
@ambarve ambarve changed the title Set CWCOW scratch VHD GUID and Pass UVM measurements to the sidecar GCS. Set disk identifier for confidential UVM's scratch Oct 29, 2025
Confidential UVMs boot with a scratch that is completely empty (not even a partition table
on it). The UVM formats it as a part of the boot flow. However, the UVM needs a way to
correctly identify and distinguish between the scratch & boot VHDs. We do this by setting
a pre-defined GUID in the VirtualDiskIdentifier field of the VHD metadata. A fixed
pre-defined GUID will be set in the metadata of every UVM's scratch.

Signed-off-by: Amit Barve <[email protected]>
@ambarve ambarve force-pushed the cwcow_scratch_guid branch from 120822c to b7dc4bc Compare October 29, 2025 16:29
@ambarve ambarve changed the title Set disk identifier for confidential UVM's scratch Set disk identifier for confidential UVM's scratch and Pass UVM measurement info to sidecar GCS Oct 29, 2025
A reference_info.cose file is usually shipped along with other UVM boot files. This file
contains signed measurements of the UVM. We need to pass the contents of this file to the
sidecar GCS so that it can make it available to the containers running inside the UVM.

Signed-off-by: Amit Barve <[email protected]>
@ambarve ambarve force-pushed the cwcow_scratch_guid branch from 8d6f821 to 1249099 Compare October 30, 2025 15:29
@ambarve ambarve merged commit c9c7431 into microsoft:main Oct 30, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants