vm:main
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
vm:main [2023/03/31 13:07] – removed 172.20.22.34 | vm:main [2023/03/31 13:07] (current) – created 172.20.22.34 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | go back to [[: | ||
+ | |||
+ | ======Virtual Machines on linux====== | ||
+ | |||
+ | Here we supposed we are running Ubuntu 18.04 LTS and we simply install **VirtualBox** using **apt** : | ||
+ | <code bash> | ||
+ | sudo apt install virtualbox | ||
+ | sudo apt install virtualbox-ext-pack | ||
+ | </ | ||
+ | |||
+ | ======Mac OS X====== | ||
+ | |||
+ | We will now install a macOS virtual machine. Virtual machine will be called **VM** in the following. | ||
+ | The important thing before starting is to get the **vmdk** file for the version macOS version we want to run on the VM. The **vmdk** file is a Virtual Machine Disk define in an open format provided by VMware. | ||
+ | For macOS 10.13 High Sierra you can get this file [[https:// | ||
+ | After downloading simply decompress to get the **vmdk** file: | ||
+ | <code bash> | ||
+ | unzip ../MacOS\ High\ Sierra\ 10.13\ \(Virtualbox\).zip | ||
+ | </ | ||
+ | |||
+ | For macOS 10.15 Catalina the vmdk file can be obtained [[http:// | ||
+ | <code bash> | ||
+ | sudo apt install unrar unrar-free | ||
+ | unrar e Catalina\ Virtual\ Disk\ Image\ by\ Intoguide.rar | ||
+ | </ | ||
+ | Sometimes unrar files are coded with password, if it is the case try typing : intoguide.com | ||
+ | |||
+ | Start **VirtualBox** using command line or desktop icon. | ||
+ | When the window appears click on **New** icon and fill the 3 values required, for Catalina, it is: | ||
+ | * name : macOS-Catalina | ||
+ | * type : Mac OS X | ||
+ | * version : Mac OS X(64_bit) | ||
+ | |||
+ | For High Siera, version is a little different : | ||
+ | * version : Mac OS 10.13 High Sierra (64-bit) | ||
+ | |||
+ | Click **next** and set the memory to at least 4096 MB (5120 or 6144 MB will be nice if you have enough RAM on you computer) | ||
+ | |||
+ | Click **next**, select **use an existing virtual hard disk file** and click on the icon on the right to choose the **vmdk** file. For Catalina, it is **macOS Catalina Virtual Disk Image.vmdk** and for High Sierra | ||
+ | |||
+ | Click **create**. After that a VM called **macOS-Catalina** should appear. | ||
+ | |||
+ | We will now modify some settings. | ||
+ | |||
+ | Click on **settings** icon. | ||
+ | |||
+ | Click on **System**. In the **Motherboard** tab, deselect **Floppy**. In the **Processor** tab, select 4 CPUs. | ||
+ | |||
+ | Click on **Display**. In **Screen** put display memory to the maximum 128 MB. | ||
+ | |||
+ | Click on **Network**. Set **attached to:** Bridged Adapter, the **name:** of the adapter should be ok, change it if not. | ||
+ | |||
+ | Click on **USB** and select USB 3.0 | ||
+ | |||
+ | Then change directory to the folder where the VM has been created. If you do not know, clic **File** menu on VirtualBox window and the click **Preferences...**. **Default Machine Folder:** will give the path to the folder where the VM has been created: | ||
+ | <code bash> | ||
+ | cd / | ||
+ | cd macOS-Catalina | ||
+ | </ | ||
+ | In this folder, a file called **macOS-Catalina.vbox** containing all the settings of the VM should exist. | ||
+ | To have your VM working you need to manually patch this file with the following commands : | ||
+ | <code bash> | ||
+ | vmname=macOS-Catalina | ||
+ | VBoxManage modifyvm " | ||
+ | VBoxManage setextradata " | ||
+ | VBoxManage setextradata " | ||
+ | VBoxManage setextradata " | ||
+ | VBoxManage setextradata " | ||
+ | VBoxManage setextradata " | ||
+ | </ | ||
+ | Very important setting for non Intel host CPU, e.g. AMD rizen5, must be defined : | ||
+ | <code bash> | ||
+ | VBoxManage modifyvm " | ||
+ | </ | ||
+ | |||
+ | Now we can start the VM by clicking the **Start** icon. The press ESC key within 5 seconds to interrupt the boot process. A command line prompt will appear, type **install.nsh** : | ||
+ | <code bash> | ||
+ | Shell> install.nsh | ||
+ | </ | ||
+ | |||
+ | //Note : for High Sierra , you do not need to interrupt the boot with ESC, it should proceed directly to the install.// | ||
+ | |||
+ | The installation will start and last for about 20 minutes. After that, you should have a working Mac OS Catalina VM ... enjoy !! | ||
+ | |||
+ | |||
+ | go to [[vm: | ||
+ | ---- | ||
+ | ===Additional Commands=== | ||
+ | |||
+ | To access the VM via SSH, add sharing in MacOS by clicking **System Preferences** icon and the **Sharing**. Allow remote login for the macos user, then you can access the MacOS VM from linux simply with ssh. | ||
+ | <code bash> | ||
+ | ssh bob@bobs-imac | ||
+ | </ | ||
+ | You can get the hostname by typing hostname in a macos terminal. | ||
+ | |||
+ | To get the IP address of the VM, on a Mac OS terminal type : | ||
+ | <code bash> | ||
+ | ifconfig | ||
+ | ipconfig getifaddr en0 | ||
+ | </ | ||
+ | You also can access th VM in SSH with the IP address (IPADDR): | ||
+ | <code bash> | ||
+ | ssh bob@IPADDR | ||
+ | </ | ||
+ | |||
+ | To mount on linux a shared macos folder, on mac VM select **File Sharing** (after clicking on **System Preferences** and ***Sharing** icons), select the Windows password for the user. The mount command on the linux side is : | ||
+ | <code bash> | ||
+ | sudo mount.cifs // | ||
+ | </ | ||
+ | The IP address **IPADDR** can be replaced by the hostname, **SharedFolder** is the name of the macos shared folder and **bob** is the user name. | ||
+ | |||
+ | go to [[vm: | ||
+ | ---- | ||
+ | ===Troublshouting=== | ||
+ | |||
+ | If you cannot drag windows inside the VM or if you cannot highlight a text area, it is probably due to a wrong mouse setting. No clear solution on the web, but a workaround is to add a second physical mouse that only operates in the VM, ([[https:// | ||
+ | |||
+ | |||
+ | |||
+ | go to [[vm: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
vm/main.1680260849.txt.gz · Last modified: 2023/03/31 13:07 by 172.20.22.34