PHPStorm cannot see PHP interpreter for Windows Guest using Vagrant - windows

Due to a legacy project, I am running Windows Server 2008 R2 Standard with Ampps using Vagrant. This is the environment I am stuck using for now...
My issue is that I cannot seem to get PHPStorm to see the interpreter. When I go to the interpreter settings, I select Vagrant and I can choose my vagrant directory that contains the vagrant file and set the local location of the php.exe file. It just gives me an error saying:
PHP Version: Not installed
Debugger: Not installed
When I try to verify the interpreter, I get the error:
Can not update phpinfo: Can't connect to remote host ssh://vagrant#127.0.0.1:22C:\Ampps\php\php.exe
I would assume the issue is that PHPStorm is connecting using ssh instead of rdp.
Is there any work-a-round for this or is this not possible?
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "opentable/win-2008r2-standard-amd64-nocm"
config.vm.hostname = "freshHub"
config.vm.communicator = :winrm
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# xdebug
config.vm.network :forwarded_port, host: 33389, guest: 3389, id: "rdp", auto_correct: true
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.20"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
config.vm.network :public_network, ip: "10.1.1.21", :netmask => "255.255.255.0", bridge: 'wlan0'
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
config.vm.synced_folder "~/Sites", "C:/Sites", :mount_options => ["dmode=777","fmode=777"]
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
config.vm.provider "virtualbox" do |vb|
# Set VirtualBox VM Name
vb.name = "freshHub"
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:vagrant
vb.memory = "4096"
end
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
#config.vm.provision :shell, inline: "C:\Ampps\Ampps.exe", run: "always", privileged: false
# C:\Ampps\Ampps.exe
end

You try to connect on your Vagrant OS in loopback IP (127.0.0.1) but your Vagrantfile notice that the IP for him is 192.168.33.20 or 10.1.1.21.

Related

The following SSH command responded with a non-zero exit status after upgrade to Ubuntu 18.04

I have a small problem with setting up my working environment after upgrade to Ubuntu 18.04. Vagrant version is 2.0.0.
Vagrant File
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "debian/jessie64"
# config.vm.box = "ubuntu/xenial64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
config.vm.network "forwarded_port", guest: 80, host: 8888
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder ".", "/vagrant-nfs", type: :nfs, mount_options: ['rw', 'vers=3', 'tcp', 'fsc' ,'actimeo=2']
config.bindfs.bind_folder "/vagrant-nfs", "/srv/bspotted.net/app", :owner => "vagrant", :group => "vagrant"
config.vm.network :private_network, ip: "192.168.33.15"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--name", "bspotted", "--memory", "2048"]
end
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
# Ansible provisioner.
config.vm.provision "ansible_local" do |ansible|
ansible.version = "2.3.2.0"
ansible.install_mode = "pip"
ansible.provisioning_path = "/srv/bspotted.net/app"
ansible.playbook = "orchestration/vagrant.yml"
ansible.verbose = "vvv"
end
end
For the record I have an older version Ubuntu 16.10 on my other laptop and everything is working properly, this is the output of the vagrant up --debug &> vagrant.log command here.
Everything fall apart when setup reach
==> default: Preparing to edit /etc/exports. Administrator privileges will be required...
==> default: Mounting NFS shared folders...
after aprox 5 minutes, it will show
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mount -o vers=3,udp,rw,vers=3,tcp,fsc,actimeo=2 192.168.33.1:/home/copser/Documents/Bspotted /vagrant-nfs
Stdout from the command:
Stderr from the command:
mount.nfs: Connection timed out
Problem is solved after I've changed the version of nfs,
`config.vm.synced_folder ".", "/vagrant-nfs", type: :nfs, mount_options: ['rw', 'vers=3', 'tcp', 'fsc' ,'actimeo=2']`
to
config.vm.synced_folder ".", "/vagrant-nfs", type: :nfs, mount_options: ['rw', 'vers=4', 'tcp', 'fsc' ,'actimeo=2']
just to make it clear I've changed vers=3 to vers=4, and no everything is working fine. You can check my correspondence with vagrant contributors here.

Vagrant: * Unknown configuration section 'disksize'

