Installing Kali Linux using KVM virt-install tool

Pavel Hrdina phrdina at redhat.com
Mon Aug 10 08:49:29 UTC 2020


On Fri, Aug 07, 2020 at 07:59:05PM +0530, Kaushal Shriyan wrote:
> Hi Pavel,
> 
> I am running virt-install version 1.5.0 on CentOS Linux release 7.6.1810
> (Core) server.
> 
> #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"
> 
> 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

I did not realize that you are using that old OS as CentOS 7. It has old
virt-manager which doesn't support kernel and initrd parameters for
--location so you will not be able to install the VM using ISO image and
--extra-args.

You can use the distribution tree to install your VM with --extra-agrs:

    --location http://http.kali.org/kali/dists/kali-rolling/main/installer-amd64/

In addition please update your script as options --file, --file-size,
--ram and --os-type are deprecated.

Instead of `--file=/linuxkvmaddgbdisk/kalilinux.img --file-size-50` you
should use `--disk=/linuxkvmaddgbdisk/kalilinux.img,size=50`, replace
--ram=4096 with --memory=4096 and you can drop --os-type completely as
it is ignored.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20200810/5c096a9d/attachment.sig>


More information about the libvirt-users mailing list