[virt-tools-list] [PATCH v2] virt install: Remove check for absolute path for fs target
Deepak C Shetty
deepakcs at linux.vnet.ibm.com
Fri Dec 23 07:04:52 UTC 2011
In case of qemu for default fs type (mount) target is not
actually a directory, it is merely a arbitrary string tag
that is exported to the guest as a hint for where to mount.
Signed-off-by: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>
---
v2:
- removed un-necessary self.conn check
virtinst/VirtualFilesystem.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/virtinst/VirtualFilesystem.py b/virtinst/VirtualFilesystem.py
index 5732a9e..0b8a876 100644
--- a/virtinst/VirtualFilesystem.py
+++ b/virtinst/VirtualFilesystem.py
@@ -116,7 +116,16 @@ class VirtualFilesystem(VirtualDevice.VirtualDevice):
def _get_target(self):
return self._target
def _set_target(self, val):
- if not os.path.isabs(val):
+ is_qemu = self.is_qemu()
+
+ # In case of qemu for default fs type (mount) target is not
+ # actually a directory, it is merely a arbitrary string tag
+ # that is exported to the guest as a hint for where to mount
+ if (is_qemu and
+ (self.type == self.TYPE_DEFAULT or
+ self.type == self.TYPE_MOUNT)):
+ pass
+ elif not os.path.isabs(val):
raise ValueError(_("Filesystem target '%s' must be an absolute "
"path") % val)
self._target = val
More information about the virt-tools-list
mailing list