Mount - Virtual Machine On Host Directory

Link the host directory to Virtual Machine

Example of UTM:

  1. Setup Shared Directory in UTM setting of the virtual machine

  2. Create a directory which will link to host directory

    sudo mkdir /mnt/shared_directory
    
  3. Link the host directory to Virtual machine

    sudo mount -t 9p -o trans=virtio share /mnt/shared_directory
    
  4. Enter directory and the mounted directory will link to host directory

    cd /mnt/shared_directory && ls -al
    
  5. Unmount the host directory after used

    unmount /mnt/shared_directory