Why can't I Ping my virtual machine or SSH into it?
When you have started your virtual machine, you obviously want to connect to it. However, you can't seem to Ping it or SSH into it.
There are two possible reasons for this:
Virtual machine has no public IP address
A newly started VM will get an internal IP address from a 10.x.x.x network. These addresse are not reachable from the Internet. You will need to assign a so called "floating IP" address:
- In the left column of the dashboard interface, click on Project -> Network -> Floating IPs
- Click on Allocate IP to project - you will see a new public IP (130.59.x.y) being listed in the table below
- You can now associate this IP to a running virtual machine
The default security group has no entries for ICMP and SSH traffic
There is a firewall functionality, that protects all running virtual machines by not allowing any kind of traffic to enter the virtual machine. You will need to selectively open the ports your machine needs. The firewall rules are managed in so called "Security Groups". There is a "Default Security" group that will automatically be assigned to all your virtual machines. In a new setup, this default group is empty, so you will need to add rules for ICMP (Ping) and SSH traffic (or RDP if you run Windows machines)
- In the left column of the dashboard interface, click on Project -> Network -> Security Groups
- Click the Edit Rules button next to the default group
- Click on Add Rule and create a rule for
- All ICMP traffic
- SSH (port 22)
- If you are not sure what the Remote and the CIDR fields mean, leave the default values
As soon as you have added the rules, your VM will be accessible on the specified ports.
You will have to do the same thing if you plan to run services on the VM that need to be accessible from outside. We recommend that you create new, specific groups for these cases (for example a Web group with ports 80 and 443 open) and assign those security groups to your VMs (via the Instances view, and the Edit Security Groups menu entry in the dropdown menu for a specific instance)