incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r736698 - /incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
Date Thu, 22 Jan 2009 16:41:05 GMT
Author: mryan3
Date: Thu Jan 22 08:41:03 2009
New Revision: 736698

URL: http://svn.apache.org/viewvc?rev=736698&view=rev
Log:
Bug fix to correctly set OSchild and migratingOut when resuming a nodemanager
Added a nicModel option to specify what NIC model to use for the virtual machine
Added options to qemu to make it capable of enabling VNC after initialization
Qemu backend now logs the command it executed to start a VM


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

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=736698&r1=736697&r2=736698&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Thu Jan 22 08:41:03 2009
@@ -153,7 +153,6 @@
 		for vmId in controlledVMs:
 			try:
 				child = self.loadChildInfo(vmId)
-				child.OSchild = False
 				child.monitorFd = os.open(child.ptyFile, os.O_RDWR | os.O_NOCTTY)
 				child.monitor = os.fdopen(child.monitorFd)
 				self.controlledVMs[child.pid] = child
@@ -259,7 +258,9 @@
 		child.pid = pid
 		child.ptyFile = ptyFile
 		child.monitorHistory = []
+		child.OSchild = False
 		child.errorBit = False
+		child.migratingOut = False
 		return child
 	
 	def saveChildInfo(self, child):
@@ -271,11 +272,12 @@
 		"""Universal function to start a VM -- used by instantiateVM, resumeVM, and prepReceiveVM"""
 		global lastCmd
 		(image, macAddr, memory, cores, diskModel, instanceId, opts) = self.instanceToOld(instance)
-		graphicString = "" if opts.get("enableDisplay", False) else "-nographic"
 		sourceString = "" if not source else "-incoming %s" % (source)
 		snapshotString = "" if diskModel == "persistent" else "-snapshot"
+		modelString = opts.get("nicModel", "e1000")
 		imageLocal = self.dfs.getLocalHandle("images/" + image)
-		cmd = "%s %s %s -hda %s -net nic,macaddr=%s -net tap -m %d -smp %d -serial none -monitor
pty %s" % (self.QEMU_BIN, graphicString, snapshotString, imageLocal, macAddr, memory, cores,
sourceString)
+		cmd = "%s %s -hda %s -net nic,macaddr=%s,model=%s -net tap -clock rtc -m %d -smp %d -serial
none -vnc none -monitor pty %s" % (self.QEMU_BIN, snapshotString, imageLocal, macAddr, modelString,
memory, cores, sourceString)
+		log.info("QEMU command: %s" % (cmd))
 		lastCmd = cmd
 		cmd = cmd.split()
 		(pipe_r, pipe_w) = os.pipe()



Mime
View raw message