1

I am attempting to install a Ubuntu Server 18.04.1 guest on a Ubuntu Server 18.04.1 host using KVM. I have ubuntu-18.04.1-live-server-amd64.iso downloaded to the host.

When I run the following:

sudo virt-install -n marmoset-eugo-1 --description "Eng Undergrad Office Marmoset server" \

--os-type=Linux --os-variant=ubuntu18.04 --ram=4096 --vcpus=6 \

--disk path=/var/lib/libvirt/images/marmoset-eugo-1.img,bus=virtio,size=128,format=qcow2 \

--network bridge:br0 --graphics none \

--location /home/d24lau/Downloads/ubuntu-18.04.1-live-server-amd64.iso \

--extra-args console=ttyS0

I get the following error:

Starting install...

Retrieving file .treeinfo... | 0 B 00:00:00

Retrieving file content... | 0 B 00:00:00

Retrieving file info... | 77 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 marmoset-eugo-1

otherwise, please restart your installation.

So then I try to use the CDROM option instead:

sudo virt-install -n marmoset-eugo-1 --description "Eng Undergrad Office Marmoset server" \

--os-type=Linux --os-variant=ubuntu18.04 --ram=4096 --vcpus=6 \

--disk path=/var/lib/libvirt/images/marmoset-eugo-1.img,bus=virtio,size=128,format=qcow2 \

--network bridge:br0 --graphics none \

--cdrom /home/d24lau/Downloads/ubuntu-18.04.1-live-server-amd64.iso

At this point, it appears that the installation has started, but I do not seem to be able to interact with the installation. I am getting the following output and the terminal waits indefinitely:

WARNING CDROM media does not print to the text console by default, so you likely will not see text install output. You might want to use --location. See the man page for examples of using --location with CDROM media



Starting install...

Allocating 'marmoset-eugo-1.img' | 128 GB 00:00:00

Connected to domain marmoset-eugo-1

Escape character is ^]

Has anyone had any experience doing this type of install before? I'm trying to do everything from the CLI and the only video tutorials I can find do this through the graphical KVM virtual manager.

Thanks,

1 Answers1

0

I'd recommend taking a look at uvtool which in my experience works much better than virt-builder.

Actually given it is no more 2016 I'd even more recommend taking a look at the more modern and even cross platform solution of multipass.

Both tools will give you a CLI interface to spawn guests based on Ubuntu cloud images. This works much better than virt-install style deployments as "installing" in the classic meaning is neither required nor useful in a world deploying workloads in a "cloud style".

For further customization - if needed - both provide means to provide cloud-init user data.