Vagrant up command expects rsync to be in the path. This can be provided by Cygwin.
Install Cygwin and add rsync tool to install image.
Add "%CYGWIN_HOME%\bin" to windows path.
Standard install
Standard install. SSH port 22 is automatically mapped to localhost:2222
Use vagrant to install centos v7
mkdir vagrant-dir
cd vagrant-dir
vagrant init centos/7
vagrant up --provider virtualbox
By default, CentOS doeant allow remote conections (e.g. using Putty)
Dutring install, enable the network adapter and auto connect.
Putty provides a more flexible command line to the VBox VMs.
Find out the IP address to connect to.
On the Guest OS:
ip addr
This will list all network adapters; for Centos 6.6 we are interested in eth0.
Set-up Port Forwarding
From the VM windows menu bar, select "Devices|Network|Network Settings..."
Select Network from left hand pane, then select "Adapter 1" tab.
Select "Port Forwarding" and add a new entry:
localhost:2222 to guestIPAddress:22
This forwards connections to port 2222 on the host to port 22 on the Vbox VM.
Adding VirtualBox Guest Additions: Detailed instructions here
NOTE: If using Vagrant, it adds the guest additions for you.
For Centos-6.6, I used the following commands:
Load some dependencies required to build the VBoxLinuxAdditions
yum install gcc
yum install kernel-devel
Mount the Guest Additions CD
From the VM windows menu bar, select "Devices|Insert Guest Additions CD image..."
From within the guest OS, create somewhere to mount the CD image:
mkdir /mnt/cdrom
Now mount the CD image.
mount /dev/cdrom /mnt/cdrom
Launch the install tool:
./VBoxLinuxAdditions.run install
The OpenGL module fails for non-GUI installs
Shared folders allow you to persist changes made in a VM to the host file system. (Requires Guest additions to be installed)
Devices|Shared Folders|Shared Folders Settings...
Create an entry that points to a folder on your host system that you want to share.
In the Target VM, mount the folder using the share_name you gave it:
mount -f vboxsf share_name /mnt/folder_name
When a VPN connection is active the Windows firewall seems to disable the local network if a VirtualBox Network Adapter is present. This article explains this issue and presents the following 'powershell' script as a fix:
# tell windows that VirtualBox Host-Only Network Adapter
# is not a true network interface that connects to a network
# see http://msdn.microsoft.com/en-us/library/ff557037(VS.85).aspx
pushd
echo 'Marking VirtualBox Host-Only Network Adapter as a virtual device.'
cd 'HKLM:\system\CurrentControlSet\control\class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
ls ???? | where { ($_ | get-itemproperty -name driverdesc).driverdesc `
-eq 'VirtualBox Host-Only Ethernet Adapter' } |`
new-itemproperty -name '*NdisDeviceType' -PropertyType dword -value 1
echo 'After you reboot the VirtualBox Host-Only Network unidentified public network should be gone.'
popd