Commit Graph

9860 Commits

Author SHA1 Message Date
Jianyong Wu
3480780bd8 kata-ctl: add check framework support for non-x86
x86 changes the check framwork. Enable them for non-x86 accordingly.

Fixes: #5923
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2022-12-20 11:41:00 +08:00
Jianyong Wu
1bd533f10b kata-ctl: let check framework arch-agnostic
The current check framwork is specific for x86. Refactor the code
to let it arch-agnostic.

Fixes: #5923
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2022-12-20 11:41:00 +08:00
Fabiano Fidêncio
2e54c8e887
Merge pull request #5921 from fidencio/3.1.0-alpha1-branch-bump
# Kata Containers 3.1.0-alpha1
2022-12-19 15:45:53 +01:00
Bin Liu
6039516802
Merge pull request #5925 from xinydev/fix-docs
docs: Remove duplicate sentences
2022-12-19 17:12:15 +08:00
Peng Tao
473f5ff7da
Merge pull request #5861 from mflagey/Docs_Change_build_virtiofsd_in_developer_guide_#5860
docs: Update virtiofsd build script in the developer guide
2022-12-19 17:02:35 +08:00
Bin Liu
0cf443a612
Merge pull request #5915 from openanolis/legacy_device
dragonball: refactor legacy device initialization
2022-12-19 13:31:45 +08:00
Xuewei Niu
fd77eebd4d runtime-rs: fix the issues mentioned in the code review
In order to avoid cloning, changed the signature of
`ShareFsMount::share_rootfs`, `ShareFsMount::share_volume`, and
`ShareFsMount::umount_rootfs` to receive a reference to a config.

Fixes: #5898

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2022-12-19 11:46:50 +08:00
Xuewei Niu
0e69207909 runtime-rs: Clean up mount points shared to guest
Fixed issues where shared volumes couldn't umount correctly.

The rootfs of each container is cleaned up after the container is killed, except
for `NydusRootfs`. `ShareFsRootfs::cleanup()` calls
`VirtiofsShareMount::umount_rootfs()` to umount mount points shared to the
guest, and umounts the bundle rootfs.

Fixes: #5898

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2022-12-19 11:46:14 +08:00
Xin Yang
74fa10a235 docs: remove duplicate sentences
remove duplicate sentences in spdk docs
Fixes: #5926

Signed-off-by: Xin Yang <xinydev@gmail.com>
2022-12-17 11:26:36 +00:00
Bin Liu
e4645642d0
Merge pull request #5877 from openanolis/fix_start_bundle
runtime-rs: enable start container from bundle
2022-12-17 08:10:08 +08:00
Wainer Moschetta
339ef99669
Merge pull request #5867 from Alex-Carter01/sev_module_unload
kernel building: Add module unload to SEV kernel config
2022-12-16 17:17:53 -03:00
Alex Carter
ecb28e2b13 kernel: adding kmod to do docker env
adding kmod to kernel building docker env to remove warning

Fixes: #5866
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-12-16 17:02:47 +00:00
Alex Carter
9f465a58af kernel: Add "unload" module to SEV config
Fixes: #5866
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-12-16 16:56:56 +00:00
Fabiano Fidêncio
b0896126cf release: Kata Containers 3.1.0-alpha1
- tools: Add some new gitignore items
- shim: return hypervisor's pid not shim's pid
- Dragonball: introduce upcall
- refactor(shim-mgmt): move client side to libs
- kata-ctl: Add --list option
- kata-ctl: check: only-list-releases and include-all-releases options
- basic framework for QEMU support in runtime-rs
- tools: Fix indentation on build kernel script
- runtime-rs: fix standalone share fs
- runtime-rs: fix sandbox_pidns calculation and oci spec amending
- runtime,agent: Add SELinux support for containers inside the guest
- kata-sys-util: fix issues where umount2 couldn't get the correct path
- agent: Drop the Option for LinuxContainer.cgroup_manager
- dragonball: enable kata3.0/dragonball CI on Arm
- fix kata deploy error after node reboot.
- tools: Fix indentation for ovmf script
- runtime: prevent waiting 50 ms minimum for a process exit
- runtime-rs: fix high cpu
- agent: remove `sysinfo` dependency
- runtime-rs: bind mount volumes in sandbox level
- docs: Update the rust version in the installation documentation
- runtime-rs: fix some variable names and typos
- kata-ctl: add host check for aarch64
- kata-ctl: fix dependency version conflict
- workflow: fix cargo-deny-runner.yaml syntax error
- runtime: Add identification in version for runtime-rs
- workflow: call cargo in user's $PATH
- runtime-rs: remove the version number from the commit display message
- runk: Re-implement start operation using the agent codes
- build: update golang version to 1.19.3
- snap: Fix snapcraft setup (unbreak snap releases)
- fix(agent): fix iptables binary path in guest
- runtime-rs: moving only vCPU threads into sandbox controller
- tools: Remove extra tab spaces from kata deploy binaries script
- ci: let static checks don't depend on build
- actions: use matrix to refactor static checks
- agent: support systemd cgroup for kata agent.
- actions: skip some jobs using "paths-ignore" filter
- runtime: go fix code for 1.19
- doc: update runtime-rs "Build and Install"
- runtime: don't fail mkdir if the folder is already created by another process
- kernel: add CONFIG_X86_SGX into whitelist
- runtime-rs: block on the current thread when setup the network to avoid be take over by other task
- Refactor(runtime-rs): add conditional compile for virt-sandbox persist
- runtime: add log record to the qemu config method `appendDevices` for…
- runtime: Use containerd v1.6.8
- tools: Fix indentation of build static firecracker script
- package: add nydus to release artifacts
- agent: check if command exist before do ip_tables test
- runtime: Support virtiofs queue size for qemu and make it configurable
- docs: change mount-info.json to mountInfo.json
- docs: update doc "NVIDIA GPU passthrough"
- runtime-rs: support vhost-vsock
- utils: Add utility function to fetch the kernel version.
- versions: update nydusd version
- runtime-rs: support nydus v5 and v6 rootfs
- Upgrade to Cloud Hypervisor v28.0
- docs: update doc "Setup swap device in guest kernel"
- Rust fixes + Golang bump
- clh: avoid race condition when stopping clh
- tools: Fix indentation of build static virtiofsd script
- docs: Fix configuration path
- runtime-rs : fix the shim source in the documentation test is ambiguous
- versions: update vmm-sys-util and related crates to v0.11.0
- runtime-rs: delete all cargo patches
- feat(shim-mgmt): iptables handler
- tools: Remove empty spaces from build kernel script
- Built-in Sandbox: add more unit tests for dragonball. Part 3
- Dragonball: enable mem_file_path config into hugetlbfs process
- runtime-rs:add hypervisor interface capabilities
- cloud-hypervisor: Fix GetThreadIDs function
- github: Parallelise static checks
- runtime-rs: blanks filled & fixes made to virtiofsd launch
- vCPUs pinning support for Kata Containers
- runtime-rs: fix shared volume permission issue
- runk: Ignore an error when calling kill cmd with --all option
- runk: Upgrade libseccomp crate to v0.3.0 in Cargo.lock
- snap: Unbreak docker install
- add EnterNetNS in virtcontainers
- tools: Fix indentation of build static clh script
- virtiofsd: Not use "link-self-contained=yes" on s390x
- Kata ctl drop privs
- versions: bump golangci-lint version
- runtime-rs: generate config files with the default target
- docs: Fix volumeMounts in SGX usage example
- versions: Update Cloud Hypervisor to b4e39427080
- docs: update rust runtime installation guide
- rustjail: Upgrade libseccomp crate to v0.3.0
- makefile: remove sudo when create symbolic link
- agent: remove redundant checks
- shim: Ensure pagesize is set when reporting hugetlb stats
- kata-ctl: Re-enable network tests on s390x (fixes 5438)
- agent: use NLM_F_REPLACE replace NLM_F_EXCL in rtnetlink
- fix readme content error at doc directory
- agent: validate hugepage size is supported
- Makefile: fix an typo in runtime-rs makefile
- qemu: Re-work static-build Dockerfile
- Modify agent-url return value in runtime-rs
- runtime-rs: regulate the comment in runtime-rs makefile
- doc: Update how-to-run-kata-containers-with-SNP-VMs.md
- kata-ctl: Disable network check on s390x
- virtiofsd: Build inside a container
- Dragonball: remove redundant comments in event manager
- versions: Update TDX QEMU
- runtime-rs: fix typo get_contaier_type to get_container_type
- kata-ctl: improve command descriptions for consistency
- runtime-rs: force shutdown shim process in it can't exit
- versions: Update TDX kernel
- ci: skip s390x for dragonball.
- Dragonball: delete redundant comments in blk_dev_mgr
- kata-ctl: Move development to main branch
- runtime-rs: support ephemeral storage for emptydir
- docs: fix a typo in rust-runtime-installation-guide
- Built-in Sandbox: add more unit tests for dragonball
- readme: remove libraries mentioning

b5cfd0958 kata-ctl: Fixed format for check release options
fbf294da3 refactor(shim-mgmt): move client side to libs
ae0dcacd4 tools: Add some new gitignore items
99485d871 shim: return hypervisor's pid not shim's pid
1f28ff683 runtime-rs: add binary to exercise shim proper w/o containerd dependencies
eb8c9d38f runtime-rs: add launch of a simple qemu process to start_vm()
2f6d0d408 runtime-rs: support qemu in VirtContainer
1413dfe91 runtime-rs: add basic empty boilerplate for qemu driver
a81ced0e3 upcall: add upcall into kernel build script
f5c34ed08 Dragonball: introduce upcall
8dbfc3dc8 kata-ctl: Fixed format for check release options
f3091a9da kata-ctl: Add kata-ctl check release options
a577df8b7 tools: Fix indentation on build kernel script
b087667ac kata-deploy: Fix the pod of kata deploy starts to occur an error
79cf38e6e runtime-rs: clear OCI spec namespace path
62f4603e8 runtime-rs: reset rdma cgroup
5b6596f54 runtime-rs: CreateContainerRequest has Default
e9e82ce28 runtime-rs: fix is_pid_namespace_enabled check
8079a9732 kata-sys-util: fix issues where umount2 couldn't get the correct path
4661ea8d3 runtime-rs: fix standalone share fs
c5abc5ed4 config: speed up rng init when kernel boot for arm64
3e6114b2e tools: Fix indentation for ovmf script
7fdbbcda8 agent: Drop the Option for LinuxContainer.cgroup_manager
d04d45ea0 runtime: use pidfd to wait for processes on Linux
e9ba0c11d runtime: use exponential backoff for process wait
748f22e7d agent: remove sysinfo dependency
0019d653d runtime-rs: fix high cpu
46b38458a docs: Update the rust version in the installation documentation
71491a69c runtime: move process wait logic to another function
92ebe61fe runtime: reap force killed processes
fdf0a7bb1 runtime-rs: fix the issues mentioned in the code review
1d823c4f6 runtime-rs: umount and permission controls in sandbox level
527b87141 runtime-rs: bind mount volumes in sandbox level
9ccf2ebe8 agent: add signal value to log
fb2c142f1 runtime-rs: fix some variable names and typos
737420469 kata-ctl: fix dependency version conflict
89574f03f workflow: call cargo in user's $PATH
d4321ab48 runtime: Add identification in version for runtime-rs
f7fc436be workflow: fix cargo-deny-runner.yaml syntax error
78532154d docs: Add description for guest SELinux support
c617bbe70 runtime: Pass SELinux policy for containers to the agent
935476928 agent: Add SELinux support for containers
a75f99d20 osbuilder: Create guest image for SELinux
a9c746f28 kernel: Add kernel configs for SELinux
86cb05883 snap: Fix snapcraft setup (unbreak snap releases)
f443b7853 build: update golang version to 1.19.3
e12db92e4 runk: Re-implement start operation using the agent codes
e723bad0a ci: let static checks don't depend on build
69aae0227 actions: use matrix to refactor static checks
a5e4cad4b kata-ctl: add host check for aarch64
2edbe389d runtime-rs: moving only vCPU threads into sandbox controller
340e24f17 actions: skip some job using "paths-ignore" filter
2426ea9bd doc: update runtime-rs "Build and Install"
67fe703ff runtime-rs: remove the version number from the commit display message
1d93a9346 fix(agent): fix iptables binary path in guest
1dfd845f5 runtime: go fix code for 1.19
cd85a44a0 tools: Remove extra tab spaces from kata deploy binaries script
cb199e0ec kernel: add CONFIG_X86_SGX into whitelist
4b45e1386 runtime: don't fail mkdir if the folder is already created
b987bbc57 runtime-rs: block on the current thread when setup the network
abb9ebeec package: add nydus to release artifacts
30a7ebf43 runtime: Log invalid devices in QEMU config
2539f3186 runtime: Use containerd v1.6.8
993d05a42 docs: change mount-info.json to mountInfo.json
d808adef9 runtime-rs: support vhost-vsock
6b2ef66f0 runtime-rs: add conditional compile for virt-sandbox persist
6c1e153a6 docs: update doc "NVIDIA GPU passthrough"
b53171b60 agent: check command before do test_ip_tables
a636d426d versions: update nydusd version
3bb145c63 runtime: Support virtiofs queue size for qemu and make it configurable
e80a9f09f utils: Add utility function to fetch the kernel version.
36545aa81 runtime: clh: Re-generate the client code
f4b02c224 versions: Upgrade to Cloud Hypervisor v28.0
e4a6fbadf docs: update doc "Setup swap device in guest kernel"
2f5f575a4 log-parser: Simplify check
d94718fb3 runtime: Fix gofmt issues
16b837509 golang: Stop using io/ioutils
66aa330d0 versions: Update golangci-lint
b3a4a1629 versions: bump containerd version
eab8d6be1 build: update golang version to 1.19.2
e80dbc15d runtime-rs: workaround Dragonball compilation problem
c3f1922df fix(fmt): fix cargo fmt to pass static check
a4099dab8 tools: Fix indentation of build static firecracker script
c46814b26 runtime-rs:support nydus v5 and v6
a04afab74 qemu: early exit from Check if the process was stopped
7e481f217 qemu: set stopped only if StopVM is successful
0e3ac66e7 clh: return faster with dead clh process from isClhRunning
9ef68e0c7 clh: fast exit from isClhRunning if the process was stopped
2631b08ff clh: don't try to stop clh multiple times
f45fe4f90 versions: update vmm-sys-util and related crates to v0.11.0
8be081730 tools: Fix indentation of build static virtiofsd script
f8f97c1e2 feat(shim-mgmt): iptables handler
29c75cf12 runtime-rs: delete all cargo patches
9f70a6949 tools: Remove empty spaces from build kernel script
57336835d dragonball: add more unit test for device manager
233370023 dragonball: add test utils.
3e9c3f12c docs: Fix configuration path
2adb1c182 Dragonball: enable mem_file_path config into hugetlbfs process
daeee26a1 cloud-hypervisor: Fix GetThreadIDs function
40d514aa2 github: Parallelise static checks
2508d39b7 runtime: added vcpus pinning logics Core VCPU threads pinning logics for issue 4476. Also provided docs.
fef8e92af runtime-rs:add hypervisor interface capabilities
27b191358 runtime-rs: blanks filled & fixes made to virtiofsd launch
990e6359b snap: Unbreak docker install
ca69a9ad6 snap: Use metadata for dependencies
df092185e runk: Upgrade libseccomp crate to v0.3.0 in Cargo.lock
16dca4ecd runk: Ignore an error when calling kill cmd with --all option
b74c18024 runtime-rs: fix shared volume permission issue
936fe35ac runtime-rs : fix shim source is ambiguous
0ed7da30d tools: Fix indentation of build static clh script
43fcb8fd0 virtiofsd: Not use "link-self-contained=yes" on s390x The compile option link-self-contained=yes asks rustc to use C library startup object files that come with the compiler, which are not available on the target s390x-unknown-linux-gnu. A build does not contain any startup files leading to a broken executable entry point (causing segmentation fault).
219919e9f docs: Fix volumeMounts in SGX usage example
c0f5bc81b cargo: Add Cargo.lock to version control
474927ec9 gitignore: Add gitignore file
699f821e1 utils: Add function to drop priveleges
a6fb4e2a6 versions: bump golangci-lint version
b015f34af runtime-rs: generate config files with the default target
d7bb4b551 agent: support systemd cgroup for kata agent
144efd1a7 docs: update rust runtime installation guide
abf4f9b29 docs: kata 3.0 Architecture fix readme content error
44d8de892 agent: remove redundant checks
9d286af7b versions: Update Cloud Hypervisor to b4e39427080
081ee4871 agent: use NLM_F_REPLACE replace NLM_F_EXCL in rtnetlink
e95089b71 kata-ctl: add basic cpu check for s390x
871d2cf2c kata-ctl: Limit running tests to x86 and use native-tls on s390x
cbd84c3f5 rustjail: Upgrade libseccomp crate to v0.3.0
748be0fe3 makefile: remove sudo when create symbolic link
227e717d2 qemu: Re-work static-build Dockerfile
72738dc11 agent: validate hugepage size is supported
f74e328ff Makefile: fix an typo in runtime-rs makefile
f205472b0 Makefile: regulate the comment style for the runtime-rs comments
9f2c7e47c Revert "kata-ctl: Disable network check on s390x"
ac403cfa5 doc: Update how-to-run-kata-containers-with-SNP-VMs.md
00981b3c0 kata-ctl: Disable network check on s390x
39363ffbf runtime: remove same function
c322d1d12 kata-ctl: arch: Improve check call
0bc5baafb snap: Build virtiofsd using the kata-deploy scripts
cb4ef4734 snap: Create a task for installing docker
7e5941c57 virtiofsd: Build inside a container
35d52d30f versions: Update TDX QEMU
4d9dd8790 runtime-rs: fix typo get_contaier_type to get_container_type
70676d4a9 kata-ctl: improve command descriptions for consistency
9eb73d543 versions: Update TDX kernel
00a42f69c kata-ctl: cargo: 2021 -> 2018
fb6327474 kata-ctl: rustfmt + clippy fixes
1f1901e05 dragonball: fix clippy warning for aarch64
a343c570e dragonball: enhance dragonball ci
6a64fb0eb ci: skip s390x for dragonball.
a743e37da Dragonball: delete redundant comments in blk_dev_mgr
2b345ba29 build: Add kata-ctl to tools list
f7010b806 kata-ctl: docs: Write basic documentation
862eaef86 docs: fix a typo in rust-runtime-installation-guide
26c043dee ci: Add dragonball test
781e604c3 docs: Reference kata-ctl README
15c343cbf kata-ctl: Don't rely on system ssl libs
c23584994 kata-ctl: clippy: Resolve warnings and reformat
133690434 kata-ctl: implement CLI argument --check-version-only
eb5423cb7 kata-ctl: switch to use clap derive for CLI handling
018aa899c kata-ctl: Add cpu check
7c9f9a5a1 kata-ctl: Make arch test run at compile time
b63ba66dc kata-ctl: Formatting tweaks
cca7e32b5 kata-ctl: Lint fixes to allow the branch to be built
8e7bb8521 kata-ctl: add code for framework for arch
303fc8b11 kata-ctl: Add unit tests cases
d0b33e9a3 versions: Add kata-ctl version entry
002b18054 kata-ctl: Add initial rust code for kata-ctl
b62b18bf1 dragonball: fix clippy warning
2ddc948d3 Makefile: add dragonball components.
3fe81fe4a dragonball-ut: use skip_if_not_root to skip root case
72259f101 dragonball: add more unit test for vmm actions
9717dc3f7 Dragonball: remove redundant comments in event manager
9c1ac3d45 runtime-rs: return port on agent-url req
89e62d4ed shim: Ensure pagesize is set when reporting hugetbl stats
8d4ced3c8 runtime-rs: support ephemeral storage for emptydir
046ddc646 readme: remove libraries mentioning
86ad832e3 runtime-rs: force shutdown shim process in it can't exit

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-12-16 09:12:07 +01:00
Zhongtao Hu
21ec766d29 docs: add documents for using bundle to start container
add document for using bundle to start container

