Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok. I may be making this way too complicated, but I'm trying to run Kali Linux as a VM on VirtualBox. It installed without trouble, but when I run it, it boots to a black screen. I've read that Kali doesn't play nicely with all graphics drivers (my host is running Radeon). I tried adding a
Code:
radeon.modeset=0
parameter to the GRUB code, but that didn't help.
The thing is that I don't need a GUI desktop here, and Kali itself will launch nicely under headless mode in VirtualBox. The other thing, though, is that Kali's default is to disable SSH server.
So I attached the Kali VDI disk to a different VirtualBox VM and booted it. I then created a chroot mount and installed openssh-server. But that didn't actually start (or enable) the service, and systemctl enable won't run under a normal chroot environment. So I copied the contents of the /etc/systemd/system/sshd.service file from a different system and pasted them into the chroot version of the directory. Since the file permissions are supposed to look like this:
It occurred to me that some might ask why, if I don't need a desktop, don't I just run Kali in an LXD container? Well, I tried. The problem there was that I'm running OpenVAS, which failed because I wasn't able to get redis-server to launch within the container. I suspect that redis failed because it was configured to listen on a custom socket:
Code:
ERROR: redis-server is not running or not listening on socket: /var/run/redis-openvas/redis-server.sock
...which might be something a container can't handle without full kernel access?
Unless you installed the experimental pci pass through extension pack your still using a virtual GPU adapter so not sure what is happening unless your VM system settings are wrong.
The default adapter mode is NAT which basically acts like a router. Add a firewall rule to allow ssh traffic or switch to bridged mode.
Network and ssh need to be enabled and chroot has its own difficulty. Not enough information to know how anything is configured.
I downloaded the pre-built kali ova, imported it and had a VM with networking enabled in a matter of a few minutes.
Unless you installed the experimental pci pass through extension pack your still using a virtual GPU adapter so not sure what is happening unless your VM system settings are wrong.
I'm also not sure. But I will look into that.
Quote:
The default adapter mode is NAT which basically acts like a router. Add a firewall rule to allow ssh traffic or switch to bridged mode.
VBox isn't the problem with SSH: it's Kali which, by default, disables incoming SSH at the OS level. What I'm trying to do with chroot is make all the file system changes I'd need to get the same result as:
Code:
systemctl start ssh
systemctl enable ssh
Quote:
I downloaded the pre-built kali ova, imported it and had a VM with networking enabled in a matter of a few minutes.
I tried that, too. But the image uses Ubuntu 16.04. I need Kali (and a more recent version).
Thanks!
The ova I downloaded is 2020.2 I believe and will check in a bit.
Wait. What I said before (about Ubuntu 16.04) makes no sense. I was thinking about the Docker OpenVAS container I'd been looking at. My problem with the OVA image was that I couldn't get it running. I'm going to take another look at it now, though.
I imported the OVA image and ran it, but it's also booting to a black screen. I'm 100% sure I never installed the PCI passthrough module. So I'm back to trying to open up SSH and run it headless.
I am running VB 6.1.10 on a CentOS 7 hosts with kali 2020.2 ova with the graphics adapter setting VMSVGA. The host is an old Dell Optiplex 780 with an integrated Intel graphics controller but I don't if it matters.
With the virtual network adapter set to bridged and Kali does not have any firewall rules so once ssh was enabled I could easily login ssh from my host.
At the boot menu select advanced options and the 2nd line which is recovery mode. Since root is disabled by default it will automatically switch to console mode. From there you can login and I have not tried but you should be able to switch to multiuser instead of graphical mode which will enable you to run it headless.
I am running VB 6.1.10 on a CentOS 7 hosts with kali 2020.2 ova with the graphics adapter setting VMSVGA. The host is an old Dell Optiplex 780 with an integrated Intel graphics controller but I don't if it matters.
With the virtual network adapter set to bridged and Kali does not have any firewall rules so once ssh was enabled I could easily login ssh from my host.
You mean you didn't even need to install and enable SSH within Kali? I'm on a bridged adaptor and, while the Kali VM (running headless) shows up in nmap, port 22 isn't open. I suppose that could be because the installation isn't complete until I successfully log into the GUI at least once.
Thanks,
When you see the grub boot line showing the kali kernel press e to edit grub. Move the cursor to the end of the kernel line and add
systemd.unit=multi-user.target
Thanks. I got the same black screen. Same for rescue.target. But I think this problem isn't specific to Kali, since I'm getting the same problem with the other desktop VM on my system (Ubuntu 20.04). I see that other people are sharing in my suffering: https://blog.softhints.com/virtualbo...tu-linux-mint/
Interesting. I have only run into a few really old distributions that had a VB black screen boot problem. I am running on a Dell 790 the latest Mint, Ubuntu and debain as VMs.
Kind of hard to install guest additions if it will not boot to a desktop...
VBox was working perfectly the last time I used it (probably a month or so back). I'm running Ubuntu 18.04 on a powerful enough system (16GB memory, SSD storage, Ryzen 3 2200G). I'm planning to upgrade it to 20.04 in the next few weeks. If I haven't come to grips with the problem by then, I'm curious to see whether that'll make a differenct.
Well I bit the bullet and downloaded VMware Player. It got Kali up and running in no time. I'm not sure this solved the problem, but it's a valid workaround.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.