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

Commit

Permalink
clh: Update clh driver to use the latest openAPI knobs
Browse files Browse the repository at this point in the history
We leverage the new openAPI knobs from CLH to set readonly for disk image
and we also pass kernel cmd to set guest root filesystem readonly.

Signed-off-by: Bo Chen <[email protected]>
  • Loading branch information
likebreath committed Feb 20, 2020
1 parent de8fe25 commit 12d10eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ var clhKernelParams = []Param{
{"no_timer_check", ""}, // do not check broken timer IRQ resources
{"noreplace-smp", ""}, // do not replace SMP instructions
{"agent.log_vport", fmt.Sprintf("%d", vSockLogsPort)}, // tell the agent where to send the logs
{"rootflags", "data=ordered,errors=remount-ro ro"}, // mount the root filesystem as readonly
}

var clhDebugKernelParams = []Param{
Expand Down Expand Up @@ -248,7 +249,8 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
}

disk := chclient.DiskConfig{
Path: imagePath,
Path: imagePath,
Readonly: true,
}
clh.vmconfig.Disks = append(clh.vmconfig.Disks, disk)

Expand Down

0 comments on commit 12d10eb

Please sign in to comment.