Install MacOS virtual machine on Ubuntu

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome in this video  we're going to see how to install   a macos virtual machine on a linux computer   let's start by opening the project's github page  i'll add a link to the description below and from   here we're going to choose the green button which  is code and download zip and let's save the file it was downloaded to the downloads folder and  we can see it here next thing is opening a   terminal so let's open a terminal and let's  change directory to the downloads folder and when listing the files you can see  macos simple kvm master which is the file   we just downloaded let's extract the zip  archive i'm going to choose extract here   and it created a new folder so let's  move into this new folder in the terminal   and let's list the files again one of the  file is readme so let's open this readme file okay getting started so it tells us that we need a  linux machine and we'll need qEmu python3 and pip   luckily it's telling us how to install these  requirements for different distributions of linux   and since i'm using ubuntu  i'll choose the first one   but before running it i'm going to update  my system to make sure that i'm up to date great and now let's copy the line  from the instructions and run it okay i already have everything in its newest  version so i didn't have to download anything new   but in your case it might take a while anyway  once it's done we can move on to step one   so we need to run jumpstart.sh to download the  installation media for mac os and it's actually   going to access the apple servers and download  the operating system for us so let's run the file okay and it's downloading the  operating system from apple servers great it's done and it's telling us that we now  have a file called basesystem.img let's ls again   and we can see it here baysystem.img  let's move on to step two create an empty hard disk using qemu-img   so let's do that and we can change the name  of the disk the default is mydisk.qcow2 and   64 gigabytes is a bit too much for me  so i'm going to go with 35 gigabytes let's take a look at the files now and here is  BaseSystem.img and here is the disk mydisk.qcow2   we now need to add the information about  this new virtual disk to the basic.sh file   so let's open the file basic.sh and  let's copy these two lines and paste them okay we now need to run basic.sh so  let's do that we can close it from here and it's starting the virtual machine notice that once i click inside  the box of the virtual machine   i cannot control the mouse anymore it's  like lost inside the virtual machine   to release it we need to click ctrl alt g which is  written at the title of the virtual machine window   so ctrl alt and i regain control of my mouse  anyway back in the virtual machine i need to   press enter to boot mac os from the mac  os based system so let's do that enter and let's take another look  at the instructions file   we're told that we need to run the  disk utility first so let's do that i'm going to run disk utility as i was told on the left hand side we can see a list of  virtual disks and there are three disks here   one is mac os base system and its size is about  two gigabytes the one above it is qemu hard disk   media and it's about 260 megabytes and the  first one is uninitialized and its size is   about the size that we allocated if you remember  i allocated 35 gigabytes and here i see about 37.   anyway that's the one that we want to initialize  as it's currently not initialized and that's   where macos will reside so let's initialize  this virtual hard drive by clicking on erase   let's give it a name i'm just  going to call it main disk as for the format i'm going to choose  apfs which is short for apple file system   and that's the modern and recommended file system  for macos machines now let's click on erase and it's done and now in the list we can see main  disk which is the one we just initialized and we   can see that it's an apfs volume and the name is  the name we gave it let's close the disk utility and now i'm going to choose reinstall macos let's select our main disk and install macos is now being installed on the  virtual hard disk it's going to take   a while so i'll be back when it's done okay  we're back the installation is almost done let's select our location i'm going to go with  usa even though i'm not really from the usa   we can transfer information i'm not going  to transfer anything we can sign in with an   apple id not going to do that enter your  name your account name and your password and let's go with the express setup we need to help the system to identify  our keyboard layout so let's click on   continue and now we need to press on the key  immediately to the right of the shift key on   the left side of the keyboard so let's  do that and let's confirm its conclusion   and we have mac os up and running one thing that  might bother you is the low resolution because   right now it's not using the entire screen  so let's see how we can fix it so it will   use the entire screen but first i'm going  to ask it to ignore these updates for now okay let's release the mouse with ctrl alt g again  and let's get back to the installation folder   there is a folder here  called docs let's get into it   and one of the files here is guide  screen resolution let's open it first we need to open finder and look for efi currently we don't see efi on  the list so we'll have to add it so here are the instructions  to mount the folder of the efi   we need to open the terminal  and type disk util list there are two entries called efi one is in  the main disk the big one the one we allocated   ourselves and the second one is in the small disk  the one that was created automatically the one we   are interested in is the one in the small disk so  inside disk one let's get back to the instructions and we need to run sudo disk util mount and then  the name of the disk so let's try and do that   sorry my mistake i need to use  the name over here the identifier   so let's try again and use the identifier so the identifier of the disk is disk1s1 and it was mounted and now  when we get back to the finder   we can see it on the list let's  get back to the instructions and we should have a folder inside it called  clover and inside it the file called config.plist   let's look for it and here is config.plist let's  edit the file i'm going to use textedit for that and here we can see the resolution it's currently   using so i'm going to change it  to the resolution of my screen and let's save the file and exit we now need to shut down the vm then  relaunch it using the basic.sh script   and then we need to do the following press escape   as soon as the window comes up and in the  interface that comes up select device manager   ovmf platform configuration change preferred and  select the correct resolution so let's do that let's get back to the terminal  let's run basic.sh again   and as soon as the machine will boot up  i'm going to quickly press the escape key okay we got to the menu and here i'm going to choose  device manager and ovmf platform   configuration and let's change the resolution let's save it by pressing f10 now let's exit we now need to choose the media to  boot up from and i'm going to choose   main disk because that's where mac os is installed and it's now using high  definition resolution let's login let's switch to full screen let's  release the mouse again using ctrl   alt g and under view we can see that the shortcut  for full screen is ctrl alt f so let's try it and it's now using the entire screen i want to  show one last thing let's exit full screen by   pressing ctrl alt f again then ctrl l g to release  the mouse and let's take another look at basic.sh from here we can change the amount of ram we  allocate to the virtual machine and how many   processor cores we allocate as can be seen the  default is 2 gigabyte of ram and 2 physical cores   let's increase it so our virtual machine will  perform better let's shut down the virtual machine i'm going to change the 2 gigabytes of ram to five  so the virtual machine will have five gigabytes   and because it's using two virtual cores for every   physical core i'm going to change  the four to eight and two to four   which means that four physical cores will be  allocated to the virtual machine let's save the   file and now let's run the virtual machine again  and let's take a look at the activity monitor and under memory we can see that we now  have five gigabytes of ram that would be all   thanks for watching and i'll  see you in the next one bye
Info
Channel: Abstract programmer
Views: 26,890
Rating: 4.9852219 out of 5
Keywords:
Id: Fz07YhB2v60
Channel Id: undefined
Length: 13min 54sec (834 seconds)
Published: Wed Feb 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.