title: Libvirt Ubuntu Installation HVM Issue
body: <p>So I've been trying to spin up an Ubuntu server install using virt-install, and I can't seem to get it to work. It fails out with the following message:</p>
  
  <pre><code>ERROR    Couldn't find hvm kernel for Ubuntu tree.
  </code></pre>
  
  <p>I've seen forum posts all over about this issue, but all of those seem to say the issue was fixed with version 1.5.1, which I'm currently using:</p>
  
  <pre><code>$ virt-install --version 
  1.5.1
  </code></pre>
  
  <p>I've included the output while using --debug below:</p>
  
  <pre><code>    $ virt-install --name u001 --ram 2048 --disk path=/srv/virt/ubuntu_u001.img,size=20 --hvm --debug --vcpus 2 --os-type linux --os-variant ubuntu18.04 --network bridge=virt0 --graphics none --console pty,target_type=serial --location '/mnt/ubu' --extra-args 'console=ttyS0,115200n8 serial'
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (cli:265) Launched with command line: /usr/share/virt-manager/virt-install --name u001 --ram 2048 --disk path=/srv/virt/ubuntu_u001.img,size=20 --hvm --debug --vcpus 2 --os-type linux --os-variant ubuntu18.04 --network bridge=virt0 --graphics none --console pty,target_type=serial --location /mnt/ubu --extra-args console=ttyS0,115200n8 serial
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (cli:279) Requesting libvirt URI default
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (cli:282) Received libvirt URI qemu:///system
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (virt-install:358) Requesting virt method 'hvm', hv type 'default'.
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (virt-install:583) Received virt method 'kvm'
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (virt-install:584) Hypervisor name is 'hvm'
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (virt-install:270) Distilled --network options: ['bridge=virt0']
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (virt-install:183) Distilled --disk options: ['path=/srv/virt/ubuntu_u001.img,size=20']
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (devicedisk:409) Creating volume 'ubuntu_u001.img' on pool 'virt'
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (devicedisk:535) disk.set_vol_install: name=ubuntu_u001.img poolxml=
  &lt;pool type='dir'&gt;
    &lt;name&gt;virt&lt;/name&gt;
    &lt;uuid&gt;b91e3a3d-ca07-43f9-bbc2-866e6ded1bde&lt;/uuid&gt;
    &lt;capacity unit='bytes'&gt;379406721024&lt;/capacity&gt;
    &lt;allocation unit='bytes'&gt;100485763072&lt;/allocation&gt;
    &lt;available unit='bytes'&gt;278920957952&lt;/available&gt;
    &lt;source&gt;
    &lt;/source&gt;
    &lt;target&gt;
      &lt;path&gt;/srv/virt&lt;/path&gt;
      &lt;permissions&gt;
        &lt;mode&gt;0755&lt;/mode&gt;
        &lt;owner&gt;1000&lt;/owner&gt;
        &lt;group&gt;1000&lt;/group&gt;
      &lt;/permissions&gt;
    &lt;/target&gt;
  &lt;/pool&gt;
  
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (distroinstaller:180) DistroInstaller location is a network source.
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (guest:251) Setting Guest.os_variant to 'ubuntu18.04'
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:56) Using scratchdir=/var/lib/libvirt/boot
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:503) Finding distro store for location=/mnt/ubu
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:522) variant=ubuntu18.04 has distro=ubuntu, looking for matching distro store to prioritize
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:529) Prioritizing distro store=&lt;class 'virtinst.urlfetcher.UbuntuDistro'&gt;
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:1144) No treearch found in uri, defaulting to arch=i386
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:144) hasFile(/mnt/ubu/current/images/MANIFEST) returning False
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:144) hasFile(/mnt/ubu/daily/MANIFEST) returning False
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:144) hasFile(/mnt/ubu/.disk/info) returning True
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:89) Fetching URI: /mnt/ubu/.disk/info
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:543) Detected distro name=Ubuntu osvariant=None
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (virt-install:697) Guest.has_install_phase: True
  
  Starting install...
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (urlfetcher:144) hasFile(/mnt/ubu/install/vmlinuz) returning False
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (cli:317)   File "/usr/share/virt-manager/virt-install", line 1008, in &lt;module&gt;
      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 317, in fail
      logging.debug("".join(traceback.format_stack()))
  
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] ERROR (cli:318) Couldn't find hvm kernel for Ubuntu tree.
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (cli:320) 
  Traceback (most recent call last):
    File "/usr/share/virt-manager/virt-install", line 707, in start_install
      transient=options.transient)
    File "/usr/share/virt-manager/virtinst/guest.py", line 480, in start_install
      self._prepare_install(meter, dry)
    File "/usr/share/virt-manager/virtinst/guest.py", line 313, in _prepare_install
      self.installer.prepare(self, meter)
    File "/usr/share/virt-manager/virtinst/installer.py", line 200, in prepare
      self._prepare(guest, meter)
    File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 220, in _prepare
      self._prepare_kernel_url(guest, fetcher)
    File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 128, in _prepare_kernel_url
      kernel, initrd, args = store.acquireKernel(guest)
    File "/usr/share/virt-manager/virtinst/urlfetcher.py", line 622, in acquireKernel
      {"distro": self.name, "type": self.type})
  RuntimeError: Couldn't find hvm kernel for Ubuntu tree.
  [Wed, 26 Sep 2018 04:18:25 virt-install 22043] DEBUG (cli:331) Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start u001
  otherwise, please restart your installation.
  Domain installation does not appear to have been successful.
  If it was, you can restart your domain by running:
    virsh --connect qemu:///system start u001
  otherwise, please restart your installation.
  </code></pre>
  
  <p>For reference, the host machine is running Arch. Any ideas?</p>