<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2020 at 1:10 PM Erik Skultety <<a href="mailto:eskultet@redhat.com">eskultet@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 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 --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=<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 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 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<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 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=  * 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 about<br>
a specific distro to contribute the required changes to libosinfo and 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 pulling<br>
the recommended VM settings from osinfo-db as Kali is derived from Debian.<br>
<br>
Regards,<br>
Erik<br>
<br></blockquote><div><br></div><div>Hi Erik,</div><div><br></div><div>Thanks Erik for the reply. I am running </div><div><br></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><br>Starting install...<br>Retrieving file .treeinfo...                                                                                                                                                         |    0 B  00:00:00<br>Retrieving file content...                                                                                                                                                           |    0 B  00:00:00<br>Retrieving file info...                                                                                                                                                              |  104 B  00:00:00<br>Retrieving file info...                                                                                                                                                              |  104 B  00:00:00<br>Retrieving file info...                                                                                                                                                              |  104 B  00:00:00<br>ERROR    Could not find an installable distribution at '/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso': The URL could 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><div>otherwise, please restart your installation. </div><div><br></div><div>#virt-install --accelerate --hvm --connect qemu:///system --cdrom /linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso --name kalilinux --ram 4096 --disk path=/linuxkvmaddgbdisk/kalilinux.img,size=50 --os-variant debian9 --graphics none --os-type linux --extra-args="console=ttyS0"<br>ERROR    --extra-args only work if specified with --location. See the man page for examples of using --location with CDROM media<br></div><div><br></div><div>I have pasted the output of the below command in <a href="http://sprunge.us/IdsF8Y">http://sprunge.us/IdsF8Y</a></div><div><br></div><div>#isoinfo -J -i kali-linux-2020.2-installer-amd64.iso </div><div><br></div><div>I am not sure if I understand about --location kali-linux-2020.2-installer-amd64.iso,kernel=kernel/<b>?</b>,initrd=kernel/<b>?</b> as per the pastebin <a href="http://sprunge.us/IdsF8Y">http://sprunge.us/IdsF8Y</a></div><div><br></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>