I've installed a system with Ubuntu Server 16.04 and have KVM installed on it (I selected "virtualization server" during the install, so KVM is likely configured correctly).
the problem: I'm unable to install a KVM guest using virt-install. It acts as if it can't read the install media.
I'm getting this error "Couldn't find hvm kernel ..." when trying to create the VM:
Starting install...
ERROR Couldn't find hvm kernel for Ubuntu tree.
Domain installation does not appear to have been successful.
This is the script I'm using to try to create the VM; I run it using sudo.
#! /bin/bash
#
if [ ! -d /var/www/html/isos/ubus-docker ]; then
mkdir -p /var/www/html/isos/ubus-docker
fi
umount /var/www/html/isos/ubus-docker/
mount -o loop ~/iso/ubuntu-16.04.1-server-amd64.iso /var/www/html/isos/ubus-docker/
virt-install \
--connect qemu:///system \
--name ubus-docker \
--memory maxmemory=4096,memory=512 \
--vcpus 2 \
--location http://heind-gb0/isos/ubus-docker/ \
--extra-args "console=tty0 console=ttyS0,115200" \
--os-variant ubuntu16.04 \
--disk path=/dev/heind-gb0-vg/vm-ubus-docker \
--network network=default \
--virt-type kvm \
--hvm \
--graphics none
When I visit http://heind-gb0/isos/ubus-docker/ in a web browser, I see a nice list of the files and directories in the root of the ISO. (I installed and configured nginx explicitly to serve this ISO.) (note: that's a local server running on the KVM host, so don't bother surfing to it :-))
I don't know how to troubleshoot this. Any help would be welcome.
(Note: I'm running Ubuntu Server, console only, no GUI. And I want to do the guest VM install entirely from the console as well.)
UPDATE: This does seem to be an issue introduced in a recent release of virt-manager
. The issues is under discussion on the virt-tool-list list. And I'm looking through the source repo history to find working code and perhaps develop a patch to restore support for Ubuntu installation ISOs (and hoping someone more familiar with the code gets there first :-)).
UPDATE 2: It was an issue with the newer releases of virt-manager
. Now fixed (see answer in comments below). Not sure when fix will make it into virt-manager
packages though.