diff --git a/main.py b/main.py index 03d16a7..12eb0ad 100755 --- a/main.py +++ b/main.py @@ -6,9 +6,9 @@ from config import logging, client, BASE_PATH, WITHOUT_CEPH # If you are using WITHOUT_CEPH FLAG in .env -# then please make sure that /var/vm directory +# then please make sure that /var/image directory # exists otherwise this script would fail -if WITHOUT_CEPH and not os.path.isdir("/var/vm"): +if WITHOUT_CEPH and not os.path.isdir("/var/image"): exit(1) @@ -42,7 +42,7 @@ for image in images_to_be_created: snapshot_protect_command = ["rbd", "snap", "protect", f"{image_store_pool}/{image_uuid}@protected"] if WITHOUT_CEPH: - image_import_command = ["mv", "image.raw", os.path.join("/var/vm", image_uuid)] + image_import_command = ["mv", "image.raw", os.path.join("/var/image", image_uuid)] snapshot_creation_command = ["true"] snapshot_protect_command = ["true"] @@ -75,7 +75,6 @@ for image in images_to_be_created: try: # Convert .qcow2 to .raw subprocess.check_output(qemu_img_convert_command) - print("converting") except Exception as e: logging.exception(e) else: