Virtualbox Centos Mac



VirtualBox (VB) development is progressing rapidly and the information on this page may be outdated. The Linux Downloads page now has yum repo configs. Unfortunately the RPM packages do not handle major version upgrades gracefully. The built-in update notifications when running VB are also deficient and will only notify of minor updates (i.e. 5.1.6->5.1.8), if that, and not more major version upgrades (i.e. 4->5). For now, older versions should be uninstalled before installing a new major version or the package upgrade will encounter RPM conflicts. The VB user manual should be read carefully; however, at this writing it does not do a good job of addressing RPM installations. See the VB site for the latest details. The good news is that the new versions have significant improvements and new features, and backwards compatibility with existing VMs has been excellent.

VirtualBox-6.1 (VirtualBox-6.1-6.1.20_143896) is currently available and supported. To get full 6.1 functionality you may also need the VirtualBox Extension Pack which provides support for USB 2.0/3.0 devices, and RDP and PXE boot for Intel cards.

If I connected my host OS (Mac OS X 10.7.2) to a Wi-Fi network, I cannot bridge the VM's network connection to that interface. The VirtualBox VM settings allow me to choose bridging over that interface, but I'm unable to obtain a DHCP lease or do anything else on that interface. Bridging to the Ethernet interface works fine, and the Wi-Fi connection works fine in the host OS. Hey guys, I just installed VirtualBox 6 (first install) to a Mac OS X 10.13.6 and tried to create my first VM using CentOS but I never got to see the mouse pointer, I did notice that when the mouse passed on top of the list boxes they showed the mouse was on top of them, but I couldn't see the mouse pointer itself, what can I do?

See CentOS as a Guest OS in VirtualBox for information about using CentOS as a VB guest.

See also this Red Hat Developer article on VirtualBox.

Please note that VirtualBox is a product of Oracle Corporation. It is neither provided nor supported by the CentOS Project, although questions may be answered at the Fora or on the virtualization mailing lists.

Contents

1. What is VirtualBox?

VirtualBox is a set of x86 virtualization products for various OS platforms. It is a machine/hardware virtualization product or hypervisor, similar in function to VMware Server, Parallels Workstation, QEMU, KVM and Xen. It can support a variety of guest operating systems including but not limited to Windows (Server 2003-2012, Vista, 7, 8 and 10), DOS/Windows 3.x, Linux (2.4, 2.6 and 3.x), Solaris/!OpenSolaris and OpenBSD. Its proponents claim it to be 'the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL)'.

VirtualBox is available on a variety of platforms in 'native' packages. This includes i386 and AMD64 (x86_64) RPM packages for RHEL5/RHEL6/RHEL7 that should work on CentOS-5/6/7 (or Scientific Linux and other RHEL derivatives), as well as .deb packages for Debian, Ubuntu and derivatives, Mac OS-X, Windows, Solaris & OpenSolaris and as source.

2. Why use VirtualBox?

While not as efficient as operating system-level virtualization based on a modified Linux kernel like Xen, KVM, OpenVZ, or Vserver it is easy to install and use. Benefits include:

  1. Available in RPM packages
  2. Active community support

  3. Runs a variety of guest OS's
  4. Good access to hardware including sound, USB, and serial ports
  5. Available on a number of host OS's
  6. Allows running Redmond OSs and applications without messing up your computer or dual-booting

3. Installing VirtualBox

The (VirtualBox) website has a lot of quality documentation including:

  • End-user documentation
  • Technical documentation
  • Source code repository timeline
  • List of changes (changelog)
Virtualbox

This article will briefly cover the installation process. Both i386 and AMD64 (x86_64) versions are available.

You will need to be the root user for the following tasks. Login to a root shell or 'su -' in a terminal window.

Download the RHEL repo config.

  • Note: As an alternative, you may choose to download and install individual RPMS rather than configuring the repository. That procedure is documented on the VB web site and will not be covered here.
  • Optionally add a line 'enabled=0' if you do not want the repository to be enabled by default. This will require adding '--enablerepo virtualbox' to yum commands to access the repository.

The installation of VB will require the building of kernel modules. If DKMS (Dynamic Kernel Module Support) is installed it will be used and will simplify kernel upgrades. Installing DKMS from the EPEL repository is recommended before installing VirtualBox. Don't forget to configure the yum-priorities plugin. Installing DKMS will pull in required development dependencies.

A forum user notes that all but the latest version of DKMS from Dell may be buggy.

If DKMS is not used and the development environment and kernel source are not already installed:

You may also choose to only install a minimum set of individual development tool packages (at least gcc and make are required) rather than the groupinstall which some may consider overkill. Replace 'kernel-devel' with 'kernel-PAE-devel' if using a PAE kernel. If you are not using a standard CentOS kernel, you must acquire and install the source for your kernel from wherever you got the kernel. Do not try to use VirtualBox with a Xen kernel, nor to install a Xen kernel in a Guest OS.

  • Note: For CentOS as a Guest OS the same packages are used to build the 'Guest Additions' drivers.

Install the RPM:

The installer will create the 'vboxusers' group and create the necessary kernel modules if the development environment has been correctly configured.

For each 'username' that will run VirtualBox:

Virtualbox Centos Mac

or use the GUI Users and Groups tool.

4. Running VirtualBox

Run VB as a user that is a member of the 'vboxusers' group. For VirtualBox-4.0 or 4.1 you may install the optional VirtualBox Extension Pack from a running instance of the GUI interface via the File / Preferences / Extensions menu. The root password will be required for this operation.

  • From a terminal command line enter 'VirtualBox &'

  • In GNOME or KDE run under 'Applications / System Tools / Oracle VM VirtualBox'

Accept the license, optionally register, and create a new VM. VMware virtual machines should be usable with Virtual box. Google 'vmware to virtualbox' for information.

Help is available from the menu or online.

5. Making USB Work in VirtualBox

VirtualBox requires the user have write access to 'usbfs' devices for USB access. As root perform the following:

  • If running CentOS as a guest OS in a VM the same development and DKMS packages should be installed in the VM prior to installing VBox Guest Additions.
  • VB users may also be interested in the phpVirtualBox implementation of the VirtualBox user interface written in PHP.

  • Please do not email the CentOS mailing lists (except CentOS-virt) or visit the CentOS IRC channel with VirtualBox related questions. Use the VirtualBox community support resources or the CentOS Fora instead.

This page was initially created by PhilSchaffner and is currently maintained by ChristophGaluschka. Other Wiki contributors are invited to make corrections, additions, or modifications.

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.

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.

  1. Open up your Mac
  2. Go to the App Store
  3. 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:

  • 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.

Virtualbox centos kernel panicMac

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.

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.

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.

Mac Os Virtualbox Vm

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:

Virtualbox Centos Image Download

  1. cd “macOS Install Data”
  2. cd “Locked Files”
  3. 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.