View Issue Details

IDProjectCategoryView StatusLast Update
0015139CentOS-7virt-managerpublic2018-09-27 08:43
Reporterwaldner 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version7.5.1804 
Target VersionFixed in Version 
Summary0015139: virt-install: Cannot install Ubuntu from ISO ('Couldn't find hvm kernel for Ubuntu tree')
DescriptionInstalling an Ubuntu 16.04 (or 14.04) guest using virt-install, errors out with the following message:

Starting install...
Retrieving file info... | 67 B 00:00:00
ERROR Couldn't find hvm kernel for Ubuntu tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start k8s
otherwise, please restart your installation.
Steps To ReproduceUse the following command line (as root, as required by --location being an ISO image):

# virt-install --cpu host --hvm --arch x86_64 --name test --os-type linux --os-variant ubuntu16.04 --virt-type kvm --connect=qemu:///system --vcpus 2 --memory 2048 --serial pty --console pty --disk=test.qcow2,format=qcow2,bus=virtio --location ubuntu-16.04.3-server-amd64.iso --network network=default,model=virtio

Starting install...
Retrieving file info... | 67 B 00:00:00
ERROR Couldn't find hvm kernel for Ubuntu tree.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start k8s
otherwise, please restart your installation.

Same thing loopback-mounting the ISO and using --location /path/to/loopback/iso
Additional Information# virt-install --version
1.4.3
# rpm -qa | grep virt-install
virt-install-1.4.3-3.el7.noarch

Running with --debug, it appears that it's looking for the kernel at the wrong location:

...
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (cli:278) Requesting libvirt URI qemu:///system
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (cli:281) Received libvirt URI qemu:///system
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (virt-install:358) Requesting virt method 'hvm', hv type 'kvm'.
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (virt-install:583) Received virt method 'kvm'
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (virt-install:584) Hypervisor name is 'hvm'
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (virt-install:270) Distilled --network options: ['network=default,model=virtio']
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (virt-install:183) Distilled --disk options: ['test.qcow2,format=qcow2,bus=virtio']
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (guest:251) Setting Guest.os_variant to 'ubuntu16.04'
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (virt-install:697) Guest.has_install_phase: True

Starting install...
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (guest:1153) Using default_graphics=spice
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (guest:1172) Local connection, disabling spice image compression.
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:57) Using scratchdir=/var/lib/libvirt/boot
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:304) Preparing mount at /var/lib/libvirt/boot/virtinstmnt.UjkVCY
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:314) mount cmd: ['/bin/mount', '-o', 'ro,loop', '/root/ubuntu-16.04.3-server-amd64.iso', '/var/lib/libvirt/boot/virtinstmnt.UjkVCY']
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:479) Finding distro store for location=/root/ubuntu-16.04.3-server-amd64.iso
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:498) variant=ubuntu16.04 has distro=ubuntu, looking for matching distro store to prioritize
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:505) Prioritizing distro store=<class 'virtinst.urlfetcher.UbuntuDistro'>
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:1113) Found treearch=amd64 in uri
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:145) hasFile(/var/lib/libvirt/boot/virtinstmnt.UjkVCY/current/images/MANIFEST) returning False
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:145) hasFile(/var/lib/libvirt/boot/virtinstmnt.UjkVCY/daily/MANIFEST) returning False
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:145) hasFile(/var/lib/libvirt/boot/virtinstmnt.UjkVCY/.disk/info) returning True
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:90) Fetching URI: /var/lib/libvirt/boot/virtinstmnt.UjkVCY/.disk/info
Retrieving file info... | 67 B 00:00:00
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:519) Detected distro name=Ubuntu osvariant=None
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:145) hasFile(/var/lib/libvirt/boot/virtinstmnt.UjkVCY/linux) returning False
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (urlfetcher:328) Cleaning up mount at /var/lib/libvirt/boot/virtinstmnt.UjkVCY
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (cli:316) File "/usr/share/virt-manager/virt-install", line 1008, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 1002, in main
    start_install(guest, options)
  File "/usr/share/virt-manager/virt-install", line 728, in start_install
    fail(e, do_exit=False)
  File "/usr/share/virt-manager/virtinst/cli.py", line 316, in fail
    logging.debug("".join(traceback.format_stack()))

[Fri, 03 Aug 2018 16:40:25 virt-install 19431] ERROR (cli:317) Couldn't find hvm kernel for Ubuntu tree.
[Fri, 03 Aug 2018 16:40:25 virt-install 19431] DEBUG (cli:319)
Traceback (most recent call last):
...


It looks for the kernel at /var/lib/libvirt/boot/virtinstmnt.UjkVCY/linux insted of /var/lib/libvirt/boot/virtinstmnt.UjkVCY/install/netboot/ubuntu-installer/amd64/linux, which is what I'd expect.
Tagsvirt-install
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-08-03 14:43 waldner New Issue
2018-08-03 14:58 waldner Tag Attached: virt-install