Skip to content

Cannot mount virtiofs share on darwin/arm64 #4115

@jankammerath

Description

@jankammerath

I am trying to mount a virtiofs VZSingleDirectoryShare and receive the folling error on hvc0.

onboot 002-mount: from /containers/onboot/002-mount
mount: mounting containers on /var/lib failed: No such device

The LinuxKit YAML section

onboot:
  - name: mount
    image: linuxkit/mount:cb8caa72248f7082fc2074ce843d53cdc15df04a
    command: ["/bin/mount", "-t", "virtiofs", "containers", "/var/lib"]

Apple Virtualization

let storageUrl = self.getStorageUrl()
let sharedDirectory = VZSharedDirectory(url: storageUrl, readOnly: false)
let singleDirectoryShare = VZSingleDirectoryShare(directory: sharedDirectory)
let sharingConfiguration = VZVirtioFileSystemDeviceConfiguration(tag: "containers")
sharingConfiguration.share = singleDirectoryShare
virtualMachineConfiguration.directorySharingDevices = [sharingConfiguration]

LinuxKit run

I also tried linuxkit run with the following command.

linuxkit run virtualization --virtiofs="containers" linuxkit/linuxkit

The mount command was adjusted to the virtiofs0 tag that LinuxKit uses.

  - name: mount
    image: linuxkit/mount:cb8caa72248f7082fc2074ce843d53cdc15df04a
    command: ["/bin/mount", "-t", "virtiofs", "virtiofs0", "/var/lib"]

In all these cases, mount was unable to access the device.

Many thanks for your support in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions