[virt-tools-list] [PATCH virt-install 1/4] virt-install: Set options.disk if the value comes from osinfo-db

Fabiano Fidêncio fidencio at redhat.com
Fri Feb 8 15:23:55 UTC 2019

Commit 45ab922b2c0 moved the code to the way it was before the libosinfo
default changes. However, by not setting "options.disk" the parser will
error out and bail the installation as this option must be set. Only
parsing the disk doesn't seem to be enough as the check is actually done
against "options.disk".

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
 virt-install | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virt-install b/virt-install
index 715039fe..3aa643d2 100755
--- a/virt-install
+++ b/virt-install
@@ -500,6 +500,7 @@ def set_resources_from_osinfo(options, guest):
     if res and res.get('storage') > 0:
         diskstr = 'size=%d' % (res.get('storage') // (1024 ** 3))
         logging.debug("Generated default libosinfo '--disk %s'", diskstr)
+        options.disk = [diskstr]
         cli.ParserDisk(guest, diskstr).parse(None)

More information about the virt-tools-list mailing list