Skip to content

Commit

Permalink
vfkit: Add file sharing support
Browse files Browse the repository at this point in the history
This adds file sharing support to the vfkit driver.
This requires a version of vfkit with file sharing support (0.0.2 or
newer).
  • Loading branch information
cfergeau committed Jul 26, 2022
1 parent dec67b4 commit 7a7d75d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/drivers/vfkit/driver_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,20 @@ func (d *Driver) Start() error {
}
}

// shared directories
for _, sharedDir := range d.SharedDirs {
// TODO: add support for 'mount.ReadOnly'
// TODO: check format
dev, err := client.VirtioFsNew(sharedDir.Source, sharedDir.Tag)
if err != nil {
return err
}
err = vm.AddDevice(dev)
if err != nil {
return err
}
}

// entropy
dev, err = client.VirtioRNGNew()
if err != nil {
Expand Down

0 comments on commit 7a7d75d

Please sign in to comment.