How to create UTM virtual machine (VM) running Ubuntu and use its Shared Directory Feature on an M1 Silicon Mac Download "UTM for MAC" and install it at this site: https://mac.getutm.app/gallery/ubuntu-20-04 You will also need to download the Ubuntu Server ISO, which will be used to create the Linux environment inside the VM. 1) Open UTM and click the "+" button to open the VM creation wizard. 2) Select "Virtualize". 3) Select "Linux". 4) Click "Browse" and select the Ubuntu Server ISO downloaded from the link above. Press "Next" to continue. 5) Pick the amount of RAM and CPU cores you wish to give access to the VM. For basic use, I recommend leaving the default of 4096 MB of "Memory" (roughly 4 GB) and default number of cores. Press “Next” to continue. 6) Specify the maximum amount of drive space to allocate. For basic use, I recommend downsizing to 20 GB of "Storage." Press "Next" to continue. 7) If you have a directory you want to mount in the VM, you can select it here. All of its contents will be made accessible, but not the folder itself. Alternatively, you can skip this and select the directory later from the VM window’s toolbar. The shared directory will be available after installing SPICE tools (see below). Press “Next” to continue. 8) Press “Save” to create the VM and press the Run button to start the VM. 9) Use the up, down, and enter keys to navigate the boot screen and select "Try or Install Ubuntu Server." 10) Select "English (US)" as your language unless you prefer otherwise. 11) For the sake of consistency, do not update the installer if asked. You should be running Ubuntu LTS 22.04.2. Select "Continue without updating." 12) If you use an alternate keyboard layout (Dvorak, Colemak), then select it in the "Variant" dropdown menu. Otherwise, leave it as is. Select "Done." 13) For this process, all of the other defaults are used, so keep selecting "Done" or "Continue" until you reach the "Profile Setup" 14) Unless you have specific preferences, enter your full name into "Your name," If the reboot fails, you can manually quit the VM, unmount the installer ISO, and start the VM again to boot into your new installation. After rebooting, if you see a blank screen with a blinking cursor, click on "Drive image options" in the VM toolbar (second icon counted from the right). Select "CD/DVD (ISO) Image (usb)" -> "Eject". Then restart the VM. At the end of the installation, you will have Ubuntu Server installed without any GUI. To install Ubuntu Desktop, log in and run: $ sudo apt update $ sudo apt install ubuntu-desktop $ sudo reboot 1) When creating VM, choose your directory from finder when prompted. All of its contents will be copied over, but not the folder itself. If you choose to wait until later, you can select the VM on the main UTM window and scroll down to find the "Shared Directory" entry. 2) After ubuntu desktop is setup, install spice with $ sudo apt install spice-vdagent spice-webdavd (need to type by hand since doing this to let you have shared clipboard) 3) install davfs2 with $ sudo apt install davfs2 Select allowing unprivileged to access so if not sudo Will be able to change code only on mac. 4) Create a new directory called “Research” or any name you choose. You might decide to give it the same name as the directory you are copying from. 5) run $ sudo mount -t davfs 127.0.0.1:9843 /absolute/path/to/Shared * The set of numbers is the address of the webDAV server that UTM stores the directory on. * Currently, you must repeat this last step every time you kill the VM and boot it up again. Can also Look into auto mounting fstab: mounts files on boot autofs: mounts files when requested, unmounts after some time, supposed to be more efficient But need to pair this up with davfs2, since we need that specially to mount the WebDAV directory. How to create UTM virtual machine (VM) running Ubuntu and use its Shared Directory Feature on an M1 Silicon Mac Download "UTM for MAC" and install it at this site: https://mac.getutm.app/gallery/ubuntu-20-04 You will also need to download the Ubuntu Server ISO, which will be used to create the Linux environment inside the VM. 1) Open UTM and click the "+" button to open the VM creation wizard. 2) Select "Virtualize". 3) Select "Linux". 4) Click "Browse" and select the Ubuntu Server ISO downloaded from the link above. Press "Next" to continue. 5) Pick the amount of RAM and CPU cores you wish to give access to the VM. For basic use, I recommend leaving the default of 4096 MB of "Memory" (roughly 4 GB) and default number of cores. Press “Next” to continue. 6) Specify the maximum amount of drive space to allocate. For basic use, I recommend downsizing to 20 GB of "Storage." Press “Next” to continue. 7) If you have a directory you want to mount in the VM, you can select it here. All of its contents will be made accessible, but not the folder itself. Alternatively, you can skip this and select the directory later from the VM window’s toolbar. The shared directory will be available after installing SPICE tools (see below). Press “Next” to continue. 8) Press "Save" to create the VM and press the Run button to start the VM. 9) Use the up, down, and enter keys to navigate the boot screen and select "Try or Install Ubuntu Server." 10) Select "English (US)" as your language unless you prefer otherwise. 11) For the sake of consistency, do not update the installer if asked. You should be running Ubuntu LTS 22.04.2. Select "Continue without updating." 12) If you use an alternate keyboard layout (Dvorak, Colemak), then select it in the "Variant" dropdown menu. Otherwise, leave it as is. Select "Done." 13) For this process, all of the other defaults are used, so keep selecting "Done" or "Continue" until you reach the "Profile Setup" 14) Unless you have specific preferences, enter your full name into "Your name," If the reboot fails, you can manually quit the VM, unmount the installer ISO, and start the VM again to boot into your new installation. At the end of the installation, you will have Ubuntu Server installed without any GUI. To install Ubuntu Desktop, log in and run: $ sudo apt update $ sudo apt install ubuntu-desktop $ sudo reboot 1) When creating VM, choose your directory from finder when prompted. All of its contents will be copied over, but not the folder itself. If you choose to wait until later, you can select the VM on the main UTM window and scroll down to find the "Shared Directory" entry. 2) After ubuntu desktop is setup, install spice with $ sudo apt install spice-vdagent spice-webdavd 3) install davfs2 with $ sudo apt install davfs2 4) Create a new directory called “Research” or any name you choose. You might decide to give it the same name as the directory you are copying from. 5) run $ sudo mount -t davfs 127.0.0.1:9843 /absolute/path/to/Shared * The set of numbers is the address of the webDAV server that UTM stores the directory on. * Currently, you must repeat this last step every time you kill the VM and boot it up again. Look into auto mounting fstab: mounts files on boot autofs: mounts files when requested, unmounts after some time, supposed to be more efficient I'll have to try pairing this up with davfs2, since we need that specially to mount the WebDAV directory. --- Then reboot after server installation, log into server and then you did desktop installation sudo apt update sudo apt install ubuntu-server Authors: Miles Henle, Jocelyn Wang