You are viewing a plain text version of this content. The canonical link for it is here.
Posted to tashi-commits@incubator.apache.org by st...@apache.org on 2010/11/10 19:30:35 UTC

svn commit: r1033660 - /incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py

Author: stroucki
Date: Wed Nov 10 19:30:34 2010
New Revision: 1033660

URL: http://svn.apache.org/viewvc?rev=1033660&view=rev
Log:
Apply patch from Deepa Diwakar and Shobha Diwakar to provide a
"root=" line in Xen DomU configuration files

Modified:
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py?rev=1033660&r1=1033659&r2=1033660&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/xenpv.py Wed Nov 10 19:30:34 2010
@@ -156,6 +156,7 @@ class XenPV(VmControlInterface, threadin
 	def createXenConfig(self, vmName, 
 	                    image, macAddr, netID, memory, cores, hints, id):
 		bootstr = None
+		rootconfig = None
 		diskconfig = None
 		netconfig = None
 		memconfig = None
@@ -242,6 +243,9 @@ usbdevice='tablet'
 
 shadow_memory=8
 '''
+			rootconfig = '''
+root='/dev/xvda1 ro'
+'''
 			diskconfig = '''
 disk=['%s:%s,ioemu:%s,w']
 '''%(disk0, image, diskU)
@@ -251,7 +255,10 @@ vif = [ 'type=ioemu,bridge=%s,mac=%s' ]
 
 		else:
 			raise Exception, "Unknown vmType in hints: %s"%vmType
-
+		if rootconfig is None:
+			rootconfig = '''
+root ='/dev/xvda1 ro'
+'''
 
 		if diskconfig is None:
 			diskconfig = '''
@@ -283,11 +290,12 @@ extra='xencons=tty'
 #(bootloader, (kernel, extra), (kernel, ramdisk)), disk, vif, memory, vcpus, root, extra
 		f = open(fn, "w")
 		f.write(bootstr)
+		f.write(rootconfig)
 		f.write(diskconfig)
 		f.write(netconfig)
 		f.write(memconfig)
 		f.write(cpuconfig)
-# is root necessary?
+# is root necessary? Only when using kernel directly
 		f.write(extraconfig)
 		f.close()
 		return fn