Windows, macOS – which one do you want to use today? On a traditional setup, you’re stuck with one or the other. But with virtual box, you actually have macOS on a Windows PC.
It’s the freedom that computer users have enjoyed with Linux and other operating systems.
Download VirtualBox on your Mac machine, and then set it up with the necessary ISO image from Android-x86.org. You’ll be able to create an efficient emulator that allows you to play almost any. VirtualBox is a virtualization software application that is compatible with the AMD64/Inter64 and x86 architectures that offers us the opportunity to easily install Windows, GNU/Linux, Mac OS X and Solaris operating systems. How it works is rather simple compared to other similar applications, because it's only necessary to select the resources. I don’t do Windows, but VirtualBox lets you work in Linux, FreeBSD, FreeDOS, other versions of macOS, and perhaps even MorphOS and other less-well-known operating systems. I mostly use it for Andy, an Android emulator from Andyroid.net. Sometimes a 4″ iPhone screen is just too small, and many mobile games are available for both iOS and Android. VirtualBox runs on every OS. You can install it on Windows, Linux, Mac, and Solaris. Its broad compatibility makes it perfect for everyone, one of the best features of this program. The downloading.
But Apple has made it difficult to install their operating system on anything other than their own hardware. All of that is changing, and Virtual Box is responsible for it and the rise of the Hackintosh.
New to hackintosh? Learn more about it in our what is hackintosh? overview.
Note: A lot of people will be able to get a mac virtual machine one Windows running smoothly, but sound doesn’t seem to work well. That’s really not an issue because you’ll still be able to access all of your apps and software.
I also recommend that you have access to a real Mac. You might be able to find some distributions of the High Sierra ISO online, but there is always a risk when downloading from an unofficial source. Instead, borrow a Mac from a friend, or use your own and download the High Sierra OS from the App Store.
Check out our high sierra installation guide for hackintosh
Everything You Need to Get Started with Installing macOS on VirtualBox
Before we go through the steps on how to install macOS on Virtual Box, let’s get everything together that you’ll need to get started.
- Open up your Mac
- Go to the App Store
- Type in “High Sierra”
You’ll want to search for your desired operating system (we’ll be using High Sierra), and Download it.
Note: You’ll need a decent computer to be able to run Virtual Box. Your computer will need to meet these minimum requirements:
Virtualbox Mac Vm
- Dual core processor
- 4GB Ram or higher
- 64-bit
If your computer doesn’t meet these requirements, you won’t be able to run macOS properly. You’ll be able to download VirtualBox from the official website. I’m not going to go through the installation process, as the website will have all of the information you need to be able to install VirtualBox.
I do recommend that you read all of the documentation and ask any questions that you have in the community section of the website.
VirtualBox 6.0 was just released, so it’s definitely a great time to get started with your own macOS.
Extract macOS Sierra
Make sure you’ve downloaded High Sierra, and then you’ll want to run a few commands from your terminal . You’ll be able to open the terminal at: Applications > Utilities > Terminal. Once inside of the terminal, you’ll want to run the following commands:
Go to your desktop and rename the file, removing the “.cdr” extension. You need this extension to read “.iso” for it to work properly.
You’ve successfully created your own ISO file so that you can bootup your macOS.
The next step is to copy the file over to your Windows machine (using a large USB drive seems to work best). This file will be mounted in your virtual machine later on in the article, so it’s very important that this step is completed successfully.
Creating a mac Virtual Machine on Windows
You’ll want to create a virtual machine, and this is really easy. You’ll open up VirtualBox and click New. You’ll want to have the following parameters selected or entered before clicking Next.
- Name: High Sierra
- Type: Mac OS X
- Version: Mac OS X (64-bit)
Pay attention when selecting the version because you may find that High Sierra is offered as a version when you go to install it. But if it’s not, you can just choose the settings I listed above and they should work fine.
You’ll then be proceeding through all of the settings.
When you come up to the RAM setting, you’ll want to be generous. VirtualBox requires a minimum of 4GB or RAM to run, but the more the better.
Why?
You’ll want to provide at least 4GB to your macOS, or 4096MB to be precise. A general rule of thumb is that if you can spare it, supply more RAM to your virtual machine. RAM will allow the operating system to put more information into memory and retrieve it faster.
For better overall performance, supply as much RAM as you can.
The next steps are also important, and they’ll include:
- Hard Disk: Choose the “Create a virtual hard disk now” setting.
- Choose VDI when choosing the hard disk type.
- Choose Fixed Size instead of Dynamic for added speed.
- Set the size of the drive to at least 25GB.
You’ll now have your virtual machine using the RAM and disk space properly, and you’ll have to work your way through a few screen prompts before having everything setup properly.
Virtualbox Android Host
Configuring Your VirtualBox to Run macOS High Sierra
We’ve made a lot of progress so far, and now it’s time to configure your virtual machine properly. You’ll see in the main window of VirtualBox that “High Sierra” is listed. Click on this and then click on the “Settings” button.
You’ll want to go to “System” and make sure that the following are unchecked on the Motherboard tab:
- Floppy
- Network
Click on the Processor tab and make sure that you have 2 or more CPUs set for your virtual machine.
The next few settings are rather simple:
- Display: Video Memory with a minimum of 128MB
- Storage: Click “Empty” and then click on the CD at the top right. Choose your High Sierra ISO file
Now you’ll need to click “Ok,” and save all of the changes you’ve made. Close out your VirtualBox now.
Install Mac Os Virtualbox
Apple is very strict on the system that their operating system runs on, so it’s very important that you do your best to configure your virtual machine in such a way that it tricks the installer to thinking you’re on a retail machine.
We’ll now be going into the Windowscommand prompt.
You’ll do this by:
- Clicking the Start Menu
- Typing “Command Prompt”
- Right-clicking on the Command Prompt desktop app
- Choosing Run as administrator
It’s very important to follow all of the following command prompts exactly. Your goal is to run each command, one by one, hitting the Enter button and waiting for the command to complete successfully.
Remember that VirtualBox needs to be closed before running these commands, or it won’t work properly.
You have to make sure that the virtual machine is properly named “High Sierra” for this method to work. If not, you’ll be able to go back and make changes to the name to get everything to work properly.
Once all of the commands are completed, and there are no errors, you’ll then be able to open up your VirtualBox and get macOS High Sierra installed properly on VirtualBox.
It’s a long process, but we’re almost done with your installation.
Running VirtualBox and the macOS Installer
You’ve almost learned how to install macOS on VirtualBox entirely, and we’re on the home stretch. You’ll want to open up your VirtualBox and then click on your virtual machine that you set up earlier.
Now, click “Start.”
There will be a lot of information displayed on the screen as everything starts running. I recommend stepping away from the machine and letting it run for a few minutes before coming back. Some errors can hang for 5 minutes or longer.
If you’ve done everything properly, you can be confident that the installer will boot properly.
You’ll eventually be presented with the option to pick a Language. If you’ve reached this point, you’re doing very well and are almost ready to run your macOS.
The next steps can be followed:
- Choose your desired language, and click
- Click “Disk Utility” and then
- Click “View” and then “Show All Devices.”
- Click on your empty virtual drive that has been setup and click “Erase.”
- Choose the following settings:
- Name: Macintosh HD
- Format: Mac OS Extended (Journaled)
- Scheme: GUID Partition Map
- Click “Erase” and close Disk Utility when the process is complete.
- Click “Reinstall macOS.”
- Click “Continue.”
You’ll come up to one point where you’ll be asked to choose a hard drive, and you’ll want to select the Macintosh HD partition that you just created with the Disk Utility.
We’ve successfully copied all of the files on the virtual machine, but we’re not done just yet.
Exit your virtual machine and then go back to your virtual machine’s settings. You’ll need to change up your Storage settings. Click on your ISO for High Sierra in the “Storage Tree.” You’ll click that CD icon just like we did earlier and then choose “Remove Disk from Virtual Disk.”
You need to do this to unlink the ISO from your virtual machine.
Start up your virtual machine and you should come across a black screen with the EFI Internal Shell. You’ll want to look for FS1. If this is listed in yellow, click on the virtual machine and then type fs1: and hit the Enter button.
You should be in the fs1 directory.
Type in the following commands:
- cd “macOS Install Data”
- cd “Locked Files”
- cd “Boot Files”
Now we’ll run the installer by running: boot.efi and hitting enter.
If everything goes well, you’ll come across a graphical installer and will just have to work through the prompts. The virtual machine will reboot eventually and then you’ll need to go through the settings and the rest of the setup process.
Soon enough, you’ll be right inside of macOS, where you’ll be able to start using your mac virtual machine on Windows.
Having a virtualbox mac OS is the easiest method of using mac as and when you need it. In addition, using virtualbox is far less complicated than the dual boot hackintosh method we have looked at previously.
Run Android on your PC
VirtualBox How To
The following are instructions on how to run Android-x86 inside VirtualBox.
Note: For optimal performance, make sure you have enabled either VT-x or AMD-V in your host operating system's BIOS.
Android-x86 versions tested against Virtualbox versions.
Date Tested | Virtualbox | Host OS | Android-x86 | Result |
---|---|---|---|---|
?? | 2.2.4 | Windows XP | ?? | Good |
?? | 3.0.2 | Fedora 11 | ?? | Good |
Nov. 2 2017 | 5.2.0 | Windows 10 | 6.0-r3 32/64 bit | Good |
Downloading
Download an ISO of Android-x86 from here.
Caution
If you are using Android-x86 for debugging purposes, some binaries (gdb for example) are built for 32-bit architectures and will not support debugging 64-bit binaries such as the Android app host. Download a 32-bit distribution instead.Create a new VM
If you have not already created a VirtualBox virtual machine for Android-x86 yet, do so as follows:
- Click the 'New' button, and name your new virtual machine however you like. Set Type to Linux, and Version to Linux 2.6 / 3.x / 4.x. Note that you should choose the appropriate bit type for the version of Android-x86 that you downloaded.
- Specify how much RAM will be allocated to your virtual machine when you run it. Android doesn't specify a bare-minimum requirement for memory, just keep in mind what apps you plan on running. 2GB (2048MB) is a good place to start, and you can change this later if you need to.
- Create a new Hard disk image which will act as your machine's storage. The recommended starting size of 8GB is enough. Click through the rest of the options for creating your Hard disk.
Settings
Tested on VirtualBox 64-bit for Windows, version 5.2.0. Android-x86 version 6.0-r3, both 32-bit and 64-bit.
Select your machine, then click the Settings button and refer to the below recommended configuration to make sure your settings match.
- [System]Recommended: Processor(s) should be set above 1 if you have more than one virtual processor in your host system. Failure to do so means every single app (like Google Chrome) might crush if you try to use it.
- [Display]:
- Optional: Video Memory may be increased beyond the minimum selected automatically. The affects of this are unknown.
- Mandatory: Unless guest additions are installed[1], change the default VMSVGA to VBoxVGA.
- Optional: Enable 3D Acceleration may be checked. The Linux Guest Additions must (VirtualBox v6.1+) / may (VirtualBox v6.0 and below) need to be installed[2][1] to get any benefit from this. Failure to do so means you won't even be able to launch Android-X86 in the first place.[3]
- [Storage] Find the first 'Empty' item (this should have an icon of a CD). In the Attributes, click on the CD icon with a small down arrow, and pick 'Choose Optical Virtual Disk File...'. Specify the Android-x86 ISO that you downloaded.
- [Audio] Intel HD Audio seems to be natively supported in Android-x86.
- [Network] By default, your installation of Android-x86 will be able to automatically connect to the internet. If not, you can try to enable WiFi in Settings/Network & Internet, and connect to showing VirtWifi. If you do not want to connect to the internet in VirtualBox, uncheck Enable Network Adapter under the Adapter 1 tab.
Install
Click the green Start arrow to power-on your virtual machine. You'll be presented with a list of options. Use the arrow keys to pick which one you want, then press Enter once the one you want is selected.
- If you don't want to install Android-x86 yet and just want to test it, pick one of the Live CD options (except for Debug mode).
- Pick the Installation option if you want your system to be installed to the virtual hard drive.
Partition
When you are prompted to Choose a partition:
- If you upgrade Android-x86 from a previous version, just select the existing partition. Agree to overwrite it when prompted.
- If this is a new VM, choose to Create/Modify partitions. Use Bootable but not GPT! This will cause the GRUB installation to fail later.
Continue through the installation. You should install GRUB when it prompts you to. You may also leave /system as read and write when prompted.
Once the installation is complete, force close/shut down the virtual machine and remove the ISO from the virtual CD drive.
Finaly, start Android-x86. If it's a new machine, once loaded you can perform the Android setup to begin using your machine.
Advanced
Custom partitions, SDCard
When booting Android-x86, you may specify which partitions represent the data and sdcard. On the boot menu, select an entry you would like to boot from, press TAB, then add the following as it suits your needs:DATA=sda1 SDCARD=sda2 Press Enter to boot. These options specify user data (your setting, your uploaded applications, ...) go into /dev/sda1, and data saved in sdcard go into /dev/sda2.
If you build the ISO from source, you can add these options to bootable/newinstaller/boot/isolinux/isolinux.cfg.
Here is a note from David when using fdisk:
- Create a new virtual machine with a hard disk.
- Launch the Live ISO in Debug mode (I used android-x86-2.2-generic.iso) to get the commend prompt.
- 'fdisk /dev/sda', then type:
- 'n' (new partition)
- 'p' (primary partition)
- '1' (1st partition)
- '1' (first cylinder)
- 'xx' (choose the last cylinder, leaving room for a 2nd partition)
- 'w' (write the partition)
- Repeat #3, but call it partition 2, and use the remaining cylinders.
- 'mdev -s'
- 'mke2fs -j -L DATA /dev/sda1'
- 'mke2fs -j -L SDCARD /dev/sda2'
- Reboot ('reboot -f')
- At the boot menu, choose VESA, then hit TAB and type so that the end of the line reads: 'DATA=sda1 SDCARD=sda2'. (Only need for the generic target images, for VM target images, this is not needed)
- After booting (and of course disabling mouse integration via the machine menu), the SD card is read as unformatted, but you can format it by going to Settings > SD card & phone settings > Format SD Card, then Mount SD card.
- The SD card should now work!
DevTools application has a MediaScanner which (re)indexes your SD card for cases where you manually copied media over. This ensures that you see new images and/or music in the apps without having to reboot.
If you downloaded it from within android, the application asks the relevant service to index new files.
Playing music
This section describes two ways to upload music files into Android running on a vbox so you can play them by the Music app. Of course, you can save the files to the virtual disk mounted at /sdcard, as described above.
Upload files by adb
Adb is Android Debug Bridge, a tool to debug Android system. If you compile from source, it is located in out/host/linux-x86/bin/adb. Otherwise you can get it from Android SDK. Suppose the network of your vbox is OK, you can upload a file from your host by
ADBHOST=<ip of vbox> out/host/linux-x86/bin/adb push <a music file> /sdcard
For complex network settings of the VirtualBox VM, you should refer to Debug How To on how to connect adb to the VM.
Upload files by wget
You can also upload files by wget in the debug mode. In the debug mode shell, before entering Android,
# netcfg eth0 dhcp
# wget <url of a music file>
Debug with adb
This section describes the way to debug Android with adb via network.
If we want to debug with adb via network, we should ensure the ip of vbox can be accessed by host machine. So we should change the Network Adapter type of vbox to Bridged Adapter. After starting the android-x86, we should follow the above Settings/[Network] section to ensure the network of android-x86 is enabled, and enable USB debugging in Settings/System/Developer Options. Then we can get the device ip from Settings/System/About tablet/IP address. For example, if we see the ip address is 192.168.0.116, then we can use following command to connect android-x86 in vbox from host machine.
Then you can use adb command to debug android-x86 such as get log, and dump system information.References
- ^ ab VirtualBox currently has no Guest Additions for Android.
- ^ VirtualBox v6.1.0 states: 'old style 3D support (with VBoxVGA) has been completely removed'
- ^ VirtualBox states: 'Note that you must install the Guest Additions on the guest VM to specify the VBoxSVGA or VMSVGA graphics controller.'