diff --git a/pkg/specgen/volumes_windows_test.go b/pkg/specgen/volumes_windows_test.go index e59aae29b4..1a0caeef18 100644 --- a/pkg/specgen/volumes_windows_test.go +++ b/pkg/specgen/volumes_windows_test.go @@ -67,6 +67,10 @@ func TestSplitVolumeString(t *testing.T) { }, } + t.Run("shouldResolveWinPaths() returns true", func(t *testing.T) { + assert.True(t, shouldResolveWinPaths()) + }) + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { parts := SplitVolumeString(tt.volume) diff --git a/pkg/specgen/winpath_linux.go b/pkg/specgen/winpath_linux.go index 8244af0445..ceb917a74d 100644 --- a/pkg/specgen/winpath_linux.go +++ b/pkg/specgen/winpath_linux.go @@ -6,7 +6,8 @@ import ( ) func shouldResolveWinPaths() bool { - return machine.HostType() == "wsl" + hostType := machine.HostType() + return hostType == machine.Wsl || hostType == machine.HyperV } func shouldResolveUnixWinVariant(path string) bool {