mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 18:47:03 +00:00
Merge pull request #191 from amshinde/handle-shm-mount
virtcontainers: Do not pass /dev/shm as 9p mount
This commit is contained in:
commit
f74f61e8d1
@ -304,6 +304,13 @@ func (c *Container) mountSharedDirMounts(hostSharedDir, guestSharedDir string) (
|
|||||||
continue
|
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)
|
randBytes, err := generateRandomBytes(8)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user