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.

Signed-off-by: Ryan O'Connor <rjo@cs.ubc.ca>
Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>
This commit is contained in:
Keir Fraser committed 2009-06-19 08:43:28 +01:00
1 parent 0ca1669871
commit 36553c2859
1 file changed
+4 -2
@@ -159,6 +159,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);
self.deviceClass='vbd'
devid = BlkifController.createDevice(self, config)
self.deviceClass='tap'
return devid
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.