Bug 1659242 - f29 virt-install broke coreos-assembler
Summary: f29 virt-install broke coreos-assembler
Keywords:
Status: CLOSED UPSTREAM
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: 2018-12-13 21:21 UTC by Colin Walters
Modified: 2019-02-04 20:03 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-02-03 18:08:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Colin Walters 2018-12-13 21:21:27 UTC
https://github.com/coreos/coreos-assembler/issues/195
specifically:
https://github.com/coreos/coreos-assembler/issues/195#issuecomment-440292975

To reproduce, easiest is to spin up a f29 container (or VM if you think in the past ;) ) and `make install` from a coreos-assembler git checkout, follow the docs in the README.md to do a build of FCOS: https://github.com/coreos/coreos-assembler/

Comment 1 Cole Robinson 2018-12-13 21:46:08 UTC
Can you provide the virt-install command line you are using, and the --debug output?

Comment 2 Colin Walters 2018-12-13 22:00:47 UTC
cmd: virt-install --connect=qemu:///session --name=coreos-inst-30486-1544738358 --noautoconsole --console=log.file=/srv/walters/fcos/tmp/build/install.log --filesystem=source=/srv/walters/fcos/tmp/build/tmp/anaconda,target=/mnt/logs,accessmode=mapped --filesystem=source=/srv/walters/fcos/repo,target=/mnt/ostree-repo,accessmode=mapped --wait=10 --noreboot --nographics --memory=2048 --vcpus=sockets=4,cores=1,threads=1 --os-variant=rhel7 --rng=/dev/urandom --check path_in_use=off --network=none --disk=path=/srv/walters/fcos/tmp/build/tmp/fedora-coreos-29.8-base.qcow2,cache=unsafe --location=/srv/walters/fcos/installer/Fedora-Everything-netinst-x86_64-28-1.1.iso --initrd-inject=/srv/walters/fcos/tmp/build/tmp/flattened.ks --extra-args "ks=file://flattened.ks console=tty0 console=ttyS0,115200n8 inst.cmdline inst.notmux"
Starting install...
ERROR    Could not find an installable distribution at '/srv/walters/fcos/installer/Fedora-Everything-netinst-x86_64-28-1.1.iso'

Comment 3 Colin Walters 2018-12-13 22:01:49 UTC
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (cli:239) Requesting libvirt URI qemu:///session
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (cli:242) Received libvirt URI qemu:///session
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (virt-install:346) Requesting virt method 'default', hv type 'default'.                                                                                      
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (virt-install:571) Received virt method 'kvm'
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (virt-install:572) Hypervisor name is 'hvm'
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (virt-install:258) Distilled --network options: ['none']                                                                                                     
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (virt-install:304) --graphics compat generated: none
[Thu, 13 Dec 2018 22:01:16 virt-install 32289] DEBUG (virt-install:171) Distilled --disk options: ['path=/srv/walters/fcos/tmp/build/tmp/fedora-coreos-29.8-1-base.qcow2,cache=unsafe']                           
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (guest:259) Setting Guest.os_variant to 'rhel7'
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (virt-install:685) Guest.has_install_phase: True

Starting install...                                                                                                                                                                                               
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urlfetcher:37) Using scratchdir=/home/walters/.cache/virt-manager/boot                                                                                      
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:230) Finding distro store for location=/srv/walters/fcos/installer/Fedora-Everything-netinst-x86_64-28-1.1.iso                                    
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:243) variant=rhel7.0 has distro=rhel, looking for matching distro store to prioritize                                                             
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:250) Prioritizing distro store=<class 'virtinst.urldetect.RHELDistro'>                                                                            
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urlfetcher:365) Running isoinfo: ['isoinfo', '-J', '-i', '/srv/walters/fcos/installer/Fedora-Everything-netinst-x86_64-28-1.1.iso', '-f']                   
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:40) Failed to acquire file=.treeinfo
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:40) Failed to acquire file=content
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:40) Failed to acquire file=current/images/MANIFEST                                                                                                
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:40) Failed to acquire file=daily/MANIFEST
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:40) Failed to acquire file=.disk/info
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (urldetect:40) Failed to acquire file=VERSION
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] DEBUG (cli:277)   File "/usr/share/virt-manager/virt-install", line 992, in <module>                                                                               
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 986, in main
    start_install(guest, options)
  File "/usr/share/virt-manager/virt-install", line 716, in start_install
    fail(e, do_exit=False)
  File "/usr/share/virt-manager/virtinst/cli.py", line 277, in fail
    logging.debug("".join(traceback.format_stack()))
                                                                                                                                                                                                                  
[Thu, 13 Dec 2018 22:01:17 virt-install 32289] ERROR (cli:278) Could not find an installable distribution at '/srv/walters/fcos/installer/Fedora-Everything-netinst-x86_64-28-1.1.iso'

