Documentation
¶
Overview ¶
Package layers deals with container layer mounting/unmounting for LCOW and WCOW
Index ¶
- func GetHCSLayers(ctx context.Context, vm *uvm.UtilityVM, paths []string) (layers []hcsschema.Layer, err error)
- func MountLCOWLayers(ctx context.Context, containerID string, layers *LCOWLayers, guestRoot string, ...) (_, _ string, _ resources.ResourceCloser, err error)
- func MountSandboxVolume(ctx context.Context, hostPath, volumeName string) (err error)
- func MountWCOWLayers(ctx context.Context, containerID string, layerFolders []string, ...) (_ string, _ resources.ResourceCloser, err error)
- func RemoveSandboxMountPoint(ctx context.Context, hostPath string) error
- type LCOWLayer
- type LCOWLayers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHCSLayers ¶
func GetHCSLayers(ctx context.Context, vm *uvm.UtilityVM, paths []string) (layers []hcsschema.Layer, err error)
GetHCSLayers converts host paths corresponding to container layers into HCS schema V2 layers
func MountLCOWLayers ¶ added in v0.10.0
func MountLCOWLayers(ctx context.Context, containerID string, layers *LCOWLayers, guestRoot string, vm *uvm.UtilityVM) (_, _ string, _ resources.ResourceCloser, err error)
MountLCOWLayers is a helper for clients to hide all the complexity of layer mounting for LCOW Layer folder are in order: base, [rolayer1..rolayern,] scratch Returns the path at which the `rootfs` of the container can be accessed. Also, returns the path inside the UVM at which container scratch directory is located. Usually, this path is the path at which the container scratch VHD is mounted. However, in case of scratch sharing this is a directory under the UVM scratch.
func MountSandboxVolume ¶ added in v0.10.0
Mount the sandbox vhd to a user friendly path.
func MountWCOWLayers ¶ added in v0.10.0
func MountWCOWLayers(ctx context.Context, containerID string, layerFolders []string, volumeMountPath string, vm *uvm.UtilityVM) (_ string, _ resources.ResourceCloser, err error)
MountWCOWLayers is a helper for clients to hide all the complexity of layer mounting for WCOW. Layer folder are in order: base, [rolayer1..rolayern,] scratch
v1/v2: Argon WCOW: Returns the mount path on the host as a volume GUID. v1: Xenon WCOW: Done internally in HCS, so no point calling doing anything here. v2: Xenon WCOW: Returns a CombinedLayersV2 structure where ContainerRootPath is a folder inside the utility VM which is a GUID mapping of the scratch folder. Each of the layers are the VSMB locations where the read-only layers are mounted. Job container: Returns the mount path on the host as a volume guid, with the volume mounted on the host at `volumeMountPath`.
Types ¶
type LCOWLayers ¶ added in v0.10.0
type LCOWLayers struct { // Should be in order from top-most layer to bottom-most layer. Layers []*LCOWLayer ScratchVHDPath string }
Defines a set of LCOW layers. For future extensibility, the LCOWLayer type could be swapped for an interface, and we could either call some method on the interface to "apply" it directly to the UVM, or type cast it to the various types that we support, and use the one it matches. This would allow us to support different "types" of mounts, such as raw VHD, VHD+partition, etc.