Skip to content

Commit

Permalink
Merge pull request #18 from site0801/feat/support-share-kmsg-with-con…
Browse files Browse the repository at this point in the history
…tainer

Support sharing of /dev/kmsg with the container
  • Loading branch information
whywaita committed Sep 7, 2023
2 parents 1e3e055 + ccf2cbb commit 99aab21
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/pkg/api/server_add_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func (s *ShoesLXDMultiServer) AddInstance(ctx context.Context, req *pb.AddInstan

reqInstance := api.InstancesPost{
InstancePut: api.InstancePut{
Config: s.getInstanceConfig(req.SetupScript, req.ResourceType),
Config: s.getInstanceConfig(req.SetupScript, req.ResourceType),
Devices: s.getInstanceDevices(),
},
Name: instanceName,
Source: *instanceSource,
Expand Down Expand Up @@ -146,6 +147,18 @@ lxc.cap.drop=`
return instanceConfig
}

func (s *ShoesLXDMultiServer) getInstanceDevices() map[string]map[string]string {
instanceDevices := map[string]map[string]string{
"kmsg": {
"path": "/dev/kmsg",
"source": "/dev/kmsg",
"type": "unix-char",
},
}

return instanceDevices
}

type targetHost struct {
host lxdclient.LXDHost
resource lxdclient.Resource
Expand Down

0 comments on commit 99aab21

Please sign in to comment.