mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Revert 17499:451ae3b8e5c8
Breaks HVM guest creation (bugzilla #1221). Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
6b20054a8c
commit
8318d7d63d
8 files changed
+65
-114
No files matched your search
@@ -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]
|
||||
|
||||
@@ -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):
|
||||
|
||||