I'm having issues trying to setup GitLab on my Ubuntu server, running inside VirtualBox on Mac OS X. Copy/Paste does not work.
I have installed guest additions and have changed the host-key to right-CMD (where it was previously left). I have also turned on bi-directional support.
Now of the above work, so I'm really stuck and need to copy/paste code from the GitLab page to install it.
Any ideas?
52 Answers
Since you as well asked how to do it the cool way (ssh) I'll cover that, only thing for you to find out is how to get ssh on your MAC since I have never touched and never will touch one.
1. Preparation:
Open virtualbox and go into the preferences via menu, go to the network tab and click on the little plus icon under host only networks, this will add an adapter called vboxnet0.
After you have done that enter the preferences of the VM itself and switch there to the network tab and click on port forwarding on Adapter 1 and enter after a click on the plus sign your credentials like shown in the pictures below.
NOTE: You can SSH directly from your Mac OS X system to your VM system if it's NAT'd and on the same system; You don't need to configure Port Forwarding unless you want systems outside of the system running VM to reach the system. (included from comment as I never had or will never own a MAC i cant check on that, for an Ubuntu host it is definitively needed).
After that you go to the Adapter 2tab and enable this adapter and set it to be attached to the host only adapter named vboxnet0.
2. Logging in:
As i already said I have never touched a max but i assume the commands should be the same or near same so I will put here the commands used on an Ubuntu host to give you a lead on. To log in to your VM you start it in --headless mode in terminal (I leave the Kali-Linux in but you should replace that with your VM's name):
vboxmanage startvm "Kali-Linux" --type headlessNow wait a moment your VM still need to boot up even if it shows no window then log into it with:
ssh -l <user-name> localhost -p 2222You will then be prompted for the user password on your VM and after that logged in, now the lines you see in your terminal are lines you see and type in your VM.
To shutdown you have two options I prefer mostly the first.
shutdown from within the VM
shutdown -h 1 logoutshutdown from terminal
logout vboxmanage controlvm "Kali-Linux" poweroff
There is no way to use Shared Clipboard functionality as you think between the Mac and the VirtualBox VM directly.
Ubuntu Server does not implement a clipboard function on a default (and I don't know if you even can). This prohibits your use of the clipboard in the manner you're trying to achieve.
The only way to achieve this would be to SSH from your Mac OS X to the Ubuntu Server guest OS, using the IP assigned to the virtual guest:
ssh user@x.x.x.x(where x.x.x.x is the IP assigned to the guest VM, and this whole command is run from Mac OS X's terminal).
(You could also use PuTTY or a similar SSH client to SSH to the Guest VM.)
You can then copy/paste from Mac OS X into the Mac OS X terminal window text. You can not use this for file transfer, but you will be able to copy/paste commands to run, etc. and execute them that way.
Note that if you are trying to get a system OTHER than the system running VBox to reach the system, you have to set up port forwarding as detailed in other answers here. If Mac OS X is running VirtualBox and the VM, then you don't need to do the NAT port forwarding steps.