+ echo qemu
+ fi
+ fi
+fi
+
+if ! "$skip_lkvm"; then
+ if [ "$cpuid" = "LKVMLKVMLKVM" ]; then
+ echo lkvm
+ elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then
+ if [ -d "${root}/proc/device-tree" ] &&
+ grep -q "dummy-virt" "${root}/proc/device-tree/compatible"; then
+ echo lkvm
+ fi
+ fi
+fi
+
+# Check for Docker.
+if [ -f "${root}/.dockerinit" ]; then
+ echo docker
+fi
+
+# Check ppc64 lpar, kvm or powerkvm
+
+# example /proc/cpuinfo line indicating 'not baremetal'
+# platform : pSeries
+#
+# example /proc/ppc64/lparcfg systemtype line
+# system_type=IBM pSeries (emulated by qemu)
+
+if [ "$arch" = "ppc64" ]; then
+ if have_cpuinfo && grep -q 'platform.**pSeries' "${root}/proc/cpuinfo"; then
+ if grep -q 'model.*emulated by qemu' "${root}/proc/cpuinfo"; then
+ echo ibm_power-kvm
+ else
+ # Assume LPAR, now detect shared or dedicated
+ if grep -q 'shared_processor_mode=1' "${root}/proc/ppc64/lparcfg"; then
+ echo ibm_power-lpar_shared
+ else
+ echo ibm_power-lpar_dedicated
+ fi
+ # detect powerkvm?
+ fi