Is the VM is on the default network? Have you added firewall rules to allow HTTP/HTTPS traffic?
default