You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/09/07 10:35:15 UTC

[GitHub] rhtyd commented on a change in pull request #2824: Fix SystemVMs running in Xen HVM mode are not configured (#2760)

rhtyd commented on a change in pull request #2824: Fix SystemVMs running in Xen HVM mode are not configured (#2760)
URL: https://github.com/apache/cloudstack/pull/2824#discussion_r215917488
 
 

 ##########
 File path: systemvm/debian/opt/cloud/bin/setup/cloud-early-config
 ##########
 @@ -51,6 +45,19 @@ hypervisor() {
     fi
   fi
 
+  [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) )
+  if [ "$facts" != "" ]; then
+    # Xen HVM is recognized as Hyperv when Viridian extensions are enabled
+    if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then
+      echo "xen-hvm" && return 0
+    else
+      echo ${facts[-1]} && return 0
+    fi
+  fi
+
+  grep -q QEMU /proc/cpuinfo  && echo "kvm" && return 0
 
 Review comment:
   virsh is only the hypervisor host, not in the guest VM.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services