Fixes:#5872
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2022-12-16 11:13:25 +08:00
Yushuo
d14c3af35c dragonball: refactor legacy device initialization
If the serial path is given, legacy_manager should create socket console
based on that path. Or the console should be created based on stdio.

Fixes: #5914

Signed-off-by: Yushuo <y-shuo@linux.alibaba.com>
2022-12-15 20:55:01 +08:00
Fabiano Fidêncio
1d266352ea
Merge pull request #5902 from Bevisy/fix-too-many-git-file
tools: Add some new gitignore items
2022-12-15 11:29:32 +01:00
Zhongtao Hu
ca39a07a14 runtime-rs: enable start container from bundle
enable start container from bundle in this way

$ ls ./bundle
config.json  rootfs
$ sudo ctr run -d --runtime io.containerd.kata.v2 --config bundle/config.json test_kata

Fixes:#5872
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2022-12-15 17:28:13 +08:00
Peng Tao
ebb73df6bc
Merge pull request #5899 from Bevisy/fix-outdated-comments
shim: return hypervisor's pid not shim's pid
2022-12-15 14:55:54 +08:00
Peng Tao
7210905deb
Merge pull request #5712 from openanolis/chao/upcall
Dragonball: introduce upcall
2022-12-15 14:44:56 +08:00
Chao Wu
fad229b853
Merge pull request #5875 from Ji-Xinyou/xyji/refactor-shim-mgmt
refactor(shim-mgmt): move client side to libs
2022-12-15 10:59:45 +08:00
David Esparza
1dbd6c8057
Merge pull request #5735 from dborquez/kata-ctl-cli-list
kata-ctl: Add --list option
2022-12-14 15:03:21 -06:00
Alex
b5cfd09583
kata-ctl: Fixed format for check release options
Fixed formatting for check release options

Fixes: #5345

Signed-off-by: Alex <alee23@bu.edu>
Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
2022-12-14 09:42:57 -06:00
James O. D. Hunt
2e15af777c
Merge pull request #5786 from alexlee-23/main
kata-ctl: check: only-list-releases and include-all-releases options
2022-12-14 11:25:36 +00:00
Ji-Xinyou
fbf294da3f refactor(shim-mgmt): move client side to libs
The client side is moved to libs. This is to solve the problem
that including clients will bring about messy dependencies.

Fixes: #5874
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
2022-12-14 17:42:25 +08:00
Peng Tao
856d4b7361
Merge pull request #5798 from pmores/qemu-support
basic framework for QEMU support in runtime-rs
2022-12-14 15:05:33 +08:00
Binbin Zhang
ae0dcacd4a tools: Add some new gitignore items
Add some new ignore items to avoid local builds that cause git to track a lot of files

Fixes: #5900

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2022-12-14 11:38:23 +08:00
Binbin Zhang
99485d871c shim: return hypervisor's pid not shim's pid
update outdated code comments

Fixes: #3234

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2022-12-14 11:16:11 +08:00
GabyCT
b637d12d19
Merge pull request #5884 from GabyCT/topic/fixbuildscript
tools: Fix indentation on build kernel script
2022-12-13 15:28:24 -06:00
Chao Wu
bb4be2a666
Merge pull request #5690 from yipengyin/fix-virtiofsd
runtime-rs: fix standalone share fs
2022-12-14 00:16:10 +08:00
James Tumber
087515a46e agent: unset CC for cross-build
When `HOST_ARCH` != `ARCH` unset `CC`

Specifying a foreign CC is incompatible with building libgit2. Thus after the RUSTFLAGS linker
has been set we can safely unset CC to avoid passing this value through the build.

Fixes: #5890

Signed-off-by: James Tumber <james.tumber@ibm.com>
2022-12-13 15:30:06 +00:00
Pavel Mores
1f28ff6838 runtime-rs: add binary to exercise shim proper w/o containerd dependencies
After building the binary as usual with `cargo build` run it as follows.

It needs a configuration.toml in which only qemu keys `path`, `kernel`
and `initrd` will initially need to be set.  Point them to respective
files e.g. from a kata distribution tarball.

It also needs to be launched from an exported container bundle
directory.  One can be created by running

mkdir rootfs
podman export $(podman create busybox) | tar -C ./rootfs -xvf -
runc spec -b .

in a suitable directory.

Then launch the program like this:

KATA_CONF_FILE=/path/to/configuration-qemu.toml /path/to/shim-ctl

Fixes: #5817

Signed-off-by: Pavel Mores <pmores@redhat.com>
2022-12-13 14:55:21 +01:00
Pavel Mores
eb8c9d38ff runtime-rs: add launch of a simple qemu process to start_vm()
The point here is just to get a simplest Kata VM running.

Signed-off-by: Pavel Mores <pmores@redhat.com>
2022-12-13 14:54:26 +01:00
Pavel Mores
2f6d0d408b runtime-rs: support qemu in VirtContainer
Added registration of qemu config plugin and support for creating Qemu
Hypervisor instance.

Signed-off-by: Pavel Mores <pmores@redhat.com>
2022-12-13 14:54:26 +01:00
Pavel Mores
1413dfe91c runtime-rs: add basic empty boilerplate for qemu driver
This does almost literally nothing so far apart from getting and setting
HypervisorConfig.  It's mostly copied from/inspired by dragonball.

Signed-off-by: Pavel Mores <pmores@redhat.com>
2022-12-13 14:53:45 +01:00
Bin Liu
3952fedcd0
Merge pull request #5882 from bergwolf/github/oci-namespaces
runtime-rs: fix sandbox_pidns calculation and oci spec amending
2022-12-13 18:32:02 +08:00
Fabiano Fidêncio
f1381eb361
Merge pull request #4813 from ManaSugi/fix/add-selinux-agent
runtime,agent: Add SELinux support for containers inside the guest
2022-12-13 11:24:53 +01:00
Fupan Li
015674df16
Merge pull request #5873 from justxuewei/fix/umount2
kata-sys-util: fix issues where umount2 couldn't get the correct path
2022-12-13 15:52:32 +08:00
Chao Wu
a81ced0e3f upcall: add upcall into kernel build script
In order to let upcall being used by Kata Container, we need to add
those patches into kernel build script.

Currently, only when experimental (-e) and hypervisor type dragonball
(-t dragonball) are both enabled, that the upcall patches will be
applied to build a 5.10 guest kernel.

example commands: sh ./build-kernel.sh -e -t dragonball -d setup

fixes: #5642

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2022-12-13 15:44:55 +08:00
Chao Wu
f5c34ed088 Dragonball: introduce upcall
Upcall is a direct communication tool between VMM and guest developed
upon vsock. The server side of the upcall is a driver in guest kernel
(kernel patches are needed for this feature) and it'll start to serve
the requests after the kernel starts. And the client side is in
Dragonball VMM , it'll be a thread that communicates with vsock through
uds.

We want to keep the lightweight of the VM through the implementation of
the upcall, through which we could achieve vCPU hotplug, virtio-mmio
hotplug without implementing complex and heavy virtualization features
such as ACPI virtualization.

fixes: #5642

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2022-12-13 15:44:47 +08:00
Bin Liu
03b6124fc6
Merge pull request #5848 from Yuan-Zhuo/drop-cgmr-option
agent: Drop the Option for LinuxContainer.cgroup_manager
2022-12-13 12:09:39 +08:00
Guoqiang Ding
f8a48ab41d docs: add hint of probing loop module
If `loop` module is not probed, it causes error like "losetup: cannot find an unused loop device".

Fixes: #5887
Signed-off-by: Guoqiang Ding <dgq8211@gmail.com>
2022-12-13 11:33:42 +08:00
Alex
8dbfc3dc82 kata-ctl: Fixed format for check release options
Fixed formatting for check release options

Fixes: #5345

Signed-off-by: Alex <alee23@bu.edu>
2022-12-13 03:10:19 +00:00
Bin Liu
add2486259
Merge pull request #5853 from jongwu/test_kata3.0_arm
dragonball: enable kata3.0/dragonball CI on Arm
2022-12-13 11:05:17 +08:00
Alex
f3091a9da4 kata-ctl: Add kata-ctl check release options
This pull request adds kata-ctl check only-list-releases and include-all-releases

Fixes: #5345

Signed-off-by: Alex <alee23@bu.edu>
2022-12-13 03:04:30 +00:00
Gabriela Cervantes
a577df8b71 tools: Fix indentation on build kernel script
This PR fixes the indentation on the build kernel script.

Fixes #5883

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-12-12 16:37:47 +00:00
Fabiano Fidêncio
740387b569
Merge pull request #5829 from singhwang/main
fix kata deploy error after node reboot.
2022-12-12 14:20:14 +01:00
singhwang
b087667ac5 kata-deploy: Fix the pod of kata deploy starts to occur an error
If a pod of kata is deployed on a machine, after the machine restarts, the pod status of kata-deploy will be CrashLoopBackOff.

Fixes: #5868
Signed-off-by: SinghWang <wangxin_0611@126.com>
2022-12-12 19:11:38 +08:00
Peng Tao
79cf38e6ea runtime-rs: clear OCI spec namespace path
None of the host namespace paths make sense in the guest. Let's clear
them all before sending the spec to the agent.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-12-12 11:07:14 +00:00
Peng Tao
62f4603e81 runtime-rs: reset rdma cgroup
We don't support rdma cgroups yet. Let's make sure it is reset to empty.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2022-12-12 09:57:24 +00:00