Skip to content

Commit

Permalink
Merge pull request #1164 from AkihiroSuda/dev2
Browse files Browse the repository at this point in the history
vz: fix readonly mounts
  • Loading branch information
AkihiroSuda authored Nov 16, 2022
2 parents 678e32f + 9857eb3 commit c3e82cc
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pkg/cidata/cidata.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,22 @@ func GenerateISO9660(instDir, name string, y *limayaml.LimaYAML, udpDNSLocalPort
return err
}
options := "defaults"
if fstype == "9p" {
switch fstype {
case "9p", "virtiofs":
options = "ro"
if *f.Writable {
options = "rw"
}
options += ",trans=virtio"
options += fmt.Sprintf(",version=%s", *f.NineP.ProtocolVersion)
msize, err := units.RAMInBytes(*f.NineP.Msize)
if err != nil {
return fmt.Errorf("failed to parse msize for %q: %w", location, err)
if fstype == "9p" {
options += ",trans=virtio"
options += fmt.Sprintf(",version=%s", *f.NineP.ProtocolVersion)
msize, err := units.RAMInBytes(*f.NineP.Msize)
if err != nil {
return fmt.Errorf("failed to parse msize for %q: %w", location, err)
}
options += fmt.Sprintf(",msize=%d", msize)
options += fmt.Sprintf(",cache=%s", *f.NineP.Cache)
}
options += fmt.Sprintf(",msize=%d", msize)
options += fmt.Sprintf(",cache=%s", *f.NineP.Cache)
// don't fail the boot, if virtfs is not available
options += ",nofail"
}
Expand Down

0 comments on commit c3e82cc

Please sign in to comment.