Ubuntu – Using virt-install and http preseed to do unattended ubuntu 10.04 install

automated-installlibvirtUbuntu

The virt-install command line I used is below

sudo virt-install kvm ubuntu -v sudo virt-install -v -n golden-egg -r
256 –disk path=/var/lib/libvirt/images/golden-egg.qcow2,size=5
–os-type linux –os-variant ubuntulucid –force –cdrom=temp/ubuntu-10.04.1-server-amd64.iso –virt-type qemu –connect=qemu:///system –extra-args="interface=eth0 hostname=goldenegg domain=foo.internal
netcfg/get_ipaddress=192.168.1.15 netcfg/get_netmask=255.255.255.0
netcfg/get_gateway=192.168.1.1 netcfg/get_nameservers=192.168.1.1
netcfg/disable_dhcp=true auto url=http://192.168.1.100/"

The ubuntu installer is launching but it goes into interactive mode. I've set a small webserver up to serve the preseed file and verified that it is being served on the url specified. However the server doesn't get hit on VM creation and there are no errors in the VM console or anything else I am able to go by.

Any suggests on how to proceed to get this working.

Best Answer

The problem is you can only use --extra-args when using --location, not when using --cdrom

See: https://bugzilla.redhat.com/show_bug.cgi?id=622661