Ah, so I found this:
"The communication mechanism will be enabled automatically during an installation procedure that requires a virtualized environment, but, for backwards compatibility, it will be disabled when the instance is running normally, unless explicitly requested. Specifically, a new parameter --communication=yes|no (short version: -C) will be added to gnt-instance add and gnt-instance modify. This parameter will determine whether the communication mechanism is enabled for a particular instance. The value of this parameter will be saved as part of the instance’s configuration."
But this by itself is not enough:
# gnt-instance modify -c yes lxd1
Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
ip=pool, but no network found
The design doc talks about a DHCP server, but I don't know how to configure its pool. I have not created any gnt-network yet; perhaps one is needed by metad?
<...digs further...> I found that gnt-cluster has an option "--instance-communication-network", which should create the network if it doesn't exist. Here we go:
# gnt-cluster modify --instance-communication-network cloud-init
Sat Jul 8 17:57:31 2017 Changing instance communication network to 'cloud-init', only new instances will be affected.
Submitted jobs 1737
Waiting for job 1737 ...
And:
# gnt-instance modify -c yes lxd1
Sat Jul 8 17:58:22 2017 - INFO: Chose IP 169.254.0.1 from network cloud-init
Modified instance lxd1
- nic.1 -> add:mac=52:54:00:01:0a:c7,ip=169.254.0.1,mode=routed,link=communication_rt,network=cloud-init
Please don't forget that most parameters take effect only at the next (re)start of the instance initiated by ganeti; restarting from within the instance will not be enough.
# gnt-instance reboot lxd1
After a "dhclient eth1" inside the instance, I can do:
That's something. So now I need to know what the actual metadata URLs are. Try the EC2 one:
Back to the source code, and after some grepping through haskell:
OK, that's something. Unfortunately without the EC2-compatible resources, I don't think cloud-init is going to work with these without some modifications to the images themselves.
So close...!
Regards, Brian.