]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
[main.iso in a vm] Make qemu-dm-wrapper aware of the possibility that it might be...
authorJonathan Ludlam <Jonathan.Ludlam@eu.citrix.com>
Mon, 7 Jun 2010 15:07:06 +0000 (16:07 +0100)
committerJonathan Ludlam <Jonathan.Ludlam@eu.citrix.com>
Mon, 7 Jun 2010 15:07:06 +0000 (16:07 +0100)
scripts/qemu-dm-wrapper

index 6a39147930d5a2700809db7d4f52aef328e1c5f3..f09c3bc63780a3689d833c3284d2e46ac7a1fad9 100755 (executable)
@@ -15,6 +15,17 @@ SQUASH_VNC=False
 SDL_ENABLED=True
 SDL_ZOOM_ENABLED=True
 
+IS_SDK = (int(os.popen("xenstore-read domid").read()) != 0)
+
+if IS_SDK:
+    time.sleep(2)
+    os.system("xenstore-write -s /local/domain/%d/qemu-pid %d\n" % (DOMID, os.getpid()))
+    os.system("xenstore-write -s /local/domain/%d/device-misc/dm-ready 1" % DOMID)
+    os.system("xenstore-write -s /local/domain/%d/console/vnc-port %d\n" % (DOMID, 6900+DOMID))
+    while True:
+        time.sleep(1)
+
+
 # enabling core dumps if /var/xen/qemu is not a ramdisk, disabling otherwise
 try :
     newlimits = None