Install Macos On Ubuntu Virtualbox



Installing a new Mac operating system on virtual machines is the best idea before installing on your main host. The macOS Big Sur developer beta has several errors that can crash your data and you won’t be able to restore it back. Therefore, insta. Hey guys:)this video shows you how to install macOS in VirtualBox on Windows/Linux or whatever you want.Downloads:- macOS High Sierra ISO:- https://drive.go.

  1. Install Macos On Ubuntu Virtualbox 64-bit
  2. Install Ubuntu On Virtualbox 2020
  3. Install Virtualbox On Ubuntu 20
  4. Install Macos On Ubuntu Virtualbox Windows 10

Table of Contents

2.1. Installing on Windows Hosts
2.1.1. Prerequisites
2.1.2. Performing the Installation
2.1.3. Uninstallation
2.1.4. Unattended Installation
2.1.5. Public Properties
2.2. Installing on Mac OS X Hosts
2.2.1. Performing the Installation
2.2.2. Uninstallation
2.2.3. Unattended Installation
2.3. Installing on Linux Hosts
2.3.1. Prerequisites
2.3.2. The Oracle VM VirtualBox Kernel Modules
2.3.3. Performing the Installation
2.3.4. The vboxusers Group
2.3.5. Starting Oracle VM VirtualBox on Linux
2.4. Installing on Oracle Solaris Hosts
2.4.1. Performing the Installation
2.4.2. The vboxuser Group
2.4.3. Starting Oracle VM VirtualBox on Oracle Solaris
2.4.4. Uninstallation
2.4.5. Unattended Installation
2.4.6. Configuring a Zone for Running Oracle VM VirtualBox

As installation of Oracle VM VirtualBox varies depending on your host operating system, the following sections provide installation instructions for Windows, Mac OS X, Linux, and Oracle Solaris.

For the various versions of Windows that are supported as host operating systems, please refer to Section 1.4, “Supported Host Operating Systems”.

In addition, Windows Installer must be present on your system. This should be the case for all supported Windows platforms.

The Oracle VM VirtualBox installation can be started in either of the following ways:

  • By double-clicking on the executable file.

  • By entering the following command:

    This will extract the installer into a temporary directory, along with the .MSI file. Run the following command to perform the installation:

Using either way displays the installation Welcome dialog and enables you to choose where to install Oracle VM VirtualBox, and which components to install. In addition to the Oracle VM VirtualBox application, the following components are available:

  • USB support. This package contains special drivers for your Windows host that Oracle VM VirtualBox requires to fully support USB devices inside your virtual machines.

  • Networking. This package contains extra networking drivers for your Windows host that Oracle VM VirtualBox needs to support Bridged Networking. This enables your VM's virtual network cards to be accessed from other machines on your physical network.

  • Python support. This package contains Python scripting support for the Oracle VM VirtualBox API, see Chapter 11, Oracle VM VirtualBox Programming Interfaces. For this to work, an already working Windows Python installation on the system is required.

    See, for example: http://www.python.org/download/windows/.

    Note

    Python version at least 2.6 is required. Python 3 is also supported.

Depending on your Windows configuration, you may see warnings about unsigned drivers, or similar. Click Continue for these warnings, as otherwise Oracle VM VirtualBox might not function correctly after installation.

The installer will create an Oracle VM VirtualBox group in the Windows Start menu, which enables you to launch the application and access its documentation.

With standard settings, Oracle VM VirtualBox will be installed for all users on the local system. If this is not wanted, you must invoke the installer by first extracting as follows:

Then, run either of the following commands on the extracted .MSI file. This will install Oracle VM VirtualBox only for the current user.

Ubuntu

If you do not want to install all features of Oracle VM VirtualBox, you can set the optional ADDLOCAL parameter to explicitly name the features to be installed. The following features are available:

VBoxApplication

Main binaries of Oracle VM VirtualBox.

Note

This feature must not be absent, since it contains the minimum set of files to have working Oracle VM VirtualBox installation.

