Revision a002ed79
b/Makefile.am | ||
---|---|---|
985 | 985 |
echo "NODED_USER = '$(NODED_USER)'"; \ |
986 | 986 |
echo "NODED_GROUP = '$(NODED_GROUP)'"; \ |
987 | 987 |
echo "DISK_SEPARATOR = '$(DISK_SEPARATOR)'"; \ |
988 |
echo "QEMUIMG_PATH = '$(QEMUIMG_PATH)'"; \ |
|
988 | 989 |
if [ "$(HTOOLS)" ]; then \ |
989 | 990 |
echo "HTOOLS = True"; \ |
990 | 991 |
else \ |
b/configure.ac | ||
---|---|---|
335 | 335 |
|
336 | 336 |
if test "$enable_htools" != "no"; then |
337 | 337 |
|
338 |
# Check for qemu-img |
|
339 |
AC_ARG_VAR(QEMUIMG_PATH, [qemu-img path]) |
|
340 |
AC_PATH_PROG(QEMUIMG_PATH, [qemu-img], []) |
|
341 |
if test -z "$QEMUIMG_PATH" |
|
342 |
then |
|
343 |
AC_MSG_WARN([qemu-img not found, using ovfconverter will not be possible]) |
|
344 |
fi |
|
345 |
|
|
338 | 346 |
# Check for ghc |
339 | 347 |
AC_ARG_VAR(GHC, [ghc path]) |
340 | 348 |
AC_PATH_PROG(GHC, [ghc], []) |
b/lib/constants.py | ||
---|---|---|
1700 | 1700 |
# Temporary external/shared storage parameters |
1701 | 1701 |
BLOCKDEV_DRIVER_MANUAL = "manual" |
1702 | 1702 |
|
1703 |
# qemu-img path, required for ovfconverter |
|
1704 |
QEMUIMG_PATH = _autoconf.QEMUIMG_PATH |
|
1705 |
|
|
1703 | 1706 |
# Whether htools was enabled at compilation time |
1704 | 1707 |
HTOOLS = _autoconf.HTOOLS |
1705 | 1708 |
# The hail iallocator |
b/lib/ovf.py | ||
---|---|---|
143 | 143 |
COW: "http://www.gnome.org/~markmc/qcow-image-format.html", |
144 | 144 |
} |
145 | 145 |
|
146 |
def CheckQemuImg(): |
|
147 |
""" Make sure that qemu-img is present before performing operations. |
|
148 |
|
|
149 |
@raise errors.OpPrereqError: when qemu-img was not found in the system |
|
150 |
|
|
151 |
""" |
|
152 |
if not constants.QEMUIMG_PATH: |
|
153 |
raise errors.OpPrereqError("qemu-img not found at build time, unable" |
|
154 |
" to continue") |
|
146 | 155 |
|
147 | 156 |
def LinkFile(old_path, prefix=None, suffix=None, directory=None): |
148 | 157 |
"""Create link with a given prefix and suffix. |
... | ... | |
916 | 925 |
@raise errors.OpPrereqError: convertion of the disk failed |
917 | 926 |
|
918 | 927 |
""" |
928 |
CheckQemuImg() |
|
919 | 929 |
disk_file = os.path.basename(disk_path) |
920 | 930 |
(disk_name, disk_extension) = os.path.splitext(disk_file) |
921 | 931 |
if disk_extension != disk_format: |
... | ... | |
953 | 963 |
@raise errors.OpPrereqError: format information cannot be retrieved |
954 | 964 |
|
955 | 965 |
""" |
966 |
CheckQemuImg() |
|
956 | 967 |
args = ["qemu-img", "info", disk_path] |
957 | 968 |
run_result = utils.RunCmd(args, cwd=os.getcwd()) |
958 | 969 |
if run_result.failed: |
... | ... | |
1317 | 1328 |
information or size information is invalid or creation failed |
1318 | 1329 |
|
1319 | 1330 |
""" |
1331 |
CheckQemuImg() |
|
1320 | 1332 |
assert self.options.disks |
1321 | 1333 |
results = {} |
1322 | 1334 |
for (disk_id, disk_desc) in self.options.disks: |
Also available in: Unified diff