Multipass is a Windows command line tool from Canonical that quickly creates, manages, and discards new Ubuntu “Server” (command line only, no GUI) Hyper-V VMs. You can use it to test Linux software or to quickly build utility VMs. If you don’t like what you are testing, simply delete the VM and try something else.
This article has been updated to Multipass Version 1.10.
Unlike containers or WSL, a Linux Server VM runs “systemd” and supports components that require a background service (also known as a daemon). This allows you to run database systems and Docker itself on a Multipass VM.
...
A new install of Multipass stores the disk images and virtual machines in the C:\ProgramData\Multipass directory. Hyper-V can only use locations that are on a local disk (not a network share), but if you want to move store these large files to on another disk you should consider this local disk, then before you install . If you have a larger D drive, then you might want to set the environment variable MULTIPASS_STORAGE to point to a location directory on that disk.
You can install Multipass with the winget package manager:
...
Multipass has simple commands and options to share Windows directories with Multipass VMs. This is done through the multipass mount command after the VM is created, or the --mount parameter when creating a VM. This is, however, one of the places where the authors opted first for something they could get to work the same way on all systems without regard to performance. They use a terribly inefficient tool that shares directories over an SSH connection. This is fine for casual access to files, but not for anything that does a lot of I/O. file system based on SSH that provides very poor performance.
If you need to do more than casual file transfer, you need something better. There are other options (NFS, CIFS - a.k.a. Windows Shares, …). I will update this if anyone proposes a best practice .This is one of the places where a multi-user machine would have problems with security. Mounts are shipped disabled, and if you are running on a single user environment or you trust all your usersor posts some benchmarks.
Hyper-V bypasses Windows access control, and Multipass runs as a background service under a SYSTEM userid. There is no way to recreate file system access control. The multipass mount service is shipped disabled, and you have to turn it on as an administrator. After that, you acknowledge that directories are being exposed to everyone, which is why this is best done on a single user machine. To turn mounts on, open a Run as Administrator command prompt window and issue the one time command:
...