These instructions allow you to create a VirtualBox VM on a MacOS Sierra instance.
- Default settings
- Getting a CentOS 7 image
- Setting up CentOS 7
- Networking CentOS 7
- Installing the guest additions
Change the host key combination to be the right Cmd key (usually use the left one for copy/cut/paste). In virtual box get the preference menu (Cmd-,
) then:
Input -> Virtual Machine -> Host Key Combination
Download a CentOS 7 iso
Get something like:
CentOS_7_1611-VB-64bit.7z
Unpack:
7z e CentOS_7_1611-VB-64bit.7z
This produces a file like: 1611-64bit/CentOS 7-1611 (64bit).vdi
Bit strange but 1611-64bit is an empty directory and it producesthe file CentOS 7-1611 (64bit).vdi outside the hierarchy.
On virtual box click on New
. Name it. Type Linux
, Version Red Hat (64-bit)
. Press on Continue
.
Memory size 80192Mb
. Press on Continue
.
Use an existing virtual hard disk
. Copy the virtual CentOS instance.
Change the UUID of a vdi image if it has already been used.
VBoxManage internalcommands sethduuid ./centos7.vdi
Otherwise you get an errror:
Failed to open the disk image file /Volumes/Maxtor/iHUB3/CentOS 7-1611
(64bit).vdi.
Cannot register the hard disk '/Volumes/Maxtor/iHUB3/CentOS 7-1611
(64bit).vdi' {f100ba78-ce0a-42cd-b538-ee0fa403fcfd} because a hard
disk '/Volumes/Seagate/iHUB3/CentOS_7-1611-64bit.vdi' with UUID
{f100ba78-ce0a-42cd-b538-ee0fa403fcfd} already exists.
Result Code: NS_ERROR_INVALID_ARG (0x80070057)
Component: VirtualBoxWrap
Interface: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
Choose:
Use an existing virtual hard disk file
Click on the folder and go to the disk image.
Start the VM.
Intial password: osboxes.org
Initial Welcome screen, pick: English (UK)
TBD
The guest additions facilitate the interation between the host and the guest OS. Get the Guest additions for the virtual box app from the downloads page:
This is needed for the host OS.
You also need to get a download for the guest OS:
You need to get the download for your version of virtual box. Before you can install you will need to have the following modules installed (as bits of the kernel are compiled):
yum install gcc
yum install kernel-devel
Now mount the iso image you downloaded
Storage->Controller: IDE->Empty->Click on the CD in Optical Drive
Once you have mounted the ISO image it may try to run the necessary scripts automatically or as root on the guest OS:
cd /run/media/<Your User id>/VBOXADDITIONS*
./VBoxLinuxAdditions.run
reboot