24 Video Views·Oct 20, 2022
Get your free proof of concept for TuxCare: https://www.tuxcare.com
Most of you probably know that you can only run macOS on hardware that Apple sells, at least if you're not willing to go the hackintosh route, which can be painful and complex. Still, some of us might want, or need to test stuff out on Apple's operating system, fortunately, there is now a simple solution to do just that, with just one command line.
Become a channel member to get access to a weekly patroncast and vote on the next topics I'll cover:
https://www.youtube.com/channel/UC5UAwBUum7CPN5buc-_N1Fw/join
Support the channel on Patreon:
https://www.patreon.com/thelinuxexperiment
Follow me on Twitter : http://twitter.com/thelinuxEXP
My Gaming on Linux Channel: https://www.youtube.com/channel/UCaw_Lz7oifDb-PZCAcZ07kw
Follow me on ODYSEE: https://odysee.com/@TheLinuxExperiment:e
Or join ODYSEE: https://odysee.com/$/invite/@TheLinuxExperiment:e
The Linux Experiment merch: get your goodies there! https://teespring.com/en-GB/stores/the-linux-experiment
Link to SOSUMI: https://snapcraft.io/install/sosumi/ubuntu
How to install snap: https://snapcraft.io/docs/installing-snapd
Mac OS Simple KVM: https://github.com/foxlet/macOS-Simple-KVM
Sosumi is a SNAP package that lets you install a Qemu virtual machine running Mac OS Catalina. It's nothing you couldn't do on your own with a bit more time, but this snap package has the advantage of being just one command line away, and taking care of all the setup for you.
Now be warned that Apple's End User Licence Agreement doesn't allow to run Mac OS in a VM on hardware that isn't made by Apple, so do this at your own risk!
As always with virtual machines, you need to ensure that your CPU supports virtualization in the BIOS.
Once you're all set, you just open a terminal window, and run this command:
sudo snap install sosumi
Let the installation run its course, and you should get a menu entry called, you guessed it, SOSUMI.
Run that to initialize the VM. You should get a terminal window which shows you the download progress for the system image that will let you install macOS.
Click inside the window to focus is, and then press enter to start the installer.
After a while, you should end up in the installer window for Mac OS.
To begin with, you'll have to format the virtual disk that the VM has created for you. Double click on "disk utility", and select the disk called "Apple Inc. VirtIO Block media", with a size of 68Gb.
Then, click on "Erase", and select the format you'd prefer using, I used APFS, as that's the most recent Apple Filesystem, but it will work fine if you use Mac OS Extended.
Click the "Erase" button.
The operation should be pretty fast, and you can then close the disk utility window, and start the installer by double clicking on "Reinstall macOS".
Once the installation is complete, your VM will reboot and let you complete the first-run setup. You'll end up in Clover again.
One last reboot, and you'll be able to select the "Boot mac OS frm Mac HD" option in Clover, the last option on the right.
Once the boot process is complete, you'll have to sift through a few settings screen, and log in using an Apple ID, or create one if you don't already have one.
Close the VM by shutting it down, and open your file manager. Snaps create a folder in your /home directory, to store everything, so head over there, and go to Sosumi, then Common.
Here, you'll find a file called "launch".
First, make a copy, in case something goes wrong, so you can restore the previous version, open the file with your text editor of choice.
In this file, you'll see all the parameters for the Qemu virtual machine.
-m defines the memory usage of the VM, in gigabytes. By default, it's 2, but as I have 32Gb on my device, I'll put 16 in there.
Now, for the window resolution, it's a bit more involved.
Type diskutil list
Grab the identifier for the disk that reads EFI, it should be the same as mine, disk2s1.
Then type
sudo diskutil mount disk2s1
or replace disk2s1 by the correct identifier for your EFI disk.
Now open the Finder, and go to the EFI disk in the sidebar. Open the CLOVER folder, and ediut the config.plist file, using textedit.
Here, you'll find a line that reads screenresolution. Change the default of 1280x720 by what you want to use, in my case, 1920x1080. Save the file.
Now, shut down the VM, and restart it.
Right when you see the terminal window open, hit "escape". You'll see an interface that looks like a BIOS. Select device manager, OVMF Platform Configuration and then "change preferred".
Press the F10 key to save, and then escape until you get back to the main menu, where you'll then select "Continue".
You can also change the CPU core count affected to the VM. By default, you'll get 4 threads for 2 cores, listed in the line "-smp 4,cores=2".
You can change that by putting another number.
Warning this video will talk about running an OS made by Apple using the packaging format known as snap
If you get angry when you see this or when you hear about closed backends
Or even when you hear this sound and this video probably won't work for you
Hey everyone, most of you probably know that running Mac OS is the easiest on a Mac
Obviously you can't go the Hackintosh route
But you're pretty much gonna have to tailor your computer build specifically for Mac OS and it can be a painful road to follow
Fortunately, there is a tool called Sosumi and that will let you run Mac OS in a VM on your Linux desktop in just one
Simple command line. So let's take a look at how it works right after this
This video is sponsored by Tuxcare and if that sounds familiar, it's because Tuxcare is the new brand
Regrouping kernel care and their extended lifecycle support services
So with Tuxcare, you now get three main services. The first one is live patching
So your Linux kernel, your libraries, your databases, your virtualizations, your IoT devices can all receive
Automated security patches that don't need downtime to be applied. They are all patched live
Now the second services is providing an extension to the lifecycle of the Linux kernel
Which means that you can use a specific version of the kernel for longer and still be up-to-date in terms of security
even on an end-of-life distro and third they also offer support services which are reasonably priced and
Flexible because they are vendor independent. As a whole Tuxcare is now an integrated brand of services to automate and improve your Linux
Operations so you get more flexibility in choosing the distro
You want to run on your servers, when to upgrade it and you can reduce your maintenance cost without sacrificing security
I left a link in the description below so you can check all the Tuxcare services and get a free proof-of-concept for your organization
So what is Sosumi? Sosumi is a snap package that lets you install a QMU virtual machine running Mac OS Catalina
It's nothing you couldn't do on your own with a bit more time
But this snap package has the advantage of being just one command line away and taking care of all the setup for you
It's been created by the dearly departed Alan Pope. No, no. No, he's not gone like that
He just left Canonical and Ubuntu. That's it
It's based on work done by Foxlet with Mac OS simple KVM which does the exact same thing
But lets you do it all yourself when the snap package just compiles everything
This package will basically provide everything you need to run a QMU VM
Download a system image of Mac OS and boot right into it where you'll be able to install it and use it
It has a few default configs for RAM usage and display resolution
But we'll be able to adjust that after we install
Now be warned the end user license agreement that you agree to when you install Mac OS
Stipulates that you're not supposed to do that and run Mac OS in a VM
So do this at your own risk. So how to install and run Sosumi?
So the first thing is as always with virtual machines you need to ensure that your CPU supports virtualization in the BIOS
Depending on your CPU vendor and your motherboard. The option is generally called VTX
AMD V or SVM
Enable that in the BIOS before following these steps
Now the second prerequisite is that your distro has snap installed if you're on Ubuntu, Manjaro or Solus
It shouldn't be an issue. But if you're running something else, there's a handy guide
I'll leave a link in the description below to install snap on your machine should work pretty much everywhere except maybe Linux Mint
They really really don't like snap. Now last warning. It's a virtual machine
It's going to install a system inside of your Linux system
So it's gonna take up a bit of hard disk. Make sure that you have enough hard disk available around 40 gigabytes should be enough
Okay, so once you're all set you just open a terminal window and you run this command
sudo snap install sosumi
Now let the installation run its course and you should get a menu entry called you guessed it sosumi
Run that to initialize the VM
You should see a terminal window which shows you the download progress for the system image that will let you install Mac OS
Do not close that window while sosumi runs because it will shut down the VM as well
Generally each time you open sosumi, you'll get a window a terminal window in the background
Don't close it. If you do it closes the VM
You can just minimize it if you don't want to see it
Once the installation is complete you'll be put into Clover
Which is basically a prettier equivalent to grub to let you select what OS to boot on Macs or Hackintoshes
Click inside the window to focus it and then press enter to start the installer
Now you'll notice that the VM window will grab your mouse pointer that will prevent you from using it to interact with other windows on
Your Linux desktop to release the mouse pointer
You can press ctrl alt and G at all times and your mouse pointer will be free again
After a while, you should end up in the installer window for Mac OS
To begin with you'll have to format the virtual hard disk that the VM has created for you
Don't worry. It won't touch your real hard drive or its partitions. It's a virtual hard drive
Double-click on disk utility and select the disk called Apple Inc virtio block media with a size of 68 gigabytes
Then click on erase and type the name you want for your disk
You can select the format you'd prefer using I used APFS as that's the most recent Apple file system
But it will work fine
If you use Mac OS extended click the erase button
The operation should be pretty fast and then you can close the disk utility window and start the installer by double-clicking on reinstall Mac OS
Just follow the instructions on screen and select your newly formatted virtual hard drive
Then click install the process will run its course. It can take about 20 minutes or more depending on your hard drive
So go get a coffee if you're that kind of person or a cup of tea if you're an enlightened human being and wait for it
To complete once the installation itself is complete your virtual machine will reboot and let you complete the first run setup
You'll end up in Clover again
Use the arrow keys to navigate to the option called boot Mac OS install from Mac HD
Where a Mac HD is the name that you gave to your virtual hard drive you formatted previously
You'll see a boot screen in verbose mode
Which is a fancy way to say that you'll see lines of white text on black background and the installation will now resume for another
20 minutes or so. So it's time for a second cup of tea coffee or a beer
One last reboot and you'll be able to select the boot Mac OS from Mac HD option in Clover
It's the last option on the right basically
once the boot process is complete
You'll have to sift through a few settings screen and log in using an Apple ID or create one if you don't already have one
And after that you are in and you will be able to use your system just like any other normal Mac
You're in Mac OS Catalina. You can use the default apps. You can use the App Store to install stuff
You can open the browser basically anything audio
Internet everything works
Now you will notice that things are pretty slow and that's because the VM only uses two gigabytes of RAM by default
From your host system to power the virtual machine
The resolution is also fixed at 1280 by 720 which is a bit small for my use case
Probably is going to be a bit small for you, too
But don't worry we can change all of that
So first you're gonna close the virtual machine by shutting it down or just closing the window and you can open your file manager in
your Linux system
Snaps unfortunately create a folder in your slash home directory to store everything
So you head over there and go to the Sosumi folder then common here. You will find a file called launch
That's the file we want to edit to change the parameters of the VM
So first you're gonna want to make a copy in case something goes wrong so you can restore the previous version
Next you will open the file with your text editor of choice
Now in this file, you'll see every single parameter that is used to launch the QMU virtual machine
I won't explain all of those in detail because there are plenty of guides online if you want to deep dive into QMU
Basically the line that interests us for the RAM is preceded by dash M
Dash M defines the memory usage of the VM in gigabytes by default
It's 2 but as I have 32 gigabytes on my device
I'll put 16 in there now try not to put too much in there because your Linux host still needs RAM to work correctly
so
Generally don't use more than half of what you're using unless you're only planning to use the VM exclusively
But don't give it all the available RAM that your base system has now
Once you change that value
You can just save the file and restart Sosumi and it will automatically
Update and use the right amount of RAM that you specified now for the window resolution
It's a little bit more involved, but it's still pretty simple
Basically, we're gonna tell the VM and its bootloader that we need another resolution than the one it provides
And then we're gonna tell it to use that
So inside of your Mac OS VM open the terminal in the other folder of the applications directory
Then type diskutil list. This will let you see all the disks that are present on your VM
Grab the identifier for the disk that reads EFI
It should be the same as mine disk 2 S 1 disk 2 for the number of disks and S 1 for the partition inside
of that disk
Then type sudo diskutil mount
Disk 2 S 1 or replace disk 2 S 1 by the correct identifier for your EFI disk
This command will mount the EFI disk as a normal accessible disk
You can now open the finder and open it from the sidebar
There you'll see a Clover folder and you can edit the config.plist file using the text edit app
Which is the basic text editor for Mac OS
Scroll a little bit and you'll find a line that reads screen resolution
Change the default of 1280 by 720 by what you want to use. In my case
I put 1920 by 1080. Save the file
And now you can just shut down the VM and restart it. Right when you see the terminal window open hit escape
You'll see an interface that kind of looks like a BIOS. Select device manager then
OVMF platform configuration and then change preferred
You'll get a nice drop-down list of resolutions and select the one you want to use in that
Then you press the F10 key to save just like in a BIOS and then escape until you get back to the main menu
Well, you'll then select continue and now your VM should boot using the right resolution
And that's it for screen resolution and for RAM. That was pretty easy to set up, wasn't it?
Now you can also change the CPU core count affected to the VM. By default
You'll get four threads for two cores listed in the line dash SMP four comma cores equal two
You can change that by putting another number
I tried putting six threads and three cores, but the VM wouldn't start
But it did work with eight threads and four cores, which should give it a nice speed boost
You can also see that the CPU type changes in the about this Mac window in the virtual machine
It's now showing that I have two quad core Xeons
And now you should have a pretty nice
Simple QMU virtual machine to run Mac OS and do everything that you want to do inside of that
Basically, it's a QMU machine
so there is nothing stopping you from experimenting with GPU passthrough or even running the virtual machine on another computer and
Remote logging in into it using VNC or Spice. It's it's a QMU VM if you want to deep dive into that
There are a lot of other options that you could tweak configure or another bunch of use case that you could apply to yourself
But that's out of the scope of this video
I just wanted to tell you about this tool that lets you install with one command line and a few configurations afterwards
Which are only needed if the defaults don't work for you
now, of course graphical acceleration will be limited as it's in a VM and so games won't work, but who games on the Mac and
Graphical intensive applications like Final Cut Pro or video editing programs will probably not work correctly either
So that's it for this video guys
I hope you enjoyed if you did don't stay to like or dislike if you didn't you can also subscribe and turn on
Notifications to get more videos like this one
You can also join my amazing patron subscribers and YouTube members and get access to a weekly patron cast and the right to vote on
The next topics I'll cover but thank you guys for watching and I'll see you in the next one. Bye