New patch submitted by Dan Kenigsberg (danken(a)redhat.com)
You can review this change at:
http://gerrit.usersys.redhat.com/635
commit 3b75da8c26d6c3cf56dfb3e4397fd1d188b94df6
Author: Dan Kenigsberg <danken(a)redhat.com>
Date: Sun Jun 26 16:54:41 2011 +0300
BZ#716705 refuse to start VMs with "unknown" host osname
If, due to misconfiguration, the host os is not recognizable, refuse to
start new VMs as the os name should be passed to the guest bios.
Change-Id: Ia41ef922d2393acb9b62ff8daed9974f2eb79b4d
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 7758a8a..c1219e4 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -614,6 +614,11 @@ class clientIF:
vmParams['vmId'])
vmParams['volatileFloppy'] = True
+ if caps.osversion()['name'] == caps.OSName.UNKNOWN:
+ return {'status': {'code': errCode['createErr']
+ ['status']['code'],
+ 'message': 'Unknown host operating
system'}}
+
if 'sysprepInf' in vmParams:
if not self._createSysprepFloppyFromInf(vmParams['sysprepInf'],
vmParams['floppy']):