Hi, I have run the below command to install Kali Linux using linux-2020.4-installer-amd64.iso from https://www.kali.org/downloads/ #virt-install --name kalilinux --memory 4096 --vcpus=2 --location=/linuxkvmaddgbdisk/kali-linux-2020.4-installer-amd64.iso,kernel=install.amd/gtk/vmlinuz,initrd=install.amd/gtk/initrd.gz --network=bridge:br0 --os-type=linux --os-variant=debian9 --graphics=none --extra-args "console=ttyS0" -v --disk path=/linuxkvmaddgbdisk/kalilinux.img,size=50 I am not able to get the root login prompt when I run the below command to set IP and hostname for the guest OS. Am I missing any parameters from the above virt-install command to install Kali Linux as Guest OS in KVM Hypervisor? #virsh console kalilinux Connected to domain kalilinux Escape character is ^] Any help will be highly appreciated. I look forward to hearing from you. Thanks in Advance. Best Regards, Kaushal -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20201201/bdb919fb/attachment.htm>
Michal Privoznik
2020-Dec-01 17:15 UTC
Installing Kali Linux as Guest OS in KVM Hypervisor
On 12/1/20 5:28 PM, Kaushal Shriyan wrote:> Hi, > > I have run the below command to install Kali Linux using > linux-2020.4-installer-amd64.iso from https://www.kali.org/downloads/ > > #virt-install --name kalilinux --memory 4096 --vcpus=2 > --location=/linuxkvmaddgbdisk/kali-linux-2020.4-installer-amd64.iso,kernel=install.amd/gtk/vmlinuz,initrd=install.amd/gtk/initrd.gz > --network=bridge:br0 --os-type=linux --os-variant=debian9 --graphics=none > --extra-args "console=ttyS0" -v --disk > path=/linuxkvmaddgbdisk/kalilinux.img,size=50 > > I am not able to get the root login prompt when I run the below command to > set IP and hostname for the guest OS. Am I missing any parameters from the > above virt-install command to install Kali Linux as Guest OS in KVM > Hypervisor? >Just a hunch, maybe --extra-args work only for installation and are not persistent? I guess installer doesn't persist kernel cmd line passed in installation phase (why would it anyway?). I guess you need to configure grub so that it appends the argument or configure /etc/initttab and uncomment line that enables getty for ttyS0 console. Michal
Martin Kletzander
2020-Dec-11 20:06 UTC
Installing Kali Linux as Guest OS in KVM Hypervisor
On Tue, Dec 01, 2020 at 09:58:26PM +0530, Kaushal Shriyan wrote:>Hi, > >I have run the below command to install Kali Linux using >linux-2020.4-installer-amd64.iso from https://www.kali.org/downloads/ > >#virt-install --name kalilinux --memory 4096 --vcpus=2 >--location=/linuxkvmaddgbdisk/kali-linux-2020.4-installer-amd64.iso,kernel=install.amd/gtk/vmlinuz,initrd=install.amd/gtk/initrd.gz >--network=bridge:br0 --os-type=linux --os-variant=debian9 --graphics=none >--extra-args "console=ttyS0" -v --disk >path=/linuxkvmaddgbdisk/kalilinux.img,size=50 > >I am not able to get the root login prompt when I run the below command to >set IP and hostname for the guest OS. Am I missing any parameters from the >above virt-install command to install Kali Linux as Guest OS in KVM >Hypervisor? >I'm not sure why you need to set the IP address. Are you running a network with static IPs, without DHCP? As I cannot see where br0 is connected I can't guess more than that. You can use Michal's approach if you use the default libvirt network, though.>#virsh console kalilinux >Connected to domain kalilinux >Escape character is ^] >You might be connected at this point. It's just that the guest sent the "login: " prompt before you connected. Try pressing enter at this point to see whether there's something listening on the serial console. If it's not, then I wonder where it would listen, given the --graphics=none. There are ways to modify the guest image. Easiest thing might be to use virt-customize. But I truly believe you have a working system and all you need to do is write the username and press enter. In the end it will look like this: I'm trying to reproduce the install right now with comparable command-line, but it's getting stuck on something unrelated. If I manage to get it to work I will let you know what I found.>Any help will be highly appreciated. I look forward to hearing from you. >Thanks in Advance. > >Best Regards, > >Kaushal-------------- 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/20201211/ce24cb36/attachment.sig>