In addition, the get_state method should also publish the VM's ip address using:
ctx["ip"] = ip_address

For more complicated scenarios (not relevant for now) where the VM has several ip addresses, these should be published as a dict where keys are network names and their value is a list of ip addresses and then:
ctx["ips"] = network_ips_dict