Skip to content

Commit cb25007

Browse files
cmainasurunc-bot[bot]
authored andcommitted
feat(cloud-hypervisor): Add support for block-based rootfs in Linux
Add support for bloc-based rootfs of Linux guests over cloud-hypervisor. The support was missing because we simply had to update the respective function in the linux.go file. PR: #786 Signed-off-by: Charalampos Mainas <cmainas@nubificus.co.uk> Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk> Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
1 parent a7dc0f1 commit cb25007

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

pkg/unikontainers/unikernels/linux.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@ func (l *Linux) MonitorBlockCli() []types.MonitorBlockArgs {
179179
Path: aBlock.Source,
180180
})
181181
}
182+
case "cloud-hypervisor":
183+
for _, aBlock := range l.Blk {
184+
blkArgs = append(blkArgs, types.MonitorBlockArgs{
185+
ID: aBlock.ID,
186+
Path: aBlock.Source,
187+
})
188+
}
182189
default:
183190
return nil
184191
}

tests/e2e/test_cases.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,22 @@ func nerdctlTestCases() []containerTestArgs {
456456
Skippable: false,
457457
TestFunc: pingTest,
458458
},
459+
{
460+
Image: "harbor.nbfc.io/nubificus/urunc/nginx-cloud-hypervisor-linux-raw:latest",
461+
Name: "CloudHypervisor-linux-nginx-devmapper",
462+
Devmapper: true,
463+
Seccomp: true,
464+
UID: 0,
465+
GID: 0,
466+
Groups: []int64{},
467+
Memory: "512M",
468+
Cli: "",
469+
Volumes: []containerVolume{},
470+
StaticNet: false,
471+
SideContainers: []string{},
472+
Skippable: false,
473+
TestFunc: pingTest,
474+
},
459475
}
460476
}
461477

0 commit comments

Comments
 (0)