Install macos on ubuntu virtualbox 64-bit
VBoxUSB

USB support.

VBoxNetwork

All networking support. This includes the VBoxNetworkFlt and VBoxNetworkAdp features.

VBoxNetworkFlt

Bridged networking support.

VBoxNetworkAdp

Host-only networking support

VBoxPython

Python support

For example, to only install USB support along with the main binaries, run either of the following commands:

The user is able to choose between NDIS5 and NDIS6 host network filter drivers during the installation. This is done using a command line parameter, NETWORKTYPE. The NDIS6 driver is the default for most supported Windows hosts. For some legacy Windows versions, the installer will automatically select the NDIS5 driver and this cannot be changed.

You can force an install of the legacy NDIS5 host network filter driver by specifying NETWORKTYPE=NDIS5. For example, to install the NDIS5 driver on Windows 7 use either of the following commands:

As Oracle VM VirtualBox uses the standard Microsoft Windows installer, Oracle VM VirtualBox can be safely uninstalled at any time. Click the program entry in the Add/Remove Programs list in the Windows Control Panel.

Unattended installations can be performed using the standard MSI support.

Public properties can be specified with the MSI API, to control additional behavior and features of the Windows host installer. Use either of the following commands:

The following public properties are available.

  • VBOX_INSTALLDESKTOPSHORTCUT

    Specifies whether or not an Oracle VM VirtualBox icon on the desktop should be created.

    Set to 1 to enable, 0 to disable. Default is 1.

  • VBOX_INSTALLQUICKLAUNCHSHORTCUT

    Specifies whether or not an Oracle VM VirtualBox icon in the Quick Launch Bar should be created.

    Set to 1 to enable, 0 to disable. Default is 1.

  • VBOX_REGISTERFILEEXTENSIONS

    Specifies whether or not the file extensions .vbox, .vbox-extpack, .ovf, .ova, .vdi, .vmdk, .vhd and .vdd should be associated with Oracle VM VirtualBox. Files of these types then will be opened with Oracle VM VirtualBox.

    Set to 1 to enable, 0 to disable. Default is 1.

  • VBOX_START

    Specifies whether to start Oracle VM VirtualBox right after successful installation.

    Set to 1 to enable, 0 to disable. Default is 1.

For Mac OS X hosts, Oracle VM VirtualBox ships in a dmg disk image file. Perform the following steps to install on a Mac OS X host:

  1. Double-click on the dmg file, to mount the contents.

  2. A window opens, prompting you to double-click on the VirtualBox.pkg installer file displayed in that window.

  3. This starts the installer, which enables you to select where to install Oracle VM VirtualBox.

  4. An Oracle VM VirtualBox icon is added to the Applications folder in the Finder.

To uninstall Oracle VM VirtualBox, open the disk image dmg file and double-click on the uninstall icon shown.

To perform a non-interactive installation of Oracle VM VirtualBox you can use the command line version of the installer application.

Mount the dmg disk image file, as described in the installation procedure, or use the following command line:

Install Macos On Ubuntu Virtualbox 64-bit

Open a terminal session and run the following command:

For the various versions of Linux that are supported as host operating systems, see Section 1.4, “Supported Host Operating Systems”.

You may need to install the following packages on your Linux system before starting the installation. Some systems will do this for you automatically when you install Oracle VM VirtualBox.

  • Qt 5.3.2 or later. Qt 5.6.2 or later is recommended.

  • SDL 1.2.7 or later. This graphics library is typically called libsdl or similar.

Note

These packages are only required if you want to run the Oracle VM VirtualBox graphical user interfaces. In particular, VirtualBox, the graphical VirtualBox Manager, requires both Qt and SDL. If you only want to run VBoxHeadless, neither Qt nor SDL are required.

In order to run other operating systems in virtual machines alongside your main operating system, Oracle VM VirtualBox needs to integrate very tightly with your system. To do this it installs a driver module called vboxdrv into the system kernel. The kernel is the part of the operating system which controls your processor and physical hardware. Without this kernel module, you can still use the VirtualBox Manager to configure virtual machines, but they will not start.

