Revert 17499:451ae3b8e5c8

Breaks HVM guest creation (bugzilla #1221).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
Keir Fraser committed 2008-04-23 13:30:24 +01:00
1 parent 6b20054a8c
commit 8318d7d63d
8 files changed
+65 -114

No files matched your search

-3
View File
@@ -1837,9 +1837,6 @@ class XendDomainInfo:
@raise: VmError for invalid devices
"""
if self.image:
self.image.prepareEnvironment()
ordered_refs = self.info.ordered_device_refs()
for dev_uuid in ordered_refs:
devclass, config = self.info['devices'][dev_uuid]
-30
View File
@@ -185,30 +185,6 @@ class ImageHandler:
"""Build the domain. Define in subclass."""
raise NotImplementedError()
def prepareEnvironment(self):
"""Prepare the environment for the execution of the domain. This
method is called before any devices are set up."""
domid = self.vm.getDomid()
# Delete left-over pipes
try:
os.unlink('/var/run/tap/qemu-read-%d' % domid)
os.unlink('/var/run/tap/qemu-write-%d' % domid)
except:
pass
# No device model, don't create pipes
if self.device_model is None:
return
# 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)
# Return a list of cmd line args to the device models based on the
# xm config file
def parseDeviceModelArgs(self, vmConfig):
@@ -435,12 +411,6 @@ class ImageHandler:
self.pid = None
state = xstransact.Remove("/local/domain/0/device-model/%i"
% self.vm.getDomid())
try:
os.unlink('/var/run/tap/qemu-read-%d' % self.vm.getDomid())
os.unlink('/var/run/tap/qemu-write-%d' % self.vm.getDomid())
except:
pass
class LinuxImageHandler(ImageHandler):
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.