Vagrant + Virtual Box - Virtual host not accessible - virtualbox

I have a Vagrant set up on my machine which uses Virtual Box. When I start Vagrant and ssh into it, the Virtual Box VM starts up. I can ping the server. But I cannot access the url I set in the hosts file via my browser. I've removed the browser's proxy as well.
Any step that I need to do to get it running?
Note: I'm on Windows 7, using Vagrant 1.5.1 and VirtualBox 4.3.8.

If you can ping the server on the IP and port that you've setup your webserver, very likely the issue is with your webserver's config and how it responds to external IPs
As an example, installing Apache on the precise image requires you to 'listen all'

Related

Not able to connect remote floodlight controller to mininet

I am new to mininet and I was trying to build a mininet topology which uses a remote SDN controller.
I tried using floodlight as the remote controller. I installed it and ran it and it is running on "localhost:6653". But it is also running on 192.168.122.1:6653 (And I have no idea why).
192.168.122.1 is my virbr0 interface's address. In my mininet VM which is in virtualbox i have two network adapters.
NAT
Host only adapter
And for host only adapter i have the following configuration.
Adapter settings:
Ipv4 address: 192.168.56.1 and net mask: 255.255.255.0
DHCP server settings: Sever ip= 192.168.56.100; net mask= 255.255.255.0; Lower bound Ip: 192.168.56.101; Upper bound Ip: 192.168.56.254
To avoid confusion i have added the screenshots as well.
I tried the following command to build my topology:
sudo mn --controller=remote,ip=192.168.122.1,port=6653
I get the following response from mininet
Unable to contact remote controller 192.168.122.1:6653
I have tried changing ip to 192.168.56.1 but that also didn't work.
Any kind of help will be appreciated.
Thanks.
As per your setup, I guess FLC is running on Host OS and mininet is running in Oracle VM.
Your Host-Only network is useful if you are trying to reach something deployed in VM from your Host Os.
It will not work other way around. Here you want to access FLC running on Host inside your VM.
I would suggest using Floodlight VM for Virtual Box. It has mininet and FLC inbuild.
Once imported. Start VM.
Credentials: floodlight/floodlight
Inside VM start FLC
Do ifconfig ithe n terminal and get IP
change to that IP in this
sudo mn --controller=remote,ip=192.168.122.1,port=6653
and execute, all will work fine.
You can access FLC in Host using above IP

Local Server not loading in Ubuntu VirtualBox

I have laravel app which is running in my windows local server. This laravel app is running port:80. I want to load this app in my Ubuntu VirtualBox.
My IP Config:
IPv4 Address : 192.168.8.157
Subnet Mask : 255.255.255.0
Default Gateway: 192.168.8.1
I have config my virtualbox as Bridged Adapter. In my /etc/hosts (ubuntu virtualbox), I have this :
127.0.0.1 localhost
127.0.1.1 asus
192.168.8.157 v2.my.local
I have made a hello word app (node.js) in my local windows which is running on port :3000, and it is running in my VirtualBox by typing v2.my.local:3000, but if I type v2.my.local on my VirtualBox, it is not working (although app is running on windows local machine). it says:
This v2.my.local page can’t be found
Any suggestion? Thanks in Advance.
May be windows firewall blocking connections via port 80. turn off firewall and try it, if it works. Start windows firewall and add firewall rule to allow connections via port 80. If your windows version is 10 then, it will block all virtual box related connections. make sure to add correct rules.

how could i connect to Ambari from hortonworks through url "sandbox.hortonworks.com:8080"?

i got installed Hortonworks data platform (HDP 2.4) on oracle virtual box, when i trying to use storm streaming analytics it uses to connect ambari by url
sandbox.hortonworks.com:8080
instead of
127.0.0.1:8080
loop back address and i got an error message over browser
Error : This site can’t be reached
so tell me that how could i assign
sandbox.hortonworks.com:8080
domain name to loop back address from virtual machine OS terminal.
Just add this line
127.0.0.1 localhost sandbox.hortonworks.com
to-
If you're on a windows machine, this file
%systemroot%\system32\drivers\etc\hosts
If you're on a Mac, then, this file
/etc/hosts
This will need to be done for your host machine(the one on which you installed VirtualBox) and not inside the VM.
If you are using bridged mode or host-only-adapter, replace the 127.0.0.1 with your VM's IP, so it should look like
192.168.56.101 localhost sandbox.hortonworks.com
That should help you use the FQDN.

Install proxmox 4.1 on VirtualBox

I installed proxmox 4.1 on virtual box and after installationI received the following :
welcome to the proxmox virtual environment.please use your web browser to configure this server - connect to:
https://192.168.56.101:8006
but while trying this https://192.168.56.101:8006 in the browser it is not working
can someone advice !
Check if the VirtualBox Machine Network Adapter is in Bridge Mode. And check that your host and the vm are in the same IP rank (Ex: Windows: 192.168.1.50 & Proxmox: 192.168.1.70)
Your network adapter in VirtualBox has been set to host-only. If you want to connect to it with your PC you'd better set-up bridged networking.
Also when you've did that, change your /etc/hosts file on the Proxmox hosts so that it won't give you any errors while setting up the webserver or any optional clusters.

how to access django development server on virtual machine from actual computer

Okay so I have my actual laptop which has vmware player installed. I am running lubuntu as a virtual machine and I installed django on the virtual machine and am testing my app so I did python manage.py runserver and I can access the app by visiting 127.0.0.1:8000 from my VM, however, If I go to 127.0.0.1:8000 from the actual computer (not the VM), it says 'chrome could not connect to 127.0.0.1:8000'.. Any idea how to fix it?
You can try running the server on 0.0.0.0
python manage.py runserver 0.0.0.0:8000
The IP address 0.0.0.0 means "all IP addresses on the local machine" (or all IPv4 addresses on the local machine).
Next, you will need the ip address of your VM. Visting http://<ip_address_of_vm>:8000 on other computers should access the django development server on your VM.
Note: If your VM only has an internal IP (e.g. 192.168.x.x) then only computers on the same network can visit the VM.
I was able to get #Kerberos answer to work. (not enough points to comment so I'm adding it as a seperate answer).
I am running Ubuntu 12.04 LTS in a guest OS in VMWare. The host laptop is running Windows 8.
As mentioned by Kerberos, in VMWare, go to Player ==> Manage ==> Virtual Machine Settings...
On the Hardware tab, select Network Adaptor, then select the radio button for Bridged: Connect directly to the physical network. Select OK
In the VM, the network connection information should now have the same IP address of the host OS internet connection. In my case: 192.168.1.141 (yours will vary).
In the VM, start Django using python manage runserver 192.168.1.141:8000
Using this method, I am able to access the webserver running in the VM at this IP address from within the VM, from host machine, and from other systems on the same 192.168.1.xxx network.
to access virtual machine (guest) from outside the host computer, you have to set the guest network mode to bridge
Bridge-mode connects the guest to the actual network so that other machines can connect to it