Network drivers called vboxnetflt and vboxnetadp are also installed. They enable virtual machines to make more use of your computer's network capabilities and are needed for any virtual machine networking beyond the basic NAT mode.

Since distributing driver modules separately from the kernel is not something which Linux supports well, the Oracle VM VirtualBox install process creates the modules on the system where they will be used. This means that you may need to install some software packages from the distribution which are needed for the build process. Required packages may include the following:

  • GNU compiler (GCC)

  • GNU Make (make)

  • Kernel header files

Also ensure that all system updates have been installed and that your system is running the most up-to-date kernel for the distribution.

Note

The running kernel and the kernel header files must be updated to matching versions.

The following list includes some details of the required files for some common distributions. Start by finding the version name of your kernel, using the command uname -r in a terminal. The list assumes that you have not changed too much from the original installation, in particular that you have not installed a different kernel type.

  • With Debian and Ubuntu-based distributions, you must install the correct version of the linux-headers, usually whichever of linux-headers-generic, linux-headers-amd64, linux-headers-i686 or linux-headers-i686-pae best matches the kernel version name. Also, the linux-kbuild package if it exists. Basic Ubuntu releases should have the correct packages installed by default.

  • On Fedora, Red Hat, Oracle Linux and many other RPM-based systems, the kernel version sometimes has a code of letters or a word close to the end of the version name. For example 'uek' for the Oracle Unbreakable Enterprise Kernel or 'default' or 'desktop' for the standard kernels. In this case, the package name is kernel-uek-devel or equivalent. If there is no such code, it is usually kernel-devel.

  • On some SUSE and openSUSE Linux versions, you may need to install the kernel-source and kernel-syms packages.

If you suspect that something has gone wrong with module installation, check that your system is set up as described above and try running the following command, as root:

If you are running on a system using UEFI (Unified Extensible Firmware Interface) Secure Boot, you may need to sign the following kernel modules before you can load them:

  • vboxdrv

  • vboxnetadp

  • vboxnetflt

  • vboxpci

See your system documentation for details of the kernel module signing process.

Oracle VM VirtualBox is available in a number of package formats native to various common Linux distributions. See Section 1.4, “Supported Host Operating Systems”. In addition, there is an alternative generic installer (.run) which you can use on supported Linux distributions.

2.3.3.1. Installing Oracle VM VirtualBox from a Debian or Ubuntu Package

Download the appropriate package for your distribution. The following example assumes that you are installing to a 64-bit Ubuntu Xenial system. Use dpkg to install the Debian package,as follows:

The installer will also try to build kernel modules suitable for the current running kernel. If the build process is not successful you will be shown a warning and the package will be left unconfigured. Look at /var/log/vbox-install.log to find out why the compilation failed. You may have to install the appropriate Linux kernel headers, see Section 2.3.2, “The Oracle VM VirtualBox Kernel Modules”. After correcting any problems, run the following command:

This will start a second attempt to build the module.

If a suitable kernel module was found in the package or the module was successfully built, the installation script will attempt to load that module. If this fails, please see Section 12.7.1, “Linux Kernel Module Refuses to Load” for further information.

Once Oracle VM VirtualBox has been successfully installed and configured, you can start it by clicking VirtualBox in your Start menu or from the command line. See Section 2.3.5, “Starting Oracle VM VirtualBox on Linux”.

2.3.3.2. Using the Alternative Generic Installer (VirtualBox.run)

The alternative generic installer performs the following steps:

  • Unpacks the application files to the target directory /opt/VirtualBox/, which cannot be changed.

  • Builds and installs the Oracle VM VirtualBox kernel modules: vboxdrv, vboxnetflt, and vboxnetadp.

  • Creates /sbin/rcvboxdrv, an init script to start the Oracle VM VirtualBox kernel module.

  • Creates a new system group called vboxusers.

  • Creates symbolic links in /usr/bin to a shell script /opt/VirtualBox/VBox which does some sanity checks and dispatches to the actual executables: VirtualBox, VBoxVRDP, VBoxHeadless and VBoxManage.

  • Creates /etc/udev/rules.d/60-vboxdrv.rules, a description file for udev, if that is present, which makes the USB devices accessible to all users in the vboxusers group.

  • Writes the installation directory to /etc/vbox/vbox.cfg.

