I have upgraded my OS to Ubuntu 16.04 and am trying to install an ubuntu 14.04 guest from scratch using my KVM management tool that I have been using successfully on Ubuntu 14.04 for some time now. Unfortunately, it looks like virt-install has changed and no longer accepts the --location
parameter with an ISO image as it will output the following error:
Starting install...
ERROR Could not find an installable distribution at '/home/programster/apps/KVM-Command-Generator/installation_media/Ubuntu_14.04.iso'
The location must be the root directory of an install tree.
However, if I nwo use the --cdrom
parameter in place of --location
it no longer likes the fact that I have an --extra-args
parameter specifying the location of the kickstart/preseed file and that the console is to use ttyS0.
--extra-args "console=ttyS0 ks=http://pastebin.com/raw.php?i=SrTvbt6Z"
At this point, I tried going with just deleting the --extra-args parameter to install from the CD, but if you do this, you can't see any output in the CLI for the installation. I am guessing it wants you to connect via VNC or something which is not ideal.
For reference, the original installation commands were:
qemu-img create -f qcow2 -o preallocation=metadata,lazy_refcounts=on /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img 20G
virt-install --connect qemu:///system \
--nographics \
--os-type linux \
--accelerate \
--hvm \
--network network=default,model=virtio \
--name ubuntu14.04 \
--os-variant=ubuntu14.04 \
--location /home/programster/apps/KVM-Command-Generator/installation_media/Ubuntu_14.04.iso \
--extra-args "console=ttyS0 ks=http://pastebin.com/raw.php?i=SrTvbt6Z" \
--disk /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img,bus=virtio,format=qcow2 \
--ram 512 \
--vcpus 2
And the new commands are:
qemu-img create -f qcow2 -o preallocation=metadata,lazy_refcounts=on /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img 20G
virt-install --connect qemu:///system \
--nographics \
--os-type linux \
--accelerate \
--hvm \
--network network=default,model=virtio \
--name ubuntu14.04 \
--os-variant=ubuntu14.04 \
--cdrom /home/programster/apps/KVM-Command-Generator/installation_media/Ubuntu_14.04.iso \
--disk /home/programster/apps/KVM-Command-Generator/vms/ubuntu14.04.img,bus=virtio,format=qcow2 \
--ram 512 \
--vcpus 2
Question
How can I get virt-install to install from a local ISO image with the extra arguments to specify the location of the kickstart/preseed file, and allow me to see the progress and possibly choose options through the CLI rather than using VNC?
Perhaps I have to specify a web url instead of an ISO image to --location
, but I would prefer it if I could pass a local location in case the internet is not that great.
Extra Info
- Virt-install version: 1.3.2
- Ubuntu 16.04 4.4.0-24-generic
- Link to the ISO image I downloaded to use (ubuntu mini iso)