Comment 4 Cole Robinson 2018-12-13 22:14:20 UTC
Okay looks like this is the same issue reported over here, which I was just commenting on :)  https://bugzilla.redhat.com/show_bug.cgi?id=1654055

--location + boot.iso doesn't work anymore. I didn't even know it used to work. I really don't want to add the code that made it work back into virt-install if I can avoid it.

Alternatives are: --location $url or --location $dir, or --location $fulltreeiso, which should all just work. Are any of those readily available in how your build process works?

Comment 5 Colin Walters 2018-12-13 22:34:32 UTC
BTW, 2.0.0 recursively tracebacks with --os-variant=rhel7

--- Logging error ---                                                                                                                                                                                              
Traceback (most recent call last):                                                                                                                                                                                 
  File "/usr/lib64/python3.7/logging/handlers.py", line 68, in emit                                                                                                                                                
    if self.shouldRollover(record):                                                                                                                                                                                
  File "/usr/lib64/python3.7/logging/handlers.py", line 184, in shouldRollover                                                                                                                                     
    msg = "%s\n" % self.format(record)                                                                                                                                                                             
  File "/usr/lib64/python3.7/logging/__init__.py", line 830, in format                                                                                                                                             
    return fmt.format(record)                                                                                                                                                                                      
  File "/usr/lib64/python3.7/logging/__init__.py", line 570, in format                                                                                                                                             
    record.message = record.getMessage()                                                                                                                                                                           
  File "/usr/lib64/python3.7/logging/__init__.py", line 331, in getMessage                                                                                                                                         
    msg = msg % self.args                                                                                                                                                                                          
TypeError: not enough arguments for format string                                                                                                                                                                  
Call stack:                                                                                                                                                                                                        
  File "/usr/share/virt-manager/virt-install", line 955, in <module>
    sys.exit(main())                                                
  File "/usr/share/virt-manager/virt-install", line 943, in main
    guest, installer = build_guest_instance(conn, options) 
  File "/usr/share/virt-manager/virt-install", line 539, in build_guest_instance    
    set_distro_variant(options, guest, installer)                  
  File "/usr/share/virt-manager/virt-install", line 317, in set_distro_variant
    guest.set_os_name(distro)                                                                                                                                                                                     
  File "/usr/share/virt-manager/virtinst/guest.py", line 261, in set_os_name                                                                                                                                      
    obj = OSDB.lookup_os(name)                                                                                                                                                                                    
  File "/usr/share/virt-manager/virtinst/osdict.py", line 200, in lookup_os                                                                                                                                        
    "This alias will be removed in the future."), (key, alias))                                                                                                                                                 
Message: "OS name '%s' is deprecated, using '%s' instead. This alias will be removed in the future."                                                                                                              
Arguments: (('rhel7', 'rhel7.0'),)

Comment 6 Cole Robinson 2018-12-13 22:46:51 UTC
(In reply to Colin Walters from comment #5)
> BTW, 2.0.0 recursively tracebacks with --os-variant=rhel7

Yeah that's fixed upstream, I need to do a bugfix release...

Comment 7 Colin Walters 2018-12-13 23:00:19 UTC
In theory yes, I took a stab at this in:

https://github.com/coreos/coreos-assembler/pull/225

However Anaconda fails to find its stage2, haven't debugged that yet.

Comment 8 Cole Robinson 2019-02-03 18:08:03 UTC
Upstream will now ask libosinfo for help identifying iso kernel/initrd locations. It uses a different database and can recognize many boot.iso style media, like fedora in my testing, and also has the added benefit that virt-install doesn't require an explicit --os-variant which is easy to miss and without it you'll get crap non-virtio defaults.

Additionally I added some CLI support for manually pointing at kernel/initrd paths in an ISO if virt-install fails to detect it, so there's a bit of a workaround. Say foo.iso isn't detected by libosinfo/virt-install, but it has a kernel at images/vmlinuz and initrd at images/initrd.gz, you can do

virt-install --location foo.iso,kernel=images/vmlinuz,initrd=images/initrd.gz

So there's at least a workaround. But if you find media that libosinfo/virt-install doesn't detect, please file a libosinfo bug.

I'll be doing a release and build shortly

Comment 9 Dusty Mabe 2019-02-03 19:33:58 UTC
Thanks Cole! Can you update us here with a link to that build once you have it and we can test things out?

Comment 10 Cole Robinson 2019-02-03 21:55:22 UTC
virt-manager 2.1.0 is out now and pushed to f29 updates-testing: https://bodhi.fedoraproject.org/updates/FEDORA-2019-c38a307cd5

Comment 11 Colin Walters 2019-02-04 20:03:19 UTC
https://github.com/coreos/coreos-assembler/pull/309


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