The installer must be executed as root with either install or uninstall as the first parameter. For example:

Or if you do not have the sudo command available, run the following as root instead:

Add every user who needs to access USB devices from a VirtualBox guests to the group vboxusers. Either use the OS user management tools or run the following command as root:

Note

The usermod command of some older Linux distributions does not support the -a option, which adds the user to the given group without affecting membership of other groups. In this case, find out the current group memberships with the groups command and add all these groups in a comma-separated list to the command line after the -G option. For example: usermod -G group1,group2,vboxusers username.

If you cannot use the shell script installer described in Section 2.3.3.2, “Using the Alternative Generic Installer (VirtualBox.run)”, you can perform a manual installation. Run the installer as follows:

This will unpack all the files needed for installation in the directory install under the current directory. The Oracle VM VirtualBox application files are contained in VirtualBox.tar.bz2 which you can unpack to any directory on your system. For example:

To run the same example as root, use the following commands:

The sources for Oracle VM VirtualBox's kernel module are provided in the src directory. To build the module, change to the directory and use the following command:

If everything builds correctly, run the following command to install the module to the appropriate module directory:

In case you do not have sudo, switch the user account to root and run the following command:

The Oracle VM VirtualBox kernel module needs a device node to operate. The above make command will tell you how to create the device node, depending on your Linux system. The procedure is slightly different for a classical Linux setup with a /dev directory, a system with the now deprecated devfs and a modern Linux system with udev.

On certain Linux distributions, you might experience difficulties building the module. You will have to analyze the error messages from the build system to diagnose the cause of the problems. In general, make sure that the correct Linux kernel sources are used for the build process.

Note that the /dev/vboxdrv kernel module device node must be owned by root:root and must be read/writable only for the user.

Next, you install the system initialization script for the kernel module and activate the initialization script using the right method for your distribution, as follows:

This example assumes you installed Oracle VM VirtualBox to the /opt/VirtualBox directory.

Create a configuration file for Oracle VM VirtualBox, as follows:

Create the following symbolic links:

2.3.3.4. Updating and Uninstalling Oracle VM VirtualBox

Before updating or uninstalling Oracle VM VirtualBox, you must terminate any virtual machines which are currently running and exit the Oracle VM VirtualBox or VBoxSVC applications. To update Oracle VM VirtualBox, simply run the installer of the updated version. To uninstall Oracle VM VirtualBox, run the installer as follows:

As root, you can use the following command:

You can uninstall the .run package as follows:

To manually uninstall Oracle VM VirtualBox, perform the manual installation steps in reverse order.

2.3.3.5. Automatic Installation of Debian Packages

The Debian packages will request some user feedback when installed for the first time. The debconf system is used to perform this task. To prevent any user interaction during installation, default values can be defined. A file vboxconf can contain the following debconf settings:

The first line enables compilation of the vboxdrv kernel module if no module was found for the current kernel. The second line enables the package to delete any old vboxdrv kernel modules compiled by previous installations.

These default settings can be applied prior to the installation of the Oracle VM VirtualBox Debian package, as follows:

In addition there are some common configuration options that can be set prior to the installation. See Section 2.3.3.7, “Automatic Installation Options”.

The RPM format does not provide a configuration system comparable to the debconf system. See Section 2.3.3.7, “Automatic Installation Options” for how to set some common installation options provided by Oracle VM VirtualBox.

To configure the installation process for .deb and .rpm packages, you can create a response file named /etc/default/virtualbox. The automatic generation of the udev rule can be prevented with the following setting:

The creation of the group vboxusers can be prevented as follows:

