This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


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

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xend: Create /var/run/tap during device model setup
From: Kevin Wolf <kwolf@xxxxxxx>
Date: Wed, 23 Apr 2008 15:41:52 +0200
Cc: "Li, Haicheng" <haicheng.li@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 23 Apr 2008 06:47:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C434E7B2.17BFC%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C434E7B2.17BFC%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20060911)
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
<Prev in Thread] Current Thread [Next in Thread>