Bug 1785643 - virt-install with --noautoconsole --transient --wait always reports failure
Summary: virt-install with --noautoconsole --transient --wait always reports failure
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-20 14:23 UTC by Lars Kellogg-Stedman
Modified: 2019-12-22 23:06 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-12-22 23:06:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Lars Kellogg-Stedman 2019-12-20 14:23:22 UTC
Description of problem:

I'm using virt-install to build images using Kickstart. I'm trying to run virt-install like this:

  virt-install --noautoconsole --noreboot --transient --wait ...
  
But this always reports a failure at the end of the install:

  Domain installation still in progress.
  Waiting for installation to complete.
  ERROR    Domain not found: no domain with matching uuid 'b8d6aa9c-1548-4e63-9cbb-bf171899960d' (ovn-base)
  Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start ovn-base
  otherwise, please restart your installation.

This is problematic because it makes it impossible to differentiate between "virt-install failed because you passed a bad option" vs "the virtual machine exited".

Version-Release number of selected component (if applicable):

  virt-install-2.2.1-2.fc31.noarch

How reproducible:

  The specific command line I'm using is:
  
  virt-install -n ovn-base -r 2500 -w network=default --os-variant rhel7.7 \
    --noautoconsole \
    --noreboot \
    --initrd-inject ovn-base.ks \
    --graphics none \
    --extra-args="console=ttyS0,115200n8 ks=file:/ovn-base.ks" \
    --disk vol=default/ovn-base.qcow2 \
    --location http://mirror.math.princeton.edu/pub/fedora/linux/releases/31/Everything/x86_64/os/ \
    --transient --wait \
    --console file,path=$PWD/ovn-base.log

Comment 1 Cole Robinson 2019-12-22 23:06:44 UTC
Thanks for the report, should be fixed upstream now:

commit 6bec5474db0cb82ff8f0299febcbf302729553a5 (HEAD -> master)
Author: Cole Robinson <crobinso>
Date:   Sun Dec 22 18:03:19 2019 -0500

    virt-install: Check --transient status in domain --wait


Note You need to log in before you can comment on or make changes to this bug.