[kata-dev] vsock & network namespaces in Kata

Montes, Julio julio.montes at intel.com
Wed Dec 4 15:54:06 UTC 2019


Hi Stefano

> - Host: assign the same CID of VMs running in different network
>  namespaces

this means two VMs running in different namespace can use the same CID? currently we use VHOST_VSOCK_SET_GUEST_CID to get a unique context ID, is this going to change?

> 1. Is the VMM (e.g. QEMU) running in a network namespace?

yes, see https://github.com/kata-containers/runtime/blob/62cd08044d78912228d9dc800cb1b8bd3de3b971/virtcontainers/sandbox.go#L1024-L1041

> 2. Is the host application, that use vsock to communicate with the
>   guest, running in the same network namespace?

afaik, no

> 3. Is the agent in the guest running outside a netns (default init_netns)?

yes

________________________________
From: Stefano Garzarella <sgarzare at redhat.com>
Sent: Wednesday, December 4, 2019 4:32 AM
To: kata-dev at lists.katacontainers.io <kata-dev at lists.katacontainers.io>
Subject: [kata-dev] vsock & network namespaces in Kata

Hi folks,
I'm working on vsock on Linux and I'm adding the network namespace
support on it[1].

The main changes are the following:
- Guest: can talk with the host packets (send and receive packets) in
  the default init_netns (maybe we can make it configurable)
- Host: can talk with the guest only in the same netns where the VMM is
  running (e.g. if we start qemu from ns1, all packets are received only
  in ns1)
- Host: assign the same CID of VMs running in different network
  namespaces
- Nested VMs (available from Linux 5.5): isolate host applications from
  guest applications

IIUC you have a runtime running in the host that communicates using
vsock with an agent in the guest.
I have few questions:
1. Is the VMM (e.g. QEMU) running in a network namespace?
2. Is the host application, that use vsock to communicate with the
   guest, running in the same network namespace?
3. Is the agent in the guest running outside a netns (default init_netns)?


If you have any other suggestions, I'd be happy to hear them.

Thanks,
Stefano


_______________________________________________
kata-dev mailing list
kata-dev at lists.katacontainers.io
http://lists.katacontainers.io/cgi-bin/mailman/listinfo/kata-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.katacontainers.io/pipermail/kata-dev/attachments/20191204/e3ff56b8/attachment.html>


More information about the kata-dev mailing list