Add unsafe profile for disk VM's

Change-Id: Ia6666ea124bf0f238addba56bb6466318903206b
This commit is contained in:
Alexander Noskov 2020-02-28 10:10:38 -06:00
parent a6f98d969e
commit 364a9bfc9d
2 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,7 @@ that will be created as file-backed volumes.
* io_profile - One of the below I/O configurations
* fast - In the case of a VM disruption, synchronous I/O may be lost. Better throughput.
* safe - Synchronous I/O fully written to disk, slower throughput.
* unsafe - Host are caching all disk IO, and sync requests from VM are ignored. Maximum performance.
* bootstrap - For VMs that are bootstrapped by the framework, not Airship, use this disk
* format - For VMs that are bootstrapped by the framework, describe how the disk should be
formatted and mounted when desired.

View File

@ -444,6 +444,9 @@ vm_create_vols(){
elif [[ "$io_prof" == "safe" ]]
then
DISK_OPTS="bus=virtio,cache=directsync,discard=unmap,format=qcow2,io=native"
elif [[ "$io_prof" == "unsafe" ]]
then
DISK_OPTS="bus=virtio,cache=unsafe,format=qcow2"
else
DISK_OPTS="bus=virtio,format=qcow2"
fi