[virt-tools-list] Need virt-install to boot Ubuntu netboot initrd

Cole Robinson crobinso at redhat.com
Mon Dec 23 19:15:17 UTC 2019


On 12/23/19 12:07 PM, Orion Poplawski wrote:
> I'm trying to use koan with cobbler to install a Ubuntu 16.04 VM.  koan
> invokes virt-install with:
> 
> 'virt-install', '--connect', 'qemu:///system', '--name', 'vmub16', '--ram',
> '2000', '--vcpus', '1', '--graphics', 'spice', '--virt-type', 'kvm',
> '--machine', 'pc', '--location',
> 'http://saga.cora.nwra.com/cblr/links/ubuntu-16.04.6-x86_64/',
> '--extra-args=auto-install/enable=true priority=critical
> url=http://saga.cora.nwra.com/cblr/svc/op/ks/system/vmub16 ksdevice=link lang=
> text ', '--arch', 'x86_64', '--os-variant', 'virtio26', '--disk',
> 'path=/dev/mapper/vg_nvme-vmub16--disk0,size=35,bus=scsi,format=raw',
> '--network', 'bridge=br0,mac=00:16:3e:32:4f:a1', '--wait', '0', '--noautoconsole'
> 
> The problem is that virt-install appears to see the install image as a CD
> image (which it is since that is what gets imported into cobbler) and boots
> the normal CD initrd which does not activate the network and cannot do a
> network install.
> 
> What magic do I need to do to get it to use the netboot kernel/initrd
> location?  --debug output is attached.

virt-install has some weird behavior here, see the code here:
https://github.com/virt-manager/virt-manager/blob/master/virtinst/install/urldetect.py#L653

Maybe it's getting something wrong here for ubuntu. Possibly deleting
the .disk/info file in the tree will help, but might just give you the
same kernel/initrd paths.

You can alter the command --location
$URL,kernel=./relative/path/to/vmlinuz,initrd=./relative/path/to/initrd
to point at a working pair relative to the URL, but no idea if koan
provides that option. That's virt-manager 2.1.0+ though

- Cole




More information about the virt-tools-list mailing list