Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

EUCA-3399 #18

Closed
wants to merge 4 commits into from

2 participants

@lwade
Owner

To address this issue here: https://eucalyptus.atlassian.net/browse/EUCA-3399

I'm in agreement for removing this line, I don't think it serves any purpose in its current form. Removing it seems like the best thing to do.

@lwade
Owner

This has been open for a couple of months .....

@a13m

Sorry for dropping the ball on this. Frankly, I think that shoving these pre-flight checks into the init script itself is pretty ugly, but I suppose we've already set a precedent with the NTP check. I'm going to let someone from engineering decide if this is the right way to do things. Keep in mind that this will break if eucalyptus ever supports "fake" virtualization for instances (e.g., LXC containers) on systems where VT support is not available.

@lwade
Owner

No worries, this was a merged commit as I didn't realise this pull request was still open.

I agree with you and I think our entire init scripts probably need re-working anyhow. This has to be done if we can separate Walrus and the SC from the CLC. The reason for putting this in here was exactly that, the NTP check set the precedent.

@a13m

OH! This pull request is only for fixing the line in libvirt.xsl ! I should have looked at it more closely. I can merge that, no problem.

In the future, please make a branch per issue that you work on. Makes life easier for everyone. :-)

@a13m a13m referenced this pull request from a commit
@a13m a13m Merge commit pull request #18 from lwade 5f74c33
@a13m a13m closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 12, 2013
  1. @lwade

    EUCA-3399

    lwade authored
Commits on Mar 27, 2013
  1. @lwade
Commits on Apr 15, 2013
  1. @lwade

    EUCA-4231

    lwade authored
  2. @lwade
This page is out of date. Refresh to see the latest.
View
39 tools/eucalyptus-nc.in
@@ -155,7 +155,44 @@ do_start() {
$EUCALYPTUS/usr/sbin/euca-generate-fault -c nc 1008 daemon ntp
fi
- # fixes #469984
+ # check for virt extensions in CPU
+ # First, lets check CPU flags to see if we have hardware support
+
+ HYPERVISOR=$(grep ^HYPERVISOR ${EUCALYPTUS}/etc/eucalyptus/eucalyptus.conf | cut -d'"' -f 2)
+ CPU_MODEL=$(egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)')
+
+ # Be heavy-handed, exit with failure on lack of CPU virtualization support.
+
+ egrep -m1 -w '^flags[[:blank:]]*:' /proc/cpuinfo | egrep -wo '(vmx|svm)'
+ if [ $? -ne 0 ] ; then
+ echo "Terminating! This Node Controller does not have CPU virtualization support. You will not be able to run instances."
+ echo
+ $EUCALYPTUS/usr/sbin/euca-generate-fault -c nc 1012 component nc
+ exit 1
+ fi
+
+ # Now we check to see if it's enabled in BIOS by loading the kvm modules. Warn rather than exit and suggest the user enables this.
+ # For Intel systems
+ if [ $CPU_MODEL == vmx -a $HYPERVISOR == kvm ] ; then
+ modprobe kvm_intel
+ if [ $? -ne 0 ] ; then
+ echo "Unable to load KVM module, VT-x may be disabled in your systems BIOS, please enable it. You will not be able to launch instances."
+ echo
+ $EUCALYPTUS/usr/sbin/euca-generate-fault -c nc 1012 component nc
+ fi
+ fi
+
+ # For AMD systems
+ if [ $CPU_MODEL == svm -a $HYPERVISOR == kvm ] ; then
+ modprobe kvm_amd
+ if [ $? -ne 0 ] ; then
+ echo "Unable to load KVM module, AMD-V may be disabled in your systems BIOS, please enable it. You will not be able to launch instances."
+ echo
+ $EUCALYPTUS/usr/sbin/euca-generate-fault -c nc 1012 component nc
+ fi
+ fi
+
+ # fixes #469984
IPTABLES="`which iptables 2> /dev/null`"
if [ -n "$IPTABLES" ]; then
[ -x $IPTABLES ] && $IPTABLES -L -n > /dev/null 2> /dev/null
View
2  tools/libvirt.xsl
@@ -287,7 +287,7 @@ that describes a Eucalyptus instance to be launched.
<console type="pty"/>
</xsl:when>
</xsl:choose>
- <!-- <graphics type='vnc' port='-1' autoport='yes' keymap='en-us' listen='0.0.0.0'/> -->
+ <!-- <graphics type='vnc' port='-1' autoport='yes' keymap='en-us' -->
</devices>
</domain>
</xsl:template>
View
46 util/faults/en_US/1012.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2012 Eucalyptus Systems, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 3 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+
+ Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
+ CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
+ additional information or have any questions.
+ -->
+<eucafaults version="1" description="Templates for the fault subsystem">
+ <fault
+ id="1012"
+ message="no virtualization support on host.">
+
+ <condition
+ message="The check for virtualization extensions has failed."/>
+
+ <cause
+ message="CPU virtualization extensions are disabled in the BIOS."/>
+
+ <initiator
+ message="${component}"/>
+
+ <location
+ message="CPU capabilities on ${component}"/>
+
+ <resolution>
+ <message>
+ 1) Check your CPU supports vendor virtualization extensions.
+ 2) Enable CPU virtualization extensions in the systems BIOS.
+ 3) Ensure KVM modules can be loaded.
+ </message>
+ </resolution>
+ </fault>
+</eucafaults>
Something went wrong with that request. Please try again.