VM with a direct public IP: console walkthrough¶
The same result as the step-by-step guide, done in the console.
1. Create the public subnet¶
The subnet comes first, because the VM has to be created inside the project the subnet creates. Networking > Subnets, then Create Subnet, with Type set to Public - the fields and the failure modes are covered in the subnets console walkthrough.
Pick the range, nothing else
The form asks for a name, a type and a range. The platform reserves the addresses it needs from that range on its own, so there is nothing to work out. See the address table.
2. Create the VM¶
Switch the perspective selector to Virtualization, make sure the project selector reads the project the subnet created, and use Create.
There is no network to choose. A VM created in that project attaches to the subnet automatically and takes an address from it - which also means the Create flow shows you no public-address field at any point.
Two things belong in the VM's cloud-init, because nothing on the platform does them for you:
- an SSH key, since the VM is reachable from the internet as soon as it boots
- firewall rules for whatever it serves, such as
httpandhttps
3. Find the address¶
The VM's Overview shows it under Network, beside the interface name.
That address is on the VM's own interface. There is no Service and no load balancer in
front of it, so it is the address for every port the guest opens, and the address the
internet sees on outbound connections too.
The Console tab gives a VNC session for when SSH is not reachable - useful precisely because a firewall mistake in the guest can lock you out of the address itself.
Change¶
There is no address field to edit; the address comes from the subnet. Publishing a different port is a change inside the guest's firewall, not in the console.
Delete¶
Deleting the VM releases its address back to the subnet but leaves the subnet in place. To remove the subnet as well, delete its three objects in order - the advertisement first, since it is not cascade deleted with the network. See Delete.
Where the console differs from the CLI¶
| Console | oc |
|
|---|---|---|
| Attaching the VM to the subnet | Automatic, no field shown | Automatic, no field in the manifest |
| Seeing the address | Network card on the VM Overview | oc get vmi |
| Recovering from a guest firewall mistake | Console tab, VNC | No path in - fix it from the console |
| Deleting the subnet | One object at a time | Same - the advertisement first |