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:
ERROR Couldn't find hvm kernel for Ubuntu tree.
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:
$ virt-install --version
1.5.1
I've included the output while using --debug below:
$ 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=
<pool type='dir'>
<name>virt</name>
<uuid>b91e3a3d-ca07-43f9-bbc2-866e6ded1bde</uuid>
<capacity unit='bytes'>379406721024</capacity>
<allocation unit='bytes'>100485763072</allocation>
<available unit='bytes'>278920957952</available>
<source>
</source>
<target>
<path>/srv/virt</path>
<permissions>
<mode>0755</mode>
<owner>1000</owner>
<group>1000</group>
</permissions>
</target>
</pool>
[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=<class 'virtinst.urlfetcher.UbuntuDistro'>
[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 <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 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.
For reference, the host machine is running Arch. Any ideas?
I had similar problem. Try to use other iso image. I replaced ubuntu-18.04.1-live-server-amd64.iso to ubuntu-18.04.1-server-amd64.iso (you can download it from this site: http://cdimage.ubuntu.com/releases/18.04/release/ ) and everrything goes forward ok.