{"id":23868,"date":"2021-06-30T16:11:22","date_gmt":"2021-06-30T23:11:22","guid":{"rendered":"https:\/\/www.podfeet.com\/blog\/?p=23868"},"modified":"2021-07-03T17:02:27","modified_gmt":"2021-07-04T00:02:27","slug":"windows-m1-utm","status":"publish","type":"post","link":"https:\/\/www.podfeet.com\/blog\/2021\/06\/windows-m1-utm\/","title":{"rendered":"(Trying to) Run Windows 10 on M1 Mac with a UTM Virtual Machine"},"content":{"rendered":"<p>I talked on the show a while back about how the one downside to an M1 Mac is that you can\u2019t run Windows, or at least not without a lot of faffing about. I was actually surprised that in Knightwise&#8217;s recording about how much value he&#8217;s getting from his M1 MacBook Air, he never mentioned that as a downside.  Knightwise&#8217;s mantra is &#8220;making technology work for you&#8221; and the center of that is being a slider who can use the best tool for the job, rather than being fanatically attached to one company&#8217;s technology (like some people we know).  He has touted the Mac as the best platform because he can run macOS, Linux, and Windows all on one piece of hardware.<\/p>\n<p>When I asked him about this limitation of the M1 he said he didn&#8217;t see it as an issue (not sure why) but that he hadn&#8217;t yet looked into whether the open source virtual machine software VirtualBox would run on the M1, at least to run a Linux distribution (or distro as the cool kids say.)<\/p>\n<p>I did a bit of poking around looking into what virtual machine software runs on the M1s and discovered that VirtualBox from Oracle and the commercial software VMware Fusion do not, but Parallels Desktop does.  And then I discovered an open source virtual machine app I hadn\u2019t heard of called UTM which runs on M1 and even on iOS.  Sadly, it requires you to jailbreak your iOS device so I declined that opportunity but running this on macOS Big Sur sounded like good fun.<\/p>\n<p><a href=\"https:\/\/github.com\/utmapp\">UTM project on GitHub: <\/a><\/p>\n<p><a href=\"https:\/\/getutm.app\">UTM Website for macOS and iOS<\/a><\/p>\n<p>Under the hood of UTM is QEMU, a decades-old, free and open source emulation software that is widely used and actively maintained. The value that UTM brings to QEMU is that it&#8217;s a graphical user interface not requiring a plethora of command line options and flags, so the learning curve is much more gentle.<\/p>\n<p>I found <a href=\"https:\/\/eshop.macsales.com\/blog\/72081-utm-virtual-machine-on-m1-mac\/\" target=\"_blank\" rel=\"noopener\">an article by Steve Sande on the OWC blog<\/a> where he walks through the steps to configure UTM on an M1 Mac, and install Windows on ARM for free, legitimately. As I mentioned before, Windows on ARM isn\u2019t really supported to do this, and even if I succeed, apps would have to be compiled for 64-bit ARM to run on it. This makes this a fun experiment, possibly a colossal waste of time, and when I&#8217;m done I&#8217;ll have something I don&#8217;t need. Of course, that\u2019s all the motivation I needed to proceed.<\/p>\n<h2>Let&#8217;s Do This!<\/h2>\n<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Gallery-of-OS-Virtuall-Machines.png\" alt=\"UTM Gallery of OS Virtual Machines\" title=\"#title#\" width=\"428 \" height=\"600\"><figcaption style=\"text-align:center\">UTM Gallery of OS Virtual Machines<\/figcaption><\/figure>\n<p>I\u2019m not going to go through the installation in detail, because Steve Sande does a fabulous job of it. He tells you what to download, how to configure it, and which buttons to push to make it go, all with screenshots to make sure it&#8217;s clear what he&#8217;s telling you to do. I will, however, go through an overview of how this works though so you have context for my discovery in going through his steps.<\/p>\n<p>Virtual machine software works by creating an image that is the virtual machine. You need two things to make an image work properly: an operating system and what are called Guest Tools tailored to your hardware. Without the Guest Tools, your mouse and keyboard may not work, your WiFi won\u2019t be recognized, perhaps sounds won\u2019t come out of your speakers, and more.<\/p>\n<p>To run Windows 10 for ARM64, it turns out Microsoft allows you a free download if you sign up for a free membership in the Windows Insider Program.  Those are the words I wanted to hear so I signed up.  The file you download has an extension of VHDX, which stands for Hyper V virtual hard disk.<\/p>\n<p><a href=\"https:\/\/www.microsoft.com\/en-us\/software-download\/windowsinsiderpreviewARM64\">Windows Insider Program ARM64 Preview Download<\/a><\/p>\n<p>The UTM virtualization software points you to a gallery of operating system virtual machines you can download, which are mostly different distributions of Linux (which may be even more fun than running Windows).  You will see the ARM64 version of Windows 10, but if you\u2019re on an Intel-based Mac you can only run Windows 7 or Windows XP.  Kinda weird that you can\u2019t get Windows 10 on Intel but maybe Microsoft doesn\u2019t let you have that one for free because it\u2019s actually useful!<\/p>\n<p>Steve\u2019s instructions walk you through how to configure a virtual machine, including setting the architecture to ARM64, choosing how much RAM to allocate, how to create the virtual disks for the operating system, and the Guest Tools, which for UTM are called Spice Guest Tools to make it work with your hardware.<\/p>\n<h2>And it Went Horribly Wrong<\/h2>\n<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Windows-Fails-to-Boot.jpg\" alt=\"Windows Fails to Boot\" title=\"#title#\" width=\"450 \" height=\"367\"><figcaption style=\"text-align:center\">Windows Fails to Boot<\/figcaption><\/figure>\n<p>When Steve explains how to add drives, he shows how to point to the Windows 10 OS that you\u2019ve already downloaded from Microsoft. Then he explains how to create a virtual CD\/DVD Drive and point it to the Spice Guest Tools.  As soon as I pointed to the Spice Guest Tools, UTM crashed.<\/p>\n<p>When I opened UTM back up, my image for Windows hadn\u2019t been preserved. No worries, it\u2019s just a few steps.  As soon as I tried to point it at the Windows VHDX file, I got an error saying that it couldn\u2019t be copied to images because an item with that name already exists. I was faced with some temporary file not having gotten flushed when it crashed, but where on earth would I find this temp file?<\/p>\n<p>Luckily, UTM is an open source project on GitHub, and under the Issues tab, I found Morac2 describing the same issue. Even luckier, Morac2 figured out where this temporary file was so I could delete it and try again.<\/p>\n<p><a href=\"https:\/\/github.com\/utmapp\/UTM\/issues\/2576\">Github issue 2576<\/a> &#8211; Spoiler, the file is in $TMPDIR\/com.utmapp.UTM\/Images<\/p>\n<p>On my second time through the image creation instructions from Steve, I was able to save without a crash.  However, when I tried to point at the Spice Guest Tools on the virtual removable drive, I got another error saying it couldn\u2019t restore removable drives.<\/p>\n<p>Ok, back to the Googles and I found someone with the same problem and they were advised to clear the Spice Guest Tools from the CD\/DVD and try booting to Windows without it. Presumably, that would get a clean boot into Windows and then we could back out and try the Spice Guest Tools again.<\/p>\n<p>Sadly, after getting stuck at the boot loader for ages and ages, I got a Microsoft stop code of <code>INACCESSIBLE BOOT DEVICE<\/code> and that it was going to restart. Which just happened over and over again. I believe, based on the baby blue background, that I was experiencing a blue screen of death.<\/p>\n<p>As much fun as this was, I decided it was time to abandon <em>that<\/em> whole path and see if I could get something normal like Ubuntu to install.<\/p>\n<h2>Ubuntu 20.04<\/h2>\n<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Ubuntu-VM.png\" alt=\"Ubuntu VM Configured\" title=\"#title#\" width=\"500 \" height=\"408\"><figcaption style=\"text-align:center\">Ubuntu VM Configured<\/figcaption><\/figure>\n<p>From the UTM gallery, <a href=\"https:\/\/mac.getutm.app\/gallery\/ubuntu-20-04\" target=\"_blank\" rel=\"noopener\">I downloaded the Ubuntu 20.04 image<\/a>, but it directed me to download Ubuntu server. I didn\u2019t want Ubuntu server, so I hunted down the Ubuntu desktop operating system for ARM on my own. Not hard but it was another step.  The step-by-step instructions on the UTM website were super easy to follow.  And yet, I was unable to boot into Ubuntu.<\/p>\n<p>I went back to the beginning of the instructions on the UTM website and realized that to use UTM with Ubuntu, you install the server first and then install the desktop version from there. Convoluted much?<\/p>\n<p>I created the VM again, and as soon as I tried to point to the OS installer, it said I didn\u2019t have permissions to \u201cImages\u201d.  Well, that makes no sense, you let me access them a minute ago, how could permissions have changed like that? Let\u2019s just turn it off and on again.  I quit UTM and reopened and then it let me point at the Ubuntu Server ISO file. Yay.<\/p>\n<p>Now I&#8217;ve got my Ubuntu VM configured exactly per the instructions, even including changing the icon to look like Ubuntu. And when I hit the big play button \u2026 it fails to load and gets stuck at the UEFI Interactive Shell.  The only thing on this entire page I recognize is the acronym EFI, which is what firmware on a Mac is called.<\/p>\n<figure style=\"float: left; margin-right: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-EFI-Stuck.png\" alt=\"Ubuntu UEFI Interactive Shell\" title=\"#title#\" width=\"400 \" height=\"222\"><figcaption style=\"text-align:center\">Ubuntu UEFI Interactive Shell<\/figcaption><\/figure>\n<p>At this point, someone with less fortitude (or more common sense) would have given up, but not me. Off to the Googles yet again and I find this issue on the UTM app\u2019s GitHub pages as well. The interesting thing is that one of the developers tests a fix, closes the issue and then shortly after that reopens the issue because the failure didn\u2019t go away.  Luckily, he posted a fix in the troubleshooting section of the Ubuntu installer page for UTM.<\/p>\n<p><a href=\"https:\/\/github.com\/utmapp\/UTM\/issues\/2333#issuecomment-786307182\">GitHub Issue 2333<\/a><\/p>\n<p>Workaround: <a href=\"https:\/\/mac.getutm.app\/gallery\/ubuntu-20-04#troubleshooting\">mac.getutm.app\/gallery\/ubuntu-20-04#troubleshooting<\/a><\/p>\n<p>You\u2019re going to love the answer. All I had to do is verify that I saw  <code>FS0: Alias(s):CD0h0a0a::BLK1:<\/code>  at the top of the UEFI Interactive Shell window, then type in <code>fs0:\\efi\\boot\\bootaa64.efi<\/code> and then I should see GRUB and be able to select Ubuntu Server.  You know that\u2019s what I was <em>thinking<\/em> of typing, just good to verify, right?<\/p>\n<p>I typed in that bunch of glop I don\u2019t understand and the shell came back with the response <code>Command Error Status: Unsupported<\/code>. I\u2019m not joking.<\/p>\n<p>My only move after that was to make a comment on the GitHub issue on the topic and move along.<\/p>\n<h2>How about ArchLinux for ARM?<\/h2>\n<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-ArchLinux-Stuck.jpg\" alt=\"UTM ArchLinux Stuck\" title=\"#title#\" width=\"500 \" height=\"425\"><figcaption style=\"text-align:center\">ArchLinux Got Stuck<\/figcaption><\/figure>\n<p>I just could not let this go without getting ONE operating system to work as a VM with UTM. I looked at all of the other options and chose ArchLinux ARM, mostly because I\u2019d never heard of it. Unlike Ubuntu where it gave the an ISO image of the OS, ArchLinux gave me a .utm file which is a fully-configured virtual machine, so I double clicked it. It opened inside UTM and I didn&#8217;t have to do any setup at all.<\/p>\n<p>UTM for ArchLinux for ARM: <a href=\"https:\/\/mac.getutm.app\/gallery\/archlinux-arm\">https:\/\/mac.getutm.app\/gallery\/archlinux-arm<\/a><\/p>\n<p>I clicked the play button and it typed a <em>lot<\/em> of unixy-looking glop on screen for me, pausing for dramatic effect from time time time and then starting to change again. And then it stopped changing for a really long time.  I hit the enter key just for grins and giggles.<\/p>\n<p>It responded with <code>alarm login:<\/code>.  Well, on the download page it says the username and login are root and root so what the heck, I\u2019ll try that.<\/p>\n<p>It spat a bunch more glop on screen including a whole bunch of process ids, none of which made any sense to me, and ended with a simple command line prompt that says <code>[root@alarm ~]#<\/code>.  And again, I\u2019m stuck.  Remember how this UTM software was supposed to hide the command line work that I would have had to do in QEMU?  Yeah, not so much.<\/p>\n<h2>Debian ARM (Xfce)<\/h2>\n<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Debian-Success.jpg\" alt=\"Debian successfully launched showign podfeet.com in Firefox\" title=\"#title#\" width=\"500 \" height=\"296\"><figcaption style=\"text-align:center\">Debian Success!<\/figcaption><\/figure>\n<p>I was determined that I was not going to let this virtual machine software defeat me.  I kept plowing ahead and moved on to try Debian ARM (Xfce). Evidently this Xfce version of Debian is intended to be a lightweight desktop environment, which sounded fun.  Debian also downloaded as a fully-configured UTM file and with a double click I was off to the races.<\/p>\n<p>You\u2019re not going to believe this, but it <em>worked<\/em>.  I was as shocked as you are. It simply booted up and I was in Linux!  The screen resolution was super low so I found in settings how to change the display and it looked grand. I opened up Firefox and navigated to podfeet.com (as one does) and it looked dandy.<\/p>\n<p>But then when I went to move the window around, the screen tearing was simply awful.  I thought maybe it was because the default installation was set to only 2GB of RAM, so I changed it to 8GB but that had no effect.  Then I realized there isn\u2019t a guest tools installer for this distribution. I did a short hunt for them online, but I have to admit that after spending about 3 hours on this little project, it wasn\u2019t my best effort. I never did find the guest tools but I declared victory and ended my little project.<\/p>\n<h2>And Yet\u2026<\/h2>\n<figure style=\"float: right; margin-left: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Windows-Success.jpg\" alt=\"Windows Successfully Running on M1 Using UTM\" title=\"#title#\" width=\"500 \" height=\"\"><figcaption style=\"text-align:center\">Windows Successfully Running on M1 Using UTM<\/figcaption><\/figure>\n<p>And yet there was still a little niggle in my brain that said the instructions from Steve Sande <em>should<\/em> have worked to install Windows on Arm. Earlier in some of my googling I\u2019d run across <a href=\"https:\/\/youtu.be\/oKoB35JPLVA\" target=\"_blank\" rel=\"noopener\">a video about installing Windows on the M1 using UTM by someone who goes by the name Mr. Macintosh<\/a> and I decided to watch his video to see if there was something I missed.<\/p>\n<p>About 3.5 minutes in he hit the spot where I realized my mistake. In Steve Sande\u2019s instructions, he <em>clearly<\/em> said that when adding the drive in the virtual machine for Windows that you had to choose NVMe as the interface. I\u2019m 100% certain I did that the very first time, but I\u2019m relatively certain I didn\u2019t remember to set that in any of my subsequent attempts. I\u2019m pretty sure I left it at the default of VirtlO, whatever the heck that is.<\/p>\n<p>I had to try just one more time.  And guess what? It WORKED!  I had to answer a whole bunch of annoying Windows questions like three security questions that I bet 100% of you could answer with about a minute of googling, but then I was in.  (And no, of course, I didn&#8217;t tell the truth on the security questions.) Once I had Windows 10 up in UTM, and I got a screenshot so I could prove it worked, it was time to get it working even better. The first improvement I wanted to make was to raise the screen resolution as it defaulted to 640&#215;480.  Mr. Macintosh gave instructions on how to interrupt the boot-up of the VM and get to the Device Manager to change the preferred resolution all the way up to a maximum of 1024&#215;768.<\/p>\n<p>I did that, rebooted\u2026and Windows failed to launch. It gave me a blue screen of death with the beloved <code>Stop code: 0xc00002e3<\/code> which evidently means \u201csomething has gone horribly wrong.\u201d  I tried booting into the Device Manager and undoing the crime of setting my screen resolution higher than a postage stamp but Windows was clearly mad at me and refused to boot. I started from scratch. Again.<\/p>\n<p>After the new VM was created, it booted just fine, albeit at 640&#215;480 but I left that well enough alone.  The VM wasn&#8217;t recognizing my wired or wireless Ethernet cards, so I decided to try to get that sorted. A VM without networking isn&#8217;t much fun. I shut down Windows, closed the VM, and went into settings and found a Network tab in UTM where I could choose my real network card.  Great!  When I restarted Windows it blue screened again.<\/p>\n<p>Through repeated experiments, I determined that Windows 10 is one-time use if running in UTM on an M1 Mac mini. I circled back with Steve Sande and he dusted off his Windows 10 installation in UTM from last March when he wrote the article, and he confirmed that he now gets a blue screen of death as well.<br \/>\nI opened an issue on GitHub and he added his configuration and information to my issue. It would have been nice if Steve had said, &#8220;You dummy, you forgot to&#8230;&#8221; But getting confirmation that something is broken is the second-best thing.<\/p>\n<p><a href=\"https:\/\/github.com\/utmapp\/UTM\/issues\/2646\">GitHub issue 2646<\/a><\/p>\n<h2>One More Thing<\/h2>\n<p>I was finishing up this article after finally calling it quits when Steve Sande mentioned that he did get Ubuntu working with UTM. You know what I had to do, right? I simply had to try again. I&#8217;ll not take you through all of it but after a few fits and starts that took maybe only another couple of hours, I actually got it working too. In fact, I did the write-up here about Ubuntu from inside the Ubuntu 20 virtual machine on UTM.<\/p>\n<figure style=\"float: center; margin: 10px\"><img decoding=\"async\" src=\"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Podfeet-on-Ubuntu-1024x814.jpg\" alt=\"UTM Podfeet on Ubuntu\" title=\"#title#\" width=\"600 \" height=\"\"><figcaption style=\"text-align:center\">Podfeet on Ubuntu 20 in UTM Virtual Machine<\/figcaption><\/figure>\n<p>I&#8217;m pretty chuffed that I got it working, and it&#8217;s better than anything else I tried, but it does have the same screen tearing problem that I had with Debian. Networking is working, and I can play audio through it, and I can even copy and paste between macOS and Linux. I haven&#8217;t figured out how to install apps yet, but as soon as I do, I&#8217;ll be installing 1Password now that it&#8217;s available for Linux.  I don&#8217;t <em>need<\/em> Linux but it sure is fun to be able to play with it.<\/p>\n<h2>Bottom Line<\/h2>\n<p>I couldn\u2019t get Windows to run in a VM which was my original goal, but at least I finally got a workable Linux VM to run. I think I should put a pin in this by taking you back to one of the first things I said: \u201cThis makes this a fun experiment, possibly a colossal waste of time, and when I&#8217;m done I&#8217;ll have something I didn&#8217;t need.\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I talked on the show a while back about how the one downside to an M1 Mac is that you can\u2019t run Windows, or at least not without a lot of faffing about. I was actually surprised that in Knightwise&#8217;s recording about how much value he&#8217;s getting from his M1 MacBook Air, he never mentioned [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":23884,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[147],"tags":[4638,201,2041,2662,4639,2663,13,434],"class_list":["post-23868","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-posts","tag-debian","tag-linux","tag-ubuntu","tag-virtual-machine","tag-virtualization","tag-vm","tag-windows","tag-windows-10"],"jetpack_featured_media_url":"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2021\/06\/UTM-Logo.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/23868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/comments?post=23868"}],"version-history":[{"count":5,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/23868\/revisions"}],"predecessor-version":[{"id":23886,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/23868\/revisions\/23886"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media\/23884"}],"wp:attachment":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media?parent=23868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/categories?post=23868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/tags?post=23868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}