Skip to content

Commit

Permalink
Add hvsock connection tests
Browse files Browse the repository at this point in the history
Add tests for binding to and listening on hyper-v sockets from within a
uVM (as well as a hyper-v isolated containerd).
Tests verify default SDDL and wildcard bind settings, as well updating
the settings for a particular service ID.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy committed Dec 7, 2023
1 parent ed4b3e2 commit f85ba06
Show file tree
Hide file tree
Showing 6 changed files with 1,299 additions and 65 deletions.
8 changes: 8 additions & 0 deletions internal/uvm/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"path/filepath"
"runtime"

"github.com/Microsoft/go-winio/pkg/guid"
"github.com/sirupsen/logrus"
"go.opencensus.io/trace"
"golang.org/x/sys/windows"
Expand Down Expand Up @@ -173,6 +174,13 @@ func (uvm *UtilityVM) ID() string {
return uvm.hcsSystem.ID()
}

// RuntimeID returns Hyper-V VM GUID.
//
// Only valid after the utility VM has been created.
func (uvm *UtilityVM) RuntimeID() guid.GUID {
return uvm.runtimeID
}

// OS returns the operating system of the utility VM.
func (uvm *UtilityVM) OS() string {
return uvm.operatingSystem
Expand Down
Loading

0 comments on commit f85ba06

Please sign in to comment.