<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 5, 2020 at 10:13 PM Kaushal Shriyan <<a href="mailto:kaushalshriyan@gmail.com">kaushalshriyan@gmail.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"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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 --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>
> <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>
> --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 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* --os-variant=  * 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 from 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 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 you<br>
can find this example:<br>
<br>
    Additionally, --location can take 'kernel' and 'initrd' sub 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 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 make<br>
it work and --extra-args will work as well.<br>
<br>
Pavel<br></blockquote><div><br></div><div>Hi Pavel,</div><div><br></div><div>Thanks for your email and much appreciated. I have pasted the output here <a href="https://paste.centos.org/view/89952d91" target="_blank">https://paste.centos.org/view/89952d91</a> </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 --extra-args="console=ttyS0<br></div><div><br></div><div>--location my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd <br></div><div><br></div><div>--location kali-linux-2020.2-installer-amd64.iso,kernel=kernel/?,initrd=kernel/? <br></div><div><br></div><div>I did not find kali OS details to provide an option for<b> --os-variant=  </b> When I ran osinfo-query os | grep kali it did not return anything. What should be the value for --os-variant= as i want to install kali-linux-2020.2-installer-amd64.iso (<a href="https://www.kali.org/downloads/" target="_blank">https://www.kali.org/downloads/</a>) using KVM virt-install tool<br></div><div><br></div><div><div>Thanks once again and I look forward to hearing from you.<br></div><div><div style="margin:0px;padding:0px 0px 20px;width:824px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div id="gmail-m_-229176217984493630gmail-m_7884935547305075376gmail-:3ht" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-m_-229176217984493630gmail-m_7884935547305075376gmail-:1r2" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><div>Best Regards,<br></div><div><br></div><div>Kaushal</div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>Hi Pavel,</div><div><br></div><div>I will appreciate it if you can have a look at my earlier email to this mailing list and I look forward to hearing from you. Thanks in Advance.</div><div><br></div><div>Best Regards,</div><div><br></div><div>Kaushal </div></div></div>