From e6b4eeb84da7680e3df3e87ff9b76640ee34e33e Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Thu, 26 Nov 2020 11:02:06 +0100 Subject: [PATCH] F OpenNebula/one#5111: Production-ready (mostly) KVM defaults (#476) --- src/scheduler/etc/sched.conf | 2 +- src/vmm_mad/exec/vmm_exec_kvm.conf | 43 +++++++++++++++++++++--------- src/vmm_mad/remotes/kvm/kvmrc | 10 +++---- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/scheduler/etc/sched.conf b/src/scheduler/etc/sched.conf index 200244b334..7b91494606 100644 --- a/src/scheduler/etc/sched.conf +++ b/src/scheduler/etc/sched.conf @@ -96,7 +96,7 @@ TIMEOUT = 60 ONE_XMLRPC = "http://localhost:2633/RPC2" -SCHED_INTERVAL = 30 +SCHED_INTERVAL = 15 MAX_VM = 5000 MAX_DISPATCH = 30 diff --git a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf index f9c7d9cb32..7dc9febc7c 100644 --- a/src/vmm_mad/exec/vmm_exec_kvm.conf +++ b/src/vmm_mad/exec/vmm_exec_kvm.conf @@ -33,20 +33,39 @@ #VCPU = 1 -OS = [ arch = "x86_64" ] -FEATURES = [ PAE = "no", ACPI = "yes", APIC = "no", HYPERV = "no", GUEST_AGENT = "no", - VIRTIO_SCSI_QUEUES = "0" ] -#CPU_MODEL = [ MODEL = "host-passthrough"] -DISK = [ driver = "raw" , cache = "none"] - -#NIC = [ filter = "clean-traffic", model="virtio" ] -#RAW = "" - -HYPERV_OPTIONS="" - MEMORY_SLOTS = 16 -SPICE_OPTIONS=" +OS = [ + ARCH = "x86_64" +] + +FEATURES = [ + PAE = "no", + ACPI = "yes", + APIC = "no", + HYPERV = "no", + GUEST_AGENT = "yes", + VIRTIO_SCSI_QUEUES = "1" +] + +#CPU_MODEL = [ MODEL = "host-passthrough"] + +DISK = [ + DRIVER = "raw", + CACHE = "none", + DISCARD = "unmap" +] + +NIC = [ + MODEL = "virtio" + # FILTER = "clean-traffic" +] + +#RAW = "" + +HYPERV_OPTIONS = "" + +SPICE_OPTIONS = " diff --git a/src/vmm_mad/remotes/kvm/kvmrc b/src/vmm_mad/remotes/kvm/kvmrc index b886a10507..dbfa78e5f1 100644 --- a/src/vmm_mad/remotes/kvm/kvmrc +++ b/src/vmm_mad/remotes/kvm/kvmrc @@ -24,13 +24,13 @@ export LIBVIRT_MD_URI=http://opennebula.org/xmlns/libvirt/1.0 export LIBVIRT_MD_KEY=one # Seconds to wait after shutdown until timeout -export SHUTDOWN_TIMEOUT=300 +export SHUTDOWN_TIMEOUT=180 # Instruct QEMU guest agent to synchronize the guest time from RTC -export SYNC_TIME=no +export SYNC_TIME=yes # Uncomment this line to force VM cancellation after shutdown timeout -#export FORCE_DESTROY=yes +export FORCE_DESTROY=yes # Default number of "virsh" command retries when required # currently used in detach-interface, restore @@ -54,7 +54,7 @@ export VIRSH_RETRIES=3 # To enable them, the "-drive" option now supports a "discard" suboption; the # default value is "ignore" (or its synonym "off"), and the other valid value # is "unmap" (or "on"). -#DEFAULT_ATTACH_DISCARD=unmap +DEFAULT_ATTACH_DISCARD=unmap # The default DISK I/O policy for new attached disks. #DEFAULT_ATTACH_IO= @@ -82,5 +82,5 @@ export VIRSH_RETRIES=3 # This parameters will set the default NIC model and filter for # the hot-attached interfaces. -#DEFAULT_ATTACH_NIC_MODEL=virtio +DEFAULT_ATTACH_NIC_MODEL=virtio #DEFAULT_ATTACH_NIC_FILTER=clean-traffic