Description of problem: When hot plugging a disk the cache mode is not set explicitly which can result in a default cache mode being used. We would like to use the same logic for hot plugged disks as for conventionally attached disks which is to prefer cache=none when the underlying storage supports direct IO. Version-Release number of selected component (if applicable): 4.10.7 How reproducible: Always Steps to Reproduce: 1. Create VM 2. Start VM 3. Hotplug a disk 4. Use `oc rsh` to connect to the appropriate virt-launcher Pod 5. Execute `virsh dumpxml 1` Actual results: The xml shows a cache mode other than 'none' for the hotplug disk Expected results: The cache mode should be set to 'none' Additional info:
Test on CNV-v4.10.8-37, cache mode is none <disk type='block' device='disk'> <driver name='qemu' type='raw' cache='none' error_policy='stop' io='native' discard='unmap'/> <source dev='/var/run/kubevirt/hotplug-disks/blank-dv' index='3'/>
*** Bug 2162140 has been marked as a duplicate of this bug. ***