crc-org / snc

Single Node Cluster creation scripts for OpenShift 4.x as used by CodeReady Containers
https://crc.dev
Apache License 2.0
100 stars 49 forks source link

gvisor-tap-vsock 'vm' process runs when it should not #699

Open cfergeau opened 1 year ago

cfergeau commented 1 year ago

With recent podman bundles, the gvisor-tap-vsock runs even with system networking. This is because the VM ethernet interface is named enp2s0 while the vm process stops by default when eth0, ens3 or enp0s1 are present: https://github.com/containers/gvisor-tap-vsock/blob/7d1dd1cee41e90ee92bf545fef69bf8c7b468c1b/cmd/vm/main_linux.go#L40

One way of fixing this would be to set a fixed name for the interface: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/consistent-network-interface-device-naming_configuring-and-managing-networking

cfergeau commented 1 year ago

The enp2s0 naming comes from the address node of the libvirt XML definition:

    <interface type='network'>
      <mac address='52:fd:fc:07:21:82'/>
      <source network='crc'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </interface>

(pci bus 2 slot 0 -> p2s0)