During the configuration of Vagrant environment on my machine I've received this message:
Vagrant:
* Unknown configuration section 'disksize'.
It was shown after the plugin has already been installed.
Here is the vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "bento/ubuntu-16.04"
config.disksize.size = '150GB'
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 8888, host: 8887
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network :private_network, ip: "192.168.33.12"
config.vm.hostname = "dsvm"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "./shared_directory", "/shared_directory"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
#vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "4096"#"2048"
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
#config.ssh.username = 'root'
#config.ssh.password = 'vagrant'
#config.ssh.insert_key = 'true'
#fixing_scripts
config.vm.provision :shell, path: "./shared_directory/install_scripts/fixing_scripts.sh"
#install_various_tools
config.vm.provision :shell, path: "./shared_directory/install_scripts/install_various_tools.sh"
#install_java
config.vm.provision :shell, path: "./shared_directory/install_scripts/install_java.sh"
#finalize_instalations.sh
config.vm.provision :shell, path: "./shared_directory/install_scripts/finalize_instalations.sh"
# Install R:
config.vm.provision :shell, path: "./shared_directory/install_scripts/install_R.sh"
# Install Docker:
config.vm.provision :shell, path: "./shared_directory/install_scripts/install_docker.sh"
# Adjust size :
config.vm.provision :shell, path: "./shared_directory/install_scripts/adjust_size_1.sh"
config.vm.provision :shell, path: "./shared_directory/install_scripts/adjust_size_2.sh"
#config.vm.provision "shell", inline: <<-SHELL
# some bach commnads to run in 1st "vagrant up"
#SHELL
config.vm.provision "shell", run: "always", inline: <<-SHELL
sudo su -
source /root/.bashrc
sudo -H jupyter notebook --notebook-dir=/shared_directory --no-browser --ip=0.0.0.0 --port=1565 &
SHELL
#Vagrant.configure("2") do |config|
# config.vm.provision "chef_solo" do |chef|
# chef.add_recipe 'apt'
# chef.add_recipe ''
# end
#end
end
I've tried changing the capacity of disksize.size to a smaller size, but without success.
What could be the problem?
Thanks in advance
You need to install the plugin:
vagrant plugin install vagrant-disksize

openshift installation on centos7 (vagrant virtual box on windows) is causing errorwith ports 80 and 443

I have a windows machine on which i have centos7 running inside virtualbox.
I am trying to install redhat openshift and make it work. enter code here
The necessary steps are on https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md#linux.
Please help me resolve the following error.
I am getting the following error:
[root#localhost vagrant]# oc cluster up
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.4.0-alpha.1 image ... OK
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ...
WARNING: Port 80 is already in use and may cause routing issues for
applications.
WARNING: Port 443 is already in use and may cause routing issues for
applications.
FAIL
Error: Cannot get TCP port information from Kubernetes host
Caused By:
Error: cannot start container
db018a9349dda92ddb8d3cb95899de17698d059ca9ba68264fa72e03dcec0816
Caused By:
Error: API error (500): Failed to initialize logging driver: journald is not
enabled on this host
Here is my vagrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "boxcutter/centos72-desktop"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 6080, host: 80
# config.vm.network "forwarded_port", guest: 6443, host: 443
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
end

Vagrant SSH error

When i do
vagrant ssh
i get
Administrator#WIN-NJMOO12L1J5 MINGW64 ~/Homestead (master)
$ vagrant sshssh_exchange_identification: read: Connection reset by peer
and i've tried booting with GUI and nothing is changed when i try to start with it, so i have probably done something wrong.
and i've seen that people say that i have to enable Intel® Virtualization Technology but my host doesnt alow that, so i dont know how to fix that.
Specs:
Windows Server 2012 r2
64bit
Ram 1gb
intel xeon e5 2697 v3 2.60 ghz
Vagrant file:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "laravel/homestead"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "./virtualbox.box"
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
Vagrant.configure("1") do |config|
config.vm.boot_mode = :gui
end
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
end
Any help would be appreciated

Vagrant - PhpStorm - Laravel - HTTP Where can I access my local website?

I am new to to Php/Laravel and VMs world.
I booted up vagrant with this Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "laravel/homestead"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "./devpeople", "/home/vagrant/devpeople"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
end
I've tried expirimenting using vagrant commands from their documentation, plus modifying the Vagrantfile without success.
What I want is a similar "site mapping" expirience, just like when you edit the Homestead.yaml file. Plus what is supposed to be the default way?
create a folder in your host machine something like
c:/projects/devpeople
Modify your Vagrant file like this
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8080
or you can change the port like this
config.vm.network "forwarded_port", guest: 80, host: 8081
see below
create a folder in your virtual machine
vagrant up
vagrant ssh
cd var/www
mkdir devpeople
So your virtual machine should have a folder like this
/var/www/devpeople
Then you can put your projects in your host machine
So the Vagrant sync folder will look like this
config.vm.synced_folder "c:/projects/devpeople", "/var/www/devpeople"
Run
vagrant up
and access your development site
localhost:8081
If the folder does not "sync", run
vagrant halt
to restart vagrant
then
vagrant up
You will need to forward ports from within your VM to the host. Here is an example from my Vagrantfile for Payara:
config.vm.network :forwarded_port, guest: 4848, host: 4849
config.vm.network :forwarded_port, guest: 8080, host: 8081
So because I know that Payara uses ports 4848 and 8080 by default, I have forwarded them to similar ports on my host (to avoid clashes).
So if I went to http://localhost:4849 after running vagrant up, I would be redirected to port 4848 within the VM, as though it was running locally.
Looking into the Laravel documentation, it looks like the following ports are the ones you need to make sure are available:
SSH: 2222 → Forwards To 22
HTTP: 8000 → Forwards To 80
HTTPS: 44300 → Forwards To 443
MySQL: 33060 → Forwards To 3306
Postgres: 54320 → Forwards To 5432
The docs imply that this is done by default, though, so you may want to try using them first to make sure.
Well I missed a vital step in the laravel documentation. The proper way to setup your vagrant box is by cloning the "setup" files from the
laravel/homestead repository.
So in order to access the server you simply edit the sites, on the Homstead.yaml file.

Resources