Skip to contentSkip to conversation

xend: fix BlktapController's device creation

PATCH New Ryan O'Connor 1 participant 1 message Jun 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: fix BlktapController's device creation

Reset BlktapController's device class back to 'tap' once the device has been created. This fixes save/restore for VMs with blktap2 disks.

tools/python/xen/xend/server/BlktapController.py +4 -2
diff -r 55ca7ef865b4 -r b3be5993ab7c tools/python/xen/xend/server/BlktapController.py
@@ -149,6 +149,8 @@ class BlktapController(BlkifController):
         #modify the configuration to attach as a vbd, now that the
         #device is configured.  Then continue to create the device
         config.update({'uname' : 'phy:' + device.rstrip()})
+
         self.deviceClass='vbd'
-
-        return BlkifController.createDevice(self, config);
+        devid = BlkifController.createDevice(self, config)
+        self.deviceClass='tap'
+        return devid