[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xend: Create /var/run/tap during device model setup



Keir Fraser schrieb:
> On 23/4/08 10:59, "Li, Haicheng" <haicheng.li@xxxxxxxxx> wrote:
> 
>> 1. Fail to create any HVM guest on IA32PAE host
>> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1221
> 
> Looks like it is due to Kevin Wolf's changeset 17499. Your attempt to go
> back to older tools obviously didn't work -- the backtrace in xend.log comes
> from a line introduced by c/s 17499.

Create the directory /var/run/tap if it doesn't exist yet. Try to
continue even if the blktap communication pipes couldn't be created. The
VM might not need tap:ioemu and run just fine.

Signed-off-by: Kevin Wolf <kwolf@xxxxxxx>
diff -r 1d218f8898c9 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Apr 23 13:50:40 2008
+++ b/tools/python/xen/xend/image.py    Wed Apr 23 16:25:42 2008
@@ -205,9 +205,21 @@
         # If we use a device model, the pipes for communication between
         # blktapctrl and ioemu must be present before the devices are 
         # created (blktapctrl must access them for new block devices)
-        os.mkfifo('/var/run/tap/qemu-read-%d' % domid, 0600)
-        os.mkfifo('/var/run/tap/qemu-write-%d' % domid, 0600)
-        
+
+        # mkdir throws an exception if the path already exists
+        try:
+            os.mkdir('/var/run/tap', 0755)
+        except:
+            pass
+
+        try:
+            os.mkfifo('/var/run/tap/qemu-read-%d' % domid, 0600)
+            os.mkfifo('/var/run/tap/qemu-write-%d' % domid, 0600)
+        except OSError, e:
+            log.warn('Could not create blktap pipes for domain %d' % domid)
+            log.exception(e)
+            pass
+
 
     # Return a list of cmd line args to the device models based on the
     # xm config file
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.