On Wed, Aug 5, 2020 at 1:32 PM Pavel Hrdina <phrdina(a)redhat.com> wrote:
On Wed, Aug 05, 2020 at 06:57:11AM +0530, Kaushal Shriyan wrote:
> Hi,
>
> I am trying to install kali-linux-2020.2-installer-amd64.iso (
>
https://www.kali.org/downloads/) using KVM virt-install tool
>
> #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
>
> Starting install...
> Retrieving file .treeinfo...
>
> | 0 B 00:00:00
> Retrieving file content...
>
> | 0 B 00:00:00
> Retrieving file info...
>
> | 104 B 00:00:00
> Retrieving file info...
>
> | 104 B 00:00:00
> Retrieving file info...
>
> | 104 B 00:00:00
> 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?
>
> The location must be the root directory of an install tree.
> See virt-install man page for various distro examples.
> Domain installation does not appear to have been successful.
> If it was, you can restart your domain by running:
> virsh --connect qemu:///system start kalilinux
> otherwise, please restart your installation.
>
>
> #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
> --cdrom=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso
> --extra-args="console=ttyS0"
> ERROR --extra-args only work if specified with --location. See the man
> page for examples of using --location with CDROM media
>
> I did not find kali OS details to provide an option for* --os-variant=
* When
> I ran osinfo-query os | grep kali it did not return anything.
> Any help will be highly appreciated and I look forward to hearing from
you.
> Thanks in advance.
Hi,
Using --location with ISO image requires specific file to be available
in the ISO image where virt-install can look to figure out path to linux
kernel and initrd otherwise it is not able to use --location and
--extra-args as well.
If you look into virt-install man page in the section for --location you
can find this example:
Additionally, --location can take 'kernel' and 'initrd' sub options.
These paths relative to the specified location URL/ISO that allow
selecting specific files for kernel/initrd within the install tree.
This can be useful if virt-install/ libosinfo doesn't know where to
find the kernel in the specified --location.
For example, if you have an ISO that libosinfo doesn't know about
called my-unknown.iso, with a kernel at 'kernel/fookernel' and
initrd at 'kernel/fooinitrd', you can make this work with:
--location
my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd
You can use isoinfo to get the content of your ISO image:
isoinfo -J -i /path/to/your.iso -f
and use the --location with kernel and initrd parameters which will make
it work and --extra-args will work as well.
Pavel
Hi Pavel,
Thanks for your email and much appreciated. I have pasted the output here
https://paste.centos.org/view/89952d91
#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
--location my-unknown.iso,kernel=kernel/fookernel,initrd=kernel/fooinitrd
--location
kali-linux-2020.2-installer-amd64.iso,kernel=kernel/?,initrd=kernel/?
I did not find kali OS details to provide an option for* --os-variant= * 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 (
https://www.kali.org/downloads/)
using KVM virt-install tool
Thanks once again and I look forward to hearing from you.
Best Regards,
Kaushal