Skip to content

Commit

Permalink
Support testing kubevirt on RHCOS
Browse files Browse the repository at this point in the history
On RHCOS, the root (/) directory is mounted as read only so when we try
to create a host-disk under root it fails. We should use /var/ instead.

Signed-off-by: Daniel Belenky <[email protected]>
  • Loading branch information
Daniel Belenky committed Sep 22, 2020
1 parent 3094108 commit e532bd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/vmi-host-disk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ spec:
volumes:
- hostDisk:
capacity: 1Gi
path: /data/disk.img
path: /var/data/disk.img
type: DiskOrCreate
name: host-disk
2 changes: 1 addition & 1 deletion tools/vms-generator/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ func GetVMIBlockPvc() *v1.VirtualMachineInstance {

func GetVMIHostDisk() *v1.VirtualMachineInstance {
vmi := getBaseVMI(VmiHostDisk)
addHostDisk(&vmi.Spec, "/data/disk.img", v1.HostDiskExistsOrCreate, "1Gi")
addHostDisk(&vmi.Spec, "/var/data/disk.img", v1.HostDiskExistsOrCreate, "1Gi")
return vmi
}

Expand Down

0 comments on commit e532bd3

Please sign in to comment.