nemu-config: adjust defaults in configuration-nemu.toml

- 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>
This commit is contained in:
Eric Ernst 2019-05-10 12:25:24 -07:00
parent bce1167c33
commit 09a7d15176
2 changed files with 18 additions and 7 deletions

View File

@ -163,9 +163,9 @@ DEFENTROPYSOURCE := /dev/urandom
DEFDISABLEBLOCK := false
DEFSHAREDFS := virtio-9p
DEFSHAREDFS_NEMU := virtio-fs
DEFVIRTIOFSDAEMON := $(VIRTIOFSDBINDIR)/virtiofsd
DEFVIRTIOFSDAEMON := $(VIRTIOFSDBINDIR)/virtiofsd-x86_64
# Default DAX mapping cache size in MiB
DEFVIRTIOFSCACHESIZE := 8192
DEFVIRTIOFSCACHESIZE := 1024
DEFVIRTIOFSCACHE := always
DEFENABLEIOTHREADS := false
DEFENABLEMEMPREALLOC := false
@ -242,6 +242,9 @@ ifneq (,$(NEMUCMD))
CONFIGS += $(CONFIG_NEMU)
# nemu-specific options (all should be suffixed by "_NEMU")
# currently, huge pages are required for virtiofsd support
DEFENABLEHUGEPAGES_NEMU := true
# nemu uses virt machine type
DEFMACHINEACCELERATOR_NEMU := virt
DEFBLOCKSTORAGEDRIVER_NEMU := virtio-scsi
DEFNETWORKMODEL_NEMU := tcfilter
@ -373,6 +376,7 @@ USER_VARS += DEFVIRTIOFSCACHE
USER_VARS += DEFENABLEIOTHREADS
USER_VARS += DEFENABLEMEMPREALLOC
USER_VARS += DEFENABLEHUGEPAGES
USER_VARS += DEFENABLEHUGEPAGES_NEMU
USER_VARS += DEFENABLESWAP
USER_VARS += DEFENABLEDEBUG
USER_VARS += DEFDISABLENESTINGCHECKS
@ -520,6 +524,7 @@ $(GENERATED_FILES): %: %.in $(MAKEFILE_LIST) VERSION .git-commit
-e "s|@DEFENABLEIOTHREADS@|$(DEFENABLEIOTHREADS)|g" \
-e "s|@DEFENABLEMEMPREALLOC@|$(DEFENABLEMEMPREALLOC)|g" \
-e "s|@DEFENABLEHUGEPAGES@|$(DEFENABLEHUGEPAGES)|g" \
-e "s|@DEFENABLEHUGEPAGES_NEMU@|$(DEFENABLEHUGEPAGES_NEMU)|g" \
-e "s|@DEFENABLEMSWAP@|$(DEFENABLESWAP)|g" \
-e "s|@DEFENABLEDEBUG@|$(DEFENABLEDEBUG)|g" \
-e "s|@DEFDISABLENESTINGCHECKS@|$(DEFDISABLENESTINGCHECKS)|g" \

View File

@ -10,7 +10,8 @@
# XXX: Name: @PROJECT_NAME@
# XXX: Type: @PROJECT_TYPE@
[hypervisor.nemu]
# nemu utilizes the 'qemu' hypervisor template type, since it closely matches qemu
[hypervisor.qemu]
path = "@NEMUPATH@"
kernel = "@KERNELPATH@"
image = "@IMAGEPATH@"
@ -96,8 +97,8 @@ default_memory = @DEFMEMSZ@
disable_block_device_use = @DEFDISABLEBLOCK@
# Shared file system type:
# - virtio-9p (default)
# - virtio-fs
# - virtio-fs (default)
# - virtio-9p
shared_fs = "@DEFSHAREDFS_NEMU@"
# Path to vhost-user-fs daemon.
@ -161,7 +162,7 @@ enable_iothreads = @DEFENABLEIOTHREADS@
# This is useful when you want to use vhost-user network
# stacks within the container. This will automatically
# result in memory pre allocation
#enable_hugepages = true
enable_hugepages = @DEFENABLEHUGEPAGES_NEMU@
# Enable swap of vm memory. Default false.
# The behaviour is undefined if mem_prealloc is also set to true
@ -187,7 +188,7 @@ enable_iothreads = @DEFENABLEIOTHREADS@
# If true and vsocks are supported, use vsocks to communicate directly
# with the agent (no proxy is started).
# Default true
use_vsock = true
#use_vsock = true
# VFIO devices are hotplugged on a bridge by default.
# Enable hotplugging on root bus. This may be required for devices with
@ -272,6 +273,11 @@ use_vsock = true
#vm_cache_endpoint = "/var/run/kata-containers/cache.sock"
[proxy.@PROJECT_TYPE@]
path = "@PROXYPATH@"
# If enabled, proxy messages will be sent to the system log
# (default: disabled)
#enable_debug = true
[shim.@PROJECT_TYPE@]
path = "@SHIMPATH@"