UTM setup for M1 MAC

Think Different - Dhiraj Patra
5 min readApr 21, 2023

Hope you have already installed your required software from IT team [eg. Vinit]. He has mainly installed the following software:

  • Python 3.8
  • Docker
  • VSCode
  • Sublime Text
  • Anaconda including navigator
  • Chrome
  • MS Edge
  • draw.io
  • Acrobat reader [original]
  • Itsycal [for notification from our office 365 calendar and more]
  • Postman
  • Mongodb Compass [community version]
  • DBbrowser for sqllite
  • balenaEtcher
  • OpenVpn connect [to connect to our office.vpn to work and connect to our remote team]
  • XCTU [to configure xBee module if needed]
  • Microsoft Teams
  • LibreOffice

After several R&D found that UTM | Virtual machines for Mac (getutm.app) can solve our problem. Before that I have tried with lima-vm/lima: Linux virtual machines, typically on macOS, for running containerd (github.com) which not helped out the problem with Docker Desktop run on MAC especially on our M1 MAC which can’t detect our xBee module USB port. M1 MAC host do not share the USB port with guest system [Docker container]. Also then we needed different VM for windows as well eg. Parallels [not free].

UTM does solve both windows and ubuntu can run with USB port sharing inside the container.

Remember:

  • Size of the disk space can’t be change unless delete the VM [eg. Windows] and increase or decrease the size eg. 20 GB to 30 GB etc
  • Windows need to unblock Device Manager by following a You tube link I provided below or you can approach Vinit [IT team]
  • Never close the VM window directly by click on X. Instead shut down the VM properly from OS menu itself first and then can close the window
  • Do not need to keep running UTM all the time. Run only when you require to run any VM OS

How to install UTM in M1 MAC:

  1. Download latest [at least 3.1.5] from UTM | Virtual machines for Mac (getutm.app) or Latest UTM release you can download from:
  2. Releases · utmapp/UTM (github.com)
  3. Open a terminal and run
  4. 1brew install qemu
  5. Install the UTM dmg file by clicking on it
  6. Follow this link to install and configure UTM for Ubuntu 20.04 Ubuntu 20.04 | UTM (getutm.app)
  7. but settings on UTM must be following
  8. need at least 64 GB space for Ubuntu guest [as we will be using Docker 20–30GB fails]
  1. Keep patient it can goes error or take some time around 10–20 min max to boot up if everything fine. Otherwise restart again and when it is calling rebooting just hold the shift key.
  2. Then terminal login with your username and password you have given when installing.
  3. Run the following commands from the above links to install Desktop and sharing lib
  4. After run all the commands for desktop you can login inside it
  5. To get the share folder inside the guest [Ubuntu] you may need to run this command
  6. sudo apt update
  7. sudo apt install ubuntu-desktop
  8. sudo reboot
  9. sudo apt install davfs2
  10. sudo systemctl start spice-webdavd.service
  11. sudo mount -t davfs -o noexec http://127.0.0.1:9843/ <your_mnt_folder>
  12. Click on USB icon need to click the USB device you attached to your host to get inside guest. For me it is USB connector for hat with xBee module.
  1. Now open a terminal and install
  2. sudo apt-get install docker-compose
  3. First time you may need the UI folder in your shared folder
  4. Now you are ready to get the git pull of our application and then run docker-compose to run the application

Similar way you can install Windows 10 home edition,. Before start installing kindly take the lic key for it from our IT team. Windows installation very straight forward.

Follow this link How to Install Windows 10 in UTM (M1 Mac) — YouTube or Windows 10/11 | UTM (getutm.app)

  • Setup 20 GB space is more than enough
  • connect USB drive and activate from VM top right panel
  • Copy paste the folder containing [spice guest tool from above utm link, Mission Control application zip, USB to URT bridge driver zip] into desktop
  • extract the zip folders inside that folder
  • You need to unblock the Device Manager [Vinit from IT team helped me,

--

--

Think Different - Dhiraj Patra

I am a Software architect for AI, ML, IoT microservices cloud applications. Love to learn and share. https://dhirajpatra.github.io