If the following line is specified, the package installer will not try to build the vboxdrv kernel module if no module fitting the current kernel was found.

The Linux installers create the system user group vboxusers during installation. Any system user who is going to use USB devices from Oracle VM VirtualBox guests must be a member of that group. A user can be made a member of the group vboxusers either by using the desktop user and group tools, or with the following command:

The easiest way to start an Oracle VM VirtualBox program is by running the program of your choice (VirtualBox, VBoxManage, or VBoxHeadless) from a terminal. These are symbolic links to VBox.sh that start the required program for you.

The following detailed instructions should only be of interest if you wish to execute Oracle VM VirtualBox without installing it first. You should start by compiling the vboxdrv kernel module and inserting it into the Linux kernel. Oracle VM VirtualBox consists of a service daemon, VBoxSVC, and several application programs. The daemon is automatically started if necessary. All Oracle VM VirtualBox applications will communicate with the daemon through UNIX local domain sockets. There can be multiple daemon instances under different user accounts and applications can only communicate with the daemon running under the user account as the application. The local domain socket resides in a subdirectory of your system's directory for temporary files called .vbox-<username>-ipc. In case of communication problems or server startup problems, you may try to remove this directory.

All Oracle VM VirtualBox applications (VirtualBox, VBoxManage, and VBoxHeadless) require the Oracle VM VirtualBox directory to be in the library path, as follows:

For the specific versions of Oracle Solaris that are supported as host operating systems, see Section 1.4, “Supported Host Operating Systems”.

If you have a previously installed instance of Oracle VM VirtualBox on your Oracle Solaris host, please uninstall it first before installing a new instance. See Section 2.4.4, “Uninstallation” for uninstall instructions.

Oracle VM VirtualBox is available as a standard Oracle Solaris package. Download the Oracle VM VirtualBox SunOS package, which includes the 64-bit version of Oracle VM VirtualBox. The installation must be performed as root and from the global zone. This is because the Oracle VM VirtualBox installer loads kernel drivers, which cannot be done from non-global zones. To verify which zone you are currently in, execute the zonename command.

To start installation, run the following commands:

The Oracle VM VirtualBox kernel package is integrated into the main package. Install the Oracle VM VirtualBox package as follows:

The installer will then prompt you to enter the package you wish to install. Choose 1 or all and proceed. Next the installer will ask you if you want to allow the postinstall script to be executed. Choose y and proceed, as it is essential to execute this script which installs the Oracle VM VirtualBox kernel module. Following this confirmation the installer will install Oracle VM VirtualBox and execute the postinstall setup script.

Once the postinstall script has been executed your installation is now complete. You may now safely delete the uncompressed package and autoresponse files from your system. Oracle VM VirtualBox is installed in /opt/VirtualBox.

Note

If you need to use Oracle VM VirtualBox from non-global zones, see Section 2.4.6, “Configuring a Zone for Running Oracle VM VirtualBox”.

The installer creates the system user group vboxuser during installation for Oracle Solaris hosts that support the USB features required by Oracle VM VirtualBox. Any system user who is going to use USB devices from Oracle VM VirtualBox guests must be a member of this group. A user can be made a member of this group either by using the desktop user and group tools or by running the following command as root:

Note that adding an active user to the vboxuser group will require the user to log out and then log in again. This should be done manually after successful installation of the package.

2.4.3. Starting Oracle VM VirtualBox on Oracle Solaris

The easiest way to start an Oracle VM VirtualBox program is by running the program of your choice (VirtualBox, VBoxManage, or VBoxHeadless) from a terminal. These are symbolic links to VBox.sh that start the required program for you.

Alternatively, you can directly invoke the required programs from /opt/VirtualBox. Using the links provided is easier as you do not have to enter the full path.

You can configure some elements of the VirtualBox Qt GUI, such as fonts and colours, by running VBoxQtconfig from the terminal.

Uninstallation of Oracle VM VirtualBox on Oracle Solaris requires root permissions. To perform the uninstallation, start a root terminal session and run the following command:

