<div dir="ltr">Hi Pavel,<div><br></div><div>I am running virt-install version 1.5.0 on CentOS Linux release 7.6.1810 (Core) server.</div><div><br></div><div>#virt-install --name=kalilinux --file=/linuxkvmaddgbdisk/kalilinux.img --file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0 --os-type=linux --os-variant=debian9 --graphics none --location /linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso,kernel=install.amd/vmlinuz,initrd=install.amd/initrd.gz --extra-args="console=ttyS0"</div><div><br>ERROR    Error validating install location: Validating install media '/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso,kernel=install.amd/vmlinuz,initrd=install.amd/initrd.gz' failed: Could not start storage pool: cannot open directory '/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso,kernel=install.amd/vmlinuz,initrd=install.amd': No such file or directory</div><div><br></div><div><br>#virt-install --name=kalilinux --file=/linuxkvmaddgbdisk/kalilinux.img --file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0 --os-type=linux --os-variant=debian9 --graphics none --location /linuxkvmaddgbdisk kali-linux-2020.2-installer-amd64.iso,kernel=install.amd/gtk/vmlinuz,initrd=install.amd/gtk/initrd.gz --extra-args="console=ttyS0"<br>usage: virt-install --name NAME --memory MB STORAGE INSTALL [options]<br>virt-install: error: unrecognized arguments: kali-linux-2020.2-installer-amd64.iso,kernel=install.amd/gtk/vmlinuz,initrd=install.amd/gtk/initrd.gz<br>#<br></div><div><br></div><div><div>Any help will be highly appreciated and I look forward to hearing from you. Please let me know if you need any additional details. Thanks in Advance.</div><div><div><br></div></div><div>Best Regards,</div><div><br></div><div>Kaushal</div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2020 at 5:44 PM Pavel Hrdina <<a href="mailto:phrdina@redhat.com">phrdina@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Aug 07, 2020 at 05:05:48PM +0530, Kaushal Shriyan wrote:<br>
> On Fri, Aug 7, 2020 at 1:10 PM Erik Skultety <<a href="mailto:eskultet@redhat.com" target="_blank">eskultet@redhat.com</a>> wrote:<br>
> <br>
> > On Wed, Aug 05, 2020 at 10:13:57PM +0530, Kaushal Shriyan wrote:<br>
> > > On Wed, Aug 5, 2020 at 1:32 PM Pavel Hrdina <<a href="mailto:phrdina@redhat.com" target="_blank">phrdina@redhat.com</a>> wrote:<br>
> > ><br>
> > > > On Wed, Aug 05, 2020 at 06:57:11AM +0530, Kaushal Shriyan wrote:<br>
> > > > > Hi,<br>
> > > > ><br>
> > > > > I am trying to install kali-linux-2020.2-installer-amd64.iso (<br>
> > > > > <a href="https://www.kali.org/downloads/" rel="noreferrer" target="_blank">https://www.kali.org/downloads/</a>) using KVM virt-install tool<br>
> > > > ><br>
> > > > > #virt-install --name=kalilinux<br>
> > --file=/linuxkvmaddgbdisk/kalilinux.img<br>
> > > > > --file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0<br>
> > > > > --os-type=linux --os-variant=debian9 --graphics none<br>
> > > > > --location=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso<br>
> > > > > --extra-args="console=ttyS0<br>
> > > > ><br>
> > > > > Starting install...<br>
> > > > > Retrieving file .treeinfo...<br>
> > > > ><br>
> > > > >                               |    0 B  00:00:00<br>
> > > > > Retrieving file content...<br>
> > > > ><br>
> > > > >                               |    0 B  00:00:00<br>
> > > > > Retrieving file info...<br>
> > > > ><br>
> > > > >                              |  104 B  00:00:00<br>
> > > > > Retrieving file info...<br>
> > > > ><br>
> > > > >                              |  104 B  00:00:00<br>
> > > > > Retrieving file info...<br>
> > > > ><br>
> > > > >                              |  104 B  00:00:00<br>
> > > > > ERROR    Could not find an installable distribution at<br>
> > > > > '/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso': The URL<br>
> > could<br>
> > > > > not be accessed, maybe you mistyped?<br>
> > > > ><br>
> > > > > The location must be the root directory of an install tree.<br>
> > > > > See virt-install man page for various distro examples.<br>
> > > > > Domain installation does not appear to have been successful.<br>
> > > > > If it was, you can restart your domain by running:<br>
> > > > >   virsh --connect qemu:///system start kalilinux<br>
> > > > > otherwise, please restart your installation.<br>
> > > > ><br>
> > > > ><br>
> > > > > #virt-install --name=kalilinux<br>
> > --file=/linuxkvmaddgbdisk/kalilinux.img<br>
> > > > > --file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0<br>
> > > > > --os-type=linux --os-variant=debian9 --graphics none<br>
> > > > > --cdrom=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso<br>
> > > > > --extra-args="console=ttyS0"<br>
> > > > > ERROR    --extra-args only work if specified with --location. See<br>
> > the man<br>
> > > > > page for examples of using --location with CDROM media<br>
> > > > ><br>
> > > > > I did not find kali OS details to provide an option for*<br>
> > --os-variant=<br>
> > > > * When<br>
> > > > > I ran osinfo-query os | grep kali it did not return anything.<br>
> > > > > Any help will be highly appreciated and I look forward to hearing<br>
> > from<br>
> > > > you.<br>
> > > > > Thanks in advance.<br>
> > > ><br>
> > > > Hi,<br>
> > > ><br>
> > > > Using --location with ISO image requires specific file to be available<br>
> > > > in the ISO image where virt-install can look to figure out path to<br>
> > linux<br>
> > > > kernel and initrd otherwise it is not able to use --location and<br>
> > > > --extra-args as well.<br>
> > > ><br>
> > > > If you look into virt-install man page in the section for --location<br>
> > you<br>
> > > > can find this example:<br>
> > > ><br>
> > > >     Additionally, --location can take 'kernel' and 'initrd' sub<br>
> > options.<br>
> > > >     These paths relative to the specified location URL/ISO that allow<br>
> > > >     selecting specific files for kernel/initrd within the install tree.<br>
> > > >     This can be useful if virt-install/ libosinfo doesn't know where to<br>
> > > >     find the kernel in the specified --location.<br>
> > > ><br>
> > > >     For example, if you have an ISO that libosinfo doesn't know about<br>
> > > >     called my-unknown.iso, with a kernel at 'kernel/fookernel' and<br>
> > > >     initrd at 'kernel/fooinitrd', you can make this work with:<br>
> > > ><br>
> > > >         --location<br>
> > > > my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd<br>
> > > ><br>
> > > ><br>
> > > > You can use isoinfo to get the content of your ISO image:<br>
> > > ><br>
> > > >     isoinfo -J -i /path/to/your.iso -f<br>
> > > ><br>
> > > > and use the --location with kernel and initrd parameters which will<br>
> > make<br>
> > > > it work and --extra-args will work as well.<br>
> > > ><br>
> > > > Pavel<br>
> > > ><br>
> > ><br>
> > > Hi Pavel,<br>
> > ><br>
> > > Thanks for your email and much appreciated. I have pasted the output here<br>
> > > <a href="https://paste.centos.org/view/89952d91" rel="noreferrer" target="_blank">https://paste.centos.org/view/89952d91</a><br>
> ><br>
> > Hi,<br>
> > ^this URL you provided already expired, consider using longer time periods<br>
> > for pastebin services when posting to a mailing list.<br>
> ><br>
> > ><br>
> > > #virt-install --name=kalilinux --file=/linuxkvmaddgbdisk/kalilinux.img<br>
> > > --file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0<br>
> > > --os-type=linux --os-variant=debian9 --graphics none<br>
> > > --location=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso<br>
> > > --extra-args="console=ttyS0<br>
> > ><br>
> > > --location my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd<br>
> > ><br>
> > > --location<br>
> > > kali-linux-2020.2-installer-amd64.iso,kernel=kernel/?,initrd=kernel/?<br>
> > ><br>
> > > I did not find kali OS details to provide an option for* --os-variant=<br>
> > * When<br>
> > > I ran osinfo-query os | grep kali it did not return anything. What should<br>
> ><br>
> > There's over 500 Linux distros out there with the vast majority being just<br>
> > derivatives of the major distributions, so it requires someone who cares<br>
> > about<br>
> > a specific distro to contribute the required changes to libosinfo and<br>
> > commit to<br>
> > maintaining it to keep the information up to date.<br>
> ><br>
> > > be the value for --os-variant= as i want to install<br>
> > > kali-linux-2020.2-installer-amd64.iso (<a href="https://www.kali.org/downloads/" rel="noreferrer" target="_blank">https://www.kali.org/downloads/</a>)<br>
> > > using KVM virt-install tool<br>
> ><br>
> > For any practical purposes, Debian 10 should do just fine in terms of<br>
> > pulling<br>
> > the recommended VM settings from osinfo-db as Kali is derived from Debian.<br>
> ><br>
> > Regards,<br>
> > Erik<br>
> ><br>
> ><br>
> Hi Erik,<br>
> <br>
> Thanks Erik for the reply. I am running<br>
> <br>
> #virt-install --name=kalilinux --file=/linuxkvmaddgbdisk/kalilinux.img<br>
> --file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0<br>
> --os-type=linux --os-variant=debian9 --graphics none<br>
> --location=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso<br>
> --extra-args="console=ttyS0"<br>
> <br>
> Starting install...<br>
> Retrieving file .treeinfo...<br>
> <br>
>                               |    0 B  00:00:00<br>
> Retrieving file content...<br>
> <br>
>                               |    0 B  00:00:00<br>
> Retrieving file info...<br>
> <br>
>                              |  104 B  00:00:00<br>
> Retrieving file info...<br>
> <br>
>                              |  104 B  00:00:00<br>
> Retrieving file info...<br>
> <br>
>                              |  104 B  00:00:00<br>
> ERROR    Could not find an installable distribution at<br>
> '/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso': The URL could<br>
> not be accessed, maybe you mistyped?<br>
> <br>
> The location must be the root directory of an install tree.<br>
> See virt-install man page for various distro examples.<br>
> Domain installation does not appear to have been successful.<br>
> If it was, you can restart your domain by running:<br>
>   virsh --connect qemu:///system start kalilinux<br>
> otherwise, please restart your installation.<br>
> <br>
> #virt-install --accelerate --hvm --connect qemu:///system --cdrom<br>
> /linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso --name kalilinux<br>
> --ram 4096 --disk path=/linuxkvmaddgbdisk/kalilinux.img,size=50<br>
> --os-variant debian9 --graphics none --os-type linux<br>
> --extra-args="console=ttyS0"<br>
> ERROR    --extra-args only work if specified with --location. See the man<br>
> page for examples of using --location with CDROM media<br>
> <br>
> I have pasted the output of the below command in <a href="http://sprunge.us/IdsF8Y" rel="noreferrer" target="_blank">http://sprunge.us/IdsF8Y</a><br>
> <br>
> #isoinfo -J -i kali-linux-2020.2-installer-amd64.iso<br>
> <br>
> I am not sure if I understand about --location<br>
> kali-linux-2020.2-installer-amd64.iso,kernel=kernel/*?*,initrd=kernel/*?* as<br>
> per the pastebin <a href="http://sprunge.us/IdsF8Y" rel="noreferrer" target="_blank">http://sprunge.us/IdsF8Y</a><br>
<br>
So based on this output the correct usage of --location should be<br>
<br>
--location kali-linux-2020.2-installer-amd64.iso,kernel=install.amd/vmlinuz,initrd=install.amd/initrd.gz<br>
<br>
Usually the names are vmlinuz for kernel and initrd for init ram disk.<br>
<br>
It looks like that in that ISO image there is another set of<br>
kernel+initrd:<br>
<br>
    install.amd/gtk/vmlinuz<br>
    install.amd/gtk/initrd.gz<br>
<br>
so I guess you need to try which one will work for you.<br>
<br>
For this specific reason virt-install need to have a file that will list<br>
where to look for kernel and initrd as you can see the paths are<br>
different for each distribution and sometimes even for different type of<br>
ISO images for the same distribution so it would be insane to cover all<br>
the possible cases. I would not be surprised if in some cases the file<br>
names would be completely different.<br>
<br>
Pavel<br>
<br>
> Any help will be highly appreciated and I look forward to hearing from you.<br>
> Please let me know if you need any additional details. Thanks in Advance.<br>
> <br>
> Best Regards,<br>
> <br>
> Kaushal<br>
</blockquote></div>