MusicDin / kubitect

Kubitect provides a simple way to set up a highly available Kubernetes cluster across multiple hosts.

Home Page:https://kubitect.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bridged network and qemu-agent

Kantankerus opened this issue · comments

Just wanted to call out that if you want to use a bridged network, whatever cloud image you end up using seems to require that the qemu-guest-agent package be built into the image. If the upstream vendor does not do this (Ubuntu), you need to customize the image yourself. In my case, simply switching from Ubuntu vendor image to CentOS vendor image (vendor includes qemu-guest-agent by default in their cloud image) just made everything work. Not sure if you want to call this out in your README or not, just wanted to share.

Also, thank you for building this, very, very cool.

Hi, I'm glad you like the project.

Thanks for pointing out this issue. That's very interesting, because cloud_init should make sure that qemu-guest-agent is installed and running.

Take a look at this code snippet from templates/cloud_init/cloud_init.tpl:

...

packages:
  - qemu-guest-agent

runcmd:
  - [ systemctl, enable, qemu-guest-agent.service ]
  - [ systemctl, start, qemu-guest-agent.service ]

So, could it be that other cloud images (besides the CentOS image) are not missing the 'qemu-guest-agent' package, but the 'cloud_init' package? Could you please provide the URLs of the images that do not work?

For Ubuntu, for example, I use images from this site https://cloud-images.ubuntu.com/ and they seem to work just fine.

Are you using static IPs or DHCP leases?

If you are using static IPs, the problem could have been the DNS.
When VM with static IP was created, no default DNS was specified (this was not the case when using DHCP because DHCP server passes nameservers to the client). That probably resulted in qemu-guest-agent not being installed on boot.

I fixed that in cab0d3c commit. Now gateway is added as a primary DNS server, and Google's well known 8.8.8.8 DNS as a secondary.

I would appreciate, if you could verify that was the case.