After confirmation, this will remove Oracle VM VirtualBox from your system.

To perform a non-interactive installation of Oracle VM VirtualBox there is a response file named autoresponse. The installer uses this for responses to inputs, rather than prompting the user.

Extract the tar.gz package as described in Section 2.4.1, “Performing the Installation”. Then open a root terminal session and run the following command:

To perform a non-interactive uninstallation, open a root terminal session and run the following command:

2.4.6. Configuring a Zone for Running Oracle VM VirtualBox

Assuming that Oracle VM VirtualBox has already been installed into your zone, you need to give the zone access to Oracle VM VirtualBox's device node. This is done by performing the following steps. Start a root terminal and run the following command:

Replace vboxzone with the name of the zone where you intend to run Oracle VM VirtualBox.

Install Ubuntu On Virtualbox 2020

Use zonecfg to add the device resource and match properties to the zone, as follows:

On Oracle Solaris 11 or later, you may also add a device for /dev/vboxusbmon, similar to that shown above.

If you are not using sparse root zones, you will need to loopback mount /opt/VirtualBox from the global zone into the non-global zone at the same path. This is specified below using the dir attribute and the special attribute. For example:

Reboot the zone using zoneadm and you should be able to run Oracle VM VirtualBox from within the configured zone.

Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave.There is already a script which installs Mojave in a virtual machine here https://github.com/img2tab/okiomov. But if you are curios how to do everything manually to install High Sierra, then this guide may be useful.

Install Virtualbox On Ubuntu 20

After reading a few articles I ended up with these steps:

  1. On macOS, download the High Sierra installer (even if you have Mojave installed):https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
  2. If the High Sierra Installer starts, quit it.
  3. Open 'Disk Utility'.
  4. Click on 'File' > 'New Image' > 'Blank image...'. Or just press cmd+N.
  5. In the 'Size' field, enter 13 GB and save it wherever you want.
  6. If the image is not mounted automatically, double-click the file you just created to do it.
  7. Open 'Terminal'
  8. Run sudo /Applications/Install macOS High Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled. If you changed the value of the 'Name' field in the step where you changed the 'Size', then instead of 'Untitled' the image probably appears with that name you entered.
  9. Once the previous command finished, continue with the following steps.
  10. Copy the file to some device which you can get access from Ubuntu (external drive or whatever works for you).
  11. On Ubuntu, open the 'Terminal'.
  12. Run VBoxManage convertfromraw <path_to_input_.dmg_file> <path_to_output_.vdi_file>.
  13. Open 'VirtualBox'.
  14. Create a new machine of Type 'Mac OS X' and Version 'macOS 10.13 High Sierra (64-bit)' (probably others work, but I just tried with that one).
  15. Once the machine is created, go to the 'Settings'.
  16. Select 'Storage' and click to add a hard disk. When asked click on 'Choose existing disk' and select the .vdi file you created using VBoxManage convertfromraw.
  17. Click 'OK' and start the machine.
  18. Wait until you get to the screen where you have to choose the language. And choose your language.
  19. 'macOS Utilities' appears. Select 'Disk Utility' and click 'Continue'.
  20. Select the disk where you are going to install macOS (probably the same you created when creating the machine).
  21. Click 'Erase'.
  22. Verify that 'Mac OS Extended (Journaled)' is the format selected and click 'Erase'.
  23. Once it finishes, Quit the 'Disk Utility'.
  24. Select 'Install macOS' and click 'Continue'.
  25. Follow the instructions.
  26. Once it finishes, the machine automatically rebooted. What you have to do is power it off.
  27. Remove the installer hard disk from the machine. The one you added previously, not the one where you are installing macOS.
  28. Start the machine.
  29. You are going to see a screen where the last line is Shell>
  30. Run cd 'macOS Install DataLocked FilesBoot Files'
  31. Run boot.efi
  32. Continue the installation normally.

Install Macos On Ubuntu Virtualbox Windows 10

References: