[PATCH 2/2] livemedia-creator: Add option to create qcow2 disk images
Chris Lumens
clumens at redhat.com
Thu Mar 13 20:52:11 UTC 2014
> @@ -591,6 +595,20 @@ def novirt_install(opts, disk_img, disk_size, repo_url):
> if rc:
> raise InstallError("novirt_install failed")
>
> + if opts.qcow2:
> + log.info("Converting %s to qcow2", disk_img)
> + qcow2_args = []
> + if opts.qcow2_args:
> + for arg in opts.qcow2_args:
Just as a stylistic thing, you shouldn't both need to test for non-empty
and then iterate. Just iterating should be fine since if it's an empty
list it will iterate zero times.
> @@ -605,11 +623,22 @@ def virt_install(opts, install_log, disk_img, disk_size):
> if opts.proxy:
> kernel_args += " proxy="+opts.proxy
>
> + if opts.qcow2:
> + # virt-install can't take all the qcow2 options so create the image first
> + qcow2_args = []
> + if opts.qcow2_args:
> + for arg in opts.qcow2_args:
Here too.
- Chris
More information about the anaconda-patches
mailing list