Suport vpci-class-guid in the non-containerd backend
IDType `vpci-class-guid` is a synonym of `class`. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
parent
cb07afa3cc
commit
31e1fec950
2 changed files with 6 additions and 8 deletions
|
@ -53,8 +53,6 @@ func TestWindowsDevices(t *testing.T) {
|
|||
doc: "process/vpci-class-guid://5B45201D-F2F2-4F3B-85BB-30FF1F953599 mounted",
|
||||
devices: []string{"vpci-class-guid://5B45201D-F2F2-4F3B-85BB-30FF1F953599"},
|
||||
isolation: containertypes.IsolationProcess,
|
||||
expectedStartFailure: !testEnv.RuntimeIsWindowsContainerd(),
|
||||
expectedStartFailureMessage: "device assignment of type 'vpci-class-guid' is not supported",
|
||||
expectedStdout: "/Windows/System32/HostDriverStore/FileRepository",
|
||||
},
|
||||
{
|
||||
|
|
|
@ -313,8 +313,8 @@ func (c *client) createWindows(id string, spec *specs.Spec, runtimeOptions inter
|
|||
}
|
||||
for _, d := range spec.Windows.Devices {
|
||||
// Per https://github.com/microsoft/hcsshim/blob/v0.9.2/internal/uvm/virtual_device.go#L17-L18,
|
||||
// this represents an Interface Class GUID.
|
||||
if d.IDType != "class" {
|
||||
// these represent an Interface Class GUID.
|
||||
if d.IDType != "class" && d.IDType != "vpci-class-guid" {
|
||||
return errors.Errorf("device assignment of type '%s' is not supported", d.IDType)
|
||||
}
|
||||
configuration.AssignedDevices = append(configuration.AssignedDevices, hcsshim.AssignedDevice{InterfaceClassGUID: d.ID})
|
||||
|
|
Loading…
Reference in a new issue