A question about the default networking with KubeVirt VMs.
Scenario 1:
I create a VirtualMachine (using ubuntu cloud image),
WITHOUT specifying anything for "domain:devices:interfaces" or "domain:networks".
and
the VM comes up with the CNI interface on my K8S cluster's cluster-pod-subnet (
172.16.103.159/32)
e.g.
cumulus@wrcp-lab-test:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 16:20:1d:97:db:c5 brd ff:ff:ff:ff:ff:ff
inet 172.16.103.159/32 metric 100 scope global dynamic enp1s0
valid_lft 86310303sec preferred_lft 86310303sec
inet6 fe80::1420:1dff:fe97:dbc5/64 scope link
valid_lft forever preferred_lft forever ... this seems understandable ... and all the networking works fine.
Scenario 2:
I create a VirtualMachine (using ubuntu cloud image),
and specify
domain:
devices:
...
interfaces:
- masquerade: {}
name: default
...
networks:
- name: default
pod: {}
and in this scenario,
it comes up with what I think is the basic CNI interface but with a
10.0.2.2/24 subnet IP Address.
e.g.
cumulus@wrcp-lab-test-default-network:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:9f:82:72 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.2/24 metric 100 brd 10.0.2.255 scope global dynamic enp1s0
valid_lft 86313438sec preferred_lft 86313438sec
inet6 fe80::5054:ff:fe9f:8272/64 scope link
valid_lft forever preferred_lft forever ...
... and again the networking all works.
But I don't understand what this 10.0.2.2/24 subnet is ? Is it on the same virtual L2 Network as the cluster-pod-subnet ? and managed by my CNI ?
Greg.