Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmm: setup hosts, hostname and resolv.conf files #100

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

Burning1020
Copy link
Member

If containerd has created these three files, it will append relevant cri mounts to container. If these mounts are defined in Kubernetes Pod Yaml by the end user, they will also exist in container mounts. So anyway, in the above cases, vmm-sandboxer should not append any mounts.

If not, vmm-snadboxer could prepare sandbox files and covert them into oci mounts before sandbox starts. The hostname should be set to either pod hostname or host hostname, the hosts should be set as host, and the DNS should be set either from pod spec or host DNS.

Moreover, it's good to set guest DNS if we want to mount some nfs in guest.

vmm/sandbox/src/container/handler/spec.rs Outdated Show resolved Hide resolved
vmm/task/src/container.rs Outdated Show resolved Hide resolved
@Burning1020 Burning1020 force-pushed the sandbox-dns branch 7 times, most recently from e477400 to dc0a908 Compare January 10, 2024 08:40
@Burning1020 Burning1020 marked this pull request as draft January 10, 2024 08:54
@Burning1020 Burning1020 force-pushed the sandbox-dns branch 4 times, most recently from d20fc0a to ee2c24c Compare January 11, 2024 01:15
If containerd has created these three files, it will append relevant cri mounts
to container. If these mounts are defined in Kubernetes Pod Yaml by the end user,
they will also exist in container mounts. So anyway, in the above cases, vmm-sandboxer
should not append any mounts.

If not, vmm-snadboxer should prepare sandbox files and covert them into oci mounts
before sandbox starts. The hostname should be set to either pod hostname or host
hostname, the hosts should be set as host, and the DNS should be set either from
pod spec or host DNS.

Moreover, it's better to set guest DNS if we want to mount some nfs sewrver in guest.

Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
@Burning1020 Burning1020 marked this pull request as ready for review January 11, 2024 01:42
vmm/task/src/main.rs Outdated Show resolved Hide resolved
vmm/task/src/main.rs Outdated Show resolved Hide resolved
Add early_init_call() and late_init_call() for VM initiation.

Signed-off-by: Zhang Tianyang <burning9699@gmail.com>
@abel-von abel-von merged commit 6a599c0 into kuasar-io:main Jan 11, 2024
15 checks passed
@Burning1020 Burning1020 deleted the sandbox-dns branch April 7, 2024 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants