nemu needs to be configured with:
`machine_type = "virt"` by default.
In addition, this commit removes
`machine_accelerators="virt"` which was added instead
of `machine_type` in a previous commit.
Fixes: #1707.
Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Fix the test case TestGetShmSizeBindMounted by
setting the right ShmSize for ppc64le.
Fixes: #1702
Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
The systemd units and files that are not needed in Kata Containers,
are removed when the image is created, therefore we don't need to mask
them.
fixes#1704
Signed-off-by: Julio Montes <julio.montes@intel.com>
If virtiofsd fails to initialize and stops unexpected,
qemu might hang forever. We just stop the qemu process.
Resource cleanup will be done by others.
Fixes: #1690
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
Set the minimum golang version to 1.11.10, the latest stable 1.11 version
at the time of writing. Go 1.11 is required to build the agent with working
vsock support.
Fixes: #1693
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Make sure the hypervisor is stopped if startSandbox does not succeed, by
calling stopSandbox.
Fixes: #1636
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
If kata containers is using vfio and vhost net,the unbinding
of vfio would be hang. In the scenario, vhost net kernel thread
takes a reference to the qemu's mm, and the reference also includes
the mmap regions on the vfio device file. so vhost kernel thread
would be not released when qemu is killed as the vhost file
descriptor still is opened by shim v2 process, and the vfio device
is not released because there's still a reference to the mmap.
Fixes: #1669
Signed-off-by: Yang, Wei <w90p710@gmail.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
- Networking: Ensure that network namespace is propagated
- nemu-config: adjust defaults in configuration-nemu.toml
- support-vsock: load vhost_vsock module if it isn't built-in
bce0d60 unit-test: refine unit test
9b23d4f vsock_module: add 'vhost_vsock' kernel module in kata-check
f21d5a3 Support_vsock: only need to check whether device 'vhost_vsock' exists
09a7d15 nemu-config: adjust defaults in configuration-nemu.toml
66b93c7 Networking: Ensure that network namespace is propagated
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
There are still some systemd units that fail to start for different
reasons. Disable these systemd units to improve boot time.
fixes#1686
Signed-off-by: Julio Montes <julio.montes@intel.com>
Add a few minimal documents to allow all the documentation in this
repository to be navigated from the top-level README.
Fixes#1681.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Got a defunct kata-proxy after kata quit when VMCache is enabled.
The reason is vmcache server opens kata-proxy but doesn't wait it.
If VMCache is disabled, kata-runtime will quit before kata-proxy.
So it will not meet the issue.
Open a special goroutine do cmd.Wait in kataProxy.start to handle
the isssue.
Fixes: #1678
Signed-off-by: Hui Zhu <teawater@hyper.sh>
We should refine unit test which involves func SupportsVsocks and newly
reconstructed struct kernelModule.
Fixes: #1512
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Since we prefer vsock over virtio serial port, we add 'vhost_vsock'
in kernel mosules list.
But vhost_vsock.ko shouldn't be the definitely required kernel modules,
afterall, we could also use virtio serial port.
if kata-env shows SupportsVSocks as false, users could run kata-check
to manually load vhost_vsock.ko and get detailed info(errors)
Fixes: #1512
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
QEMU opens /dev/vhost-vsock and this causes vhost_vsock.ko to be
automatically loaded.
So, checking the existence of /dev/vhost-vsock is enough.
Fixes: #1512
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
- For initial offering of virtiofsd, hugepages are required
- use the qemu hypervisor type for configuration template
- decrease virtiofs cache size from 8192 to 1024, to better support
running with virtio-fs on smaller machines while hugepages are required.
- For initial experimental release, utilize virtio-serial instead of
vsock
Fixes: #1662
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
NEMU requires a unique runtime configuration. Add support for utilizing
a configuration-nemu.toml
Fixes: #1647
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Added the following distro version constraints for parity with the
kernel version constraints:
- `NeedDistroVersionGE()`
- `NeedDistroVersionLE()`
- `NeedDistroVersionNotEquals()`
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Fix version comparison bug whereby the specified operator was being
applied to the wrong version number.
The version handling for distro and kernel versions was incorrect. This
was not clear as the internal logic was rather difficult to understand.
Renaming `constraintInvalid()` to `constraintValid()` and updating
`NotValid()` correspondingly makes the logic clearer and exposed the
bug, allowing it to be fixed.
Added two new tests to ensure correct behaviour:
- `TestConstraintNotValidKernelVersion()`
- `TestConstraintNotValidDistroVersion()`
Fixes#1653.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Previously, the comment on `NeedDistroVersionEquals()` erroneously
referred to `NeedDistroVersionLT()`.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
`TestConstraint.NotValid()` is really designed to be called once per
test. However, there is no reason it should not be possible to call
multiple times. But to allow for that secenario, any settings
from a previous `NotValid()` call need to be cleared.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Skip TestHostNetworkingRequested test as nsfs is not supported on
older kernel versions. Currently, CentOS has issues with this test a
is using a kernel version of 3.10 and to run this test we need a
kernel version greater than 3.19.
Fixes#1629
Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>