cloud image network config, virtio-net, libvirt autodetection, and network vs NetworkManager, F20 vs F21

Colin Walters walters at verbum.org
Sun Nov 23 15:57:51 UTC 2014


TL;DR:

KB, I think the CentOS cloud images should use:
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?h=f21&id=98c48cb2b2051cc8ca81e95a697e4c8d7c5bd939

Dennis, we should revert:
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?h=f21&id=5ae38874c7c69057abd41850ad3ca27cd967fa18

Longer story:

I tried the CentOS 7 GenericCloud image:
http://cloud.centos.org/centos/7/devel/
and it didn't have networking on boot.  Let's look at the actors:

- A base cloud image: Fedora 20, Fedora 21, CentOS 7
- Network configuration: As specified in the kickstart
- A network driver: virtio-net, rtl8139
- virt-install guest autodetection:  Determines whether or not you get virtio-net
- network system (or NetworkManager, or systemd-networkd)
- systemd: http://lists.freedesktop.org/archives/systemd-devel/2014-July/020906.html
- Anaconda/kickstart behavior

First, let's look at the current F20:
https://git.fedorahosted.org/cgit/spin-kickstarts.git/tree/fedora-cloud-base.ks?h=f20#n26

It hardcodes eth0. And the version of systemd there uses eth0 for virtio-net.

Now, let's look at some changes Dennis committed in the F21 cycle:

ens3:
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?h=f21&id=e1778df1fe1a035b21085023996c58ecbf3be378

link:
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?h=f21&id=98c48cb2b2051cc8ca81e95a697e4c8d7c5bd939

eth0 (but only for atomic):
https://git.fedorahosted.org/cgit/spin-kickstarts.git/commit/?h=f21&id=5ae38874c7c69057abd41850ad3ca27cd967fa18

(Dennis and others, can you send patches to the list for review?   This issue would have been more obvious if I'd noticed the changes going by)

A really critical variable here is whether or not libvirt guest autodetection works.  Currently:

libvirt automatically provides virtio-net: Fedora 20, Fedora 21 Generic
libvirt gives you rtl8193: Fedora 21 Atomic, CentOS 7

It took me a while to figure out here that the reason the CentOS 7 image wasn't working was becuase of the libvirt autodetection.

I have this utterly trivial "create-cloud-vm.sh" script I've been using:

https://gist.github.com/cgwalters/a366c14b2fc58e0f7367

It does work if I specify --os-variant rhel7 for CentOS7.  Which I'm now going to start doing by default in my script (I don't use it to boot anything else).

But...the change to do DHCP on all links by default is also an important change.  One we should highlight in the release notes.


More information about the cloud mailing list