Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #191 from amshinde/handle-shm-mount
Browse files Browse the repository at this point in the history
virtcontainers: Do not pass /dev/shm as 9p mount
  • Loading branch information
Sebastien Boeuf authored Apr 10, 2018
2 parents be151cb + e96d3ef commit f74f61e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions virtcontainers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ func (c *Container) mountSharedDirMounts(hostSharedDir, guestSharedDir string) (
continue
}

// We need to treat /dev/shm as a special case. This is passed as a bind mount in the spec,
// but it does not make sense to pass this as a 9p mount from the host side.
// This needs to be handled purely in the guest, by allocating memory for this inside the VM.
if m.Destination == "/dev/shm" {
continue
}

randBytes, err := generateRandomBytes(8)
if err != nil {
return nil, err
Expand Down

0 comments on commit f74f61e

Please sign in to comment.