If qemu dracut module included than automatically include
virtfs and virtiofs dracut modules as well unless
hostonly_mode is set to "strict".
Tested with the following dracut invocation (invoked
from a non-virtualized host).
`dracut --hostonly-mode sloppy -add qemu`
# called by dracut
check() {
+ if [[ $hostonly_mode != "strict" ]] && dracut_module_included "qemu"; then
+ return 0
+ fi
+
[[ $hostonly ]] || [[ $mount_needs ]] && {
for fs in "${host_fs_types[@]}"; do
[[ $fs == "9p" ]] && return 0
# called by dracut
check() {
+ if [[ $hostonly_mode != "strict" ]] && dracut_module_included "qemu"; then
+ return 0
+ fi
+
[[ $hostonly ]] || [[ $mount_needs ]] && {
is_qemu_virtualized && return 0