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

Orion Poplawski orion at nwra.com
Mon Dec 23 22:55:27 UTC 2019


On 12/23/19 12:15 PM, Cole Robinson wrote:
> 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
> 

So testing with virt-install from virt-manager 2.2.1 seems to show that it is
fixed there:

Starting install...
[Mon, 23 Dec 2019 15:51:24 virt-install 10285] DEBUG (urlfetcher:207)
hasFile(http://saga.cora.nwra.com/cblr/links/ubuntu-16.04.6-x86_64/install/netboot/ubuntu-installer/amd64/linux)
returning True
[Mon, 23 Dec 2019 15:51:24 virt-install 10285] DEBUG (urlfetcher:207)
hasFile(http://saga.cora.nwra.com/cblr/links/ubuntu-16.04.6-x86_64/install/netboot/ubuntu-installer/amd64/initrd.gz)
returning True
[Mon, 23 Dec 2019 15:51:24 virt-install 10285] DEBUG (urlfetcher:139) Fetching
URI:
http://saga.cora.nwra.com/cblr/links/ubuntu-16.04.6-x86_64/install/netboot/ubuntu-installer/amd64/linux
Retrieving file linux...                                                    |
6.9 MB  00:00:00
[Mon, 23 Dec 2019 15:51:25 virt-install 10285] DEBUG (urlfetcher:224) Saved
file to /home/orion-admin/.cache/virt-manager/boot/virtinst-myi01nu4-linux
[Mon, 23 Dec 2019 15:51:25 virt-install 10285] DEBUG (urlfetcher:139) Fetching
URI:
http://saga.cora.nwra.com/cblr/links/ubuntu-16.04.6-x86_64/install/netboot/ubuntu-installer/amd64/initrd.gz
Retrieving file initrd.gz...                                                |
49 MB  00:00:00
[Mon, 23 Dec 2019 15:51:25 virt-install 10285] DEBUG (urlfetcher:224) Saved
file to /home/orion-admin/.cache/virt-manager/boot/virtinst-xb1lqzf5-initrd.gz

Sorry for not testing that out earlier.

-- 
Orion Poplawski
Manager of NWRA Technical Systems          720-772-5637
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                 https://www.nwra.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3799 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20191223/bfa09961/attachment.p7s>


More information about the virt-tools-list mailing list