Mac Virtualbox Centos



Centos

Share files between two SO is easy because there are different protocols for sharing resources (NFS, CIFS/SMB/Samba, FTP, …), but sharing files between two PCs with OS Linux based, and one of them as VM guest of another one is a bit more complicated. Here’s how to do it when we Mac OSX as HOST and CentOS as GUEST:

Steps

Mount DVD ISO image in CentOS VirtualBox guest

Install VirtualBox. Many of you may already have VirtualBox, but if you don’t, click here to download. Gotcha, this is CentOS 6.3 and yeah for some reason its not picking up the change in the virtual MAC address as configured in Virtualbox. Not a showstopper as its easy enough to fix, but when I have some time I'll poke around some CentOS boards and see if I can figure out why it acts this way, based on some of the things I read Ubuntu doesn't.

  1. Previously, I have download DVD ISO image, then I have copied to my Mac OSX Host.
  2. From Virtual Box menu, goes to Devices > CD/DVD Devices and mount selecting CentOS’s DVD ISO image (ISO previuosly added to VBox’s “Virtual Media Manager”).
  3. In CentOS guest now you can see DVD iso mounted as /media/CentOS_5.5_Final.
  4. You can install packages directly off the mounted DVD ISO. Now, modify /etc/yum.repos.d/CentOS-Media.repo file, enter:
  5. Make sure enabled is set to 1:
  6. Save and close the file. To install packages from only DVD media repo, do this:

    Notes:

    • –disablerepo=*: disable all yum repo
    • -y: assume yes to any question which would be asked
    • –enablerepo=c5-media: enable c5-media repo

Install Virtual Box Additions in CentOS guest

Before anything, It is necessary install some packages as compiler gcc, kernel libs and sources.

  1. Install the following packages with CentOS DVD ISO image mounted:
  2. Unmount CentOS DVD ISO image and mount Virtual Box Guest Additions in your CentOS guest:
  3. Restart CentOS guest
  4. Now, install VBoxGuestAdditions in CentOS guest:
  5. Restart CentOS guest again.
  6. Now you could use special functionalities as resize the guest windows, share files, etc…

Share files beetwen Mac OS X as Host and CentOS as Guest

  1. In your Host Linux box:
  2. In main menu of your Linux Guest’s Virtual Box:
    • Go to Devices > Shared Folders
    • In popup, add shared folder and select Host’s folder ( /Users/chilcano/files2share ), set up a name as files2share and make permanent.
  3. In your Guest Linux box opens a terminal window and create a new directory where you’ll mount shared folder
  4. In this terminal, enter the id command and look the output. We will use uid and gid:
  5. Now, we will mount shared folder from Host to Guest. From terminal in Guest Linux:

    Make the Mounted Share permanent

You can make the shared folder mount automatically each time you start the CentOS guest by making an entry in /etc/fstab.

  1. From the CentOS guest edit fstab:
  2. Add a line at the bottom of file, and that looks like this:
  3. Verify mounted folder: In Mac OS X (host):
    In CentOS (guest):

Mac Virtualbox Centos Ssh

Hope it helps.

References :

  • CentOS: Install Packages Via yum Command Using DVD / CD as Repo
    • http://www.cyberciti.biz/faq/centos-linux-install-packages-from-dvd-using-yum/
  • Implementing virtualbox shared folders between a Mac OS X host and Fedora guest
    • http://davidherron.com/content/implementing-virtualbox-shared-folders-between-mac-os-x-host-and-fedora-guest
    • http://forums.virtualbox.org/viewtopic.php?t=4960&highlight=install+guest+addition
  • How to install Guest Additions in CentOS 5.1
  • Share Folders Between a Linux Host and Linux Virtual Machine on VirtualBox
    • http://tuxtweaks.com/2009/06/share-folders-linux-host-linux-virtual-machine-virtualbox/

Mac In Virtualbox

Hi Everyone.

Mac Virtualbox Centos 7

I am using Mac Book Pro Laptop. I installed Centos 7 DVD ISO image from centos.org on my virtualbox. I am having trouble with the mouse pointer. When i open the terminal, i am able to type in commands. If i minimize the terminal and open a web browser to read something for a while and switch back to terminal, i am able to type the commands but not able to see the mouse pointer inside the terminal. If i turn off the mouse integration in the tool bar, i am able to see the pointer inside the terminal but not able to do anything i.e, i am not able to move the cursor outside the terminal or open a web browser. I am not able to copy and paste any link from web browser in the terminal and same vice versa. I have drag and drop, clipboards option bi-directional. I am facing this difficulty since long time and not able to fix it. It is such pain that i have to close the terminal and open it again if i open and use any other application. Not able to use Centos 7 compatibly. Please help and provide suggestions.

Virtualbox Centos Image

Thank You.