How to fix VMWare Could not open /dev/vmmon
VMWare article 2146460
On Linux host with secure mode enabled, it is not allowed to load any unsigned drivers. Due to this, VMware drivers, such as vmmon and vmnet, are not able to be loaded which prevents virtual machine to power on.
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMWare"
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)
sudo /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)
sudo mokutil --import MOK.der
sudo shutdown -r now
During the very next startup, you may need to enter MOK Management during boot, and select "ENROLL MOK" to import the key, and reboot once more.
Ubuntu 20.04 solution that worked for me:
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VMWare"
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)
sudo su
mokutil --import MOK.der
input password:
input password again:
exit
sudo shutdown -r now
At startup "ENROLL MOK" and "Restart" again.
This may work with Ubuntu but with RHEL 7.8/8 I use the following commands (as root):
openssl req -new -x509 -newkey rsa:2048 -keyout VMWare.priv -outform DEF -out VMWare.der -nodes -days 36500 -subj "/CN=VMware/"
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./VMWare.priv ./VMWare.der $(modinfo -n vmmon)
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./VMWare.priv ./VMWare.der $(modinfo -n vmnet)
mokutil --import VMWare.der
reboot
I get Cant't find private key when I sign vmnet/vmmon however, other articles on the internet have indicated that this is OK.
The mok is imported and then I try to run VMWare and I get Could not open /dev/vmmon: No such file or directory. Please make sure that the kernel module 'vmmon' is loaded.. If I make sure RHEL 7.8 is fully up to date the computer does not get the UEFI splash screen.
This is my post on the Unix/Linux stack exchange channel
https://unix.stackexchange.com/questions/605037/unable-to-run-vmware-on-rhel-8-after-signing-vmmon-and-vmnet
Related
I need to run a python Django project with Pycharm IDE locally in HTTPS
so that other services can talk with my service without any errors.
I don't manage to run it locally in HTTPS
You can use runserver_plus extension. It depends on Werkzeug, so you have to install it first. Installation:
pip install Werkzeug
pip install django-extensions
pip install pyOpenSSL
Then add django_extensions to your INSTALLED_APPS inside settings.py:
INSTALLED_APPS = (
...
'django_extensions',
)
Now you need to generate self-signed certificate for your local server. Something like this, credits to Diego Woitasen:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365
And now you can run Django this way:
python manage.py runserver_plus --cert-file /path/to/cert.crt
And some links for sources:
runserver_plus with SSL.
Werkzeug installation.
I am new to AWS and Let's encrypt both.
I follow and article and simpley run these commands
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
sudo cp certbot-auto /usr/bin/
Then I run this command.
sudo /usr/bin/certbot-auto --nginx -d example.com -d www.example.com --debug
This gives me the error
Sorry, I don't know how to bootstrap Certbot on your operating system!
You will need to install OS dependencies, configure virtualenv, and
run pip install manually. Please see
https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites
for more info.
What does this really means?
How do I setup certbot on AWS linux?
I have created a fresh amazon linux 2 ec2 instance and tested the following for you.
The following steps are working for me.
Edit the file /usr/bin/certbot-auto to recognize your version of Linux:
$ sudo vim /usr/bin/certbot-auto
find this line in the file (likely near line nearr 780):
elif [ -f /etc/redhat-release ]; then
and replace whole line with this:
elif [ -f /etc/redhat-release ] || grep 'cpe:.*:amazon_linux:2' /etc/os-release > /dev/null 2>&1; then
Save and exit vim (type :wq to do that)
Reference:
Deploying Let’s Encrypt on an Amazon Linux AMI EC2 Instance
Make sure that system requirements are met, you can find the system requirement here.
Also here are the best practices for certbot-auto deploment.
Navigate to your home directory (/home/ec2-user).
Download EPEL using the following command. sudo wget -r --no-parent -A 'epel-release-*.rpm' https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/
Install the repository packages as shown in the following command.
sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm
Enable EPEL as shown in the following command. sudo yum-config-manager --enable epel*
Confirm that EPEL is enabled with the following command.
sudo yum repolist all
Install and run Certbot
This procedure is based on the EFF documentation for installing Certbot on Fedora and on RHEL 7. It describes the default use of Certbot, resulting in a certificate based on a 2048-bit RSA key.
sudo yum install -y certbot python2-certbot-apache or sudo yum install -y certbot python2-certbot-nginx For nginx.
Source here
I went to restart Apache after disabling the banner with
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
now Apache won't restart
~$ sudo /opt/bitnami/ctlscript.sh status
php-fpm already running
apache not running
mysql already running
I tried
~$ sudo /opt/bitnami/ctlscript.sh start apache
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd could not be started
Monitored apache
for error log - cat /opt/bitnami/apache2/logs/error_log
you can find it here in this link
https://drive.google.com/file/d/1f2Xt0bwcMEhKcXkILLMf_kdBl0JoSZUr/view?usp=sharing
for httpd-app.conf file here copy of it in below link
https://drive.google.com/file/d/1l2zEPzIU0uBHdEyFQEZ22eEPS9fMnBTO/view?usp=sharing
Bitnami Engineer here,
From the log file you shared, I see that Apache fails because there is a mismatch when checking the SSL certificates
Certificate and private key localhost:443:0 from /opt/bitnami/apache2/conf/server.crt and /opt/bitnami/apache2/conf/server.key do not match
Did you modify them? In case you configured a new SSL certificate, you probably forgot to copy any of the files. If you didn't want to configure a SSL certificate, you can generate new self-signed certificates by running these commands
sudo openssl genrsa -out /opt/bitnami/apache2/conf/server.key 2048
sudo openssl req -new -key /opt/bitnami/apache2/conf/server.key -out /opt/bitnami/apache2/conf/cert.csr
sudo openssl x509 -in /opt/bitnami/apache2/conf/cert.csr -out /opt/bitnami/apache2/conf/server.crt -req -signkey /opt/bitnami/apache2/conf/server.key -days 365
https://docs.bitnami.com/aws/components/apache/#how-to-create-an-ssl-certificate
I have tried to install Virtualbox on Arch(4.7.0-1) using pacman and everything seems to go fine until I try to run it. I get the following message
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.7.0-1-ARCH) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/lib/virtualbox/VirtualBox.so",) failed: /usr/lib/libQt5Core.so.5: file too short
Any thoughts on where I should start looking to debug this?
Since version 5.0.16, virtualbox-host-modules-arch and virtualbox-host-dkms use systemd-modules-load.service to load all four VirtualBox modules at boot time.
To load the module manually, run: modprobe vboxdrv
https://wiki.archlinux.org/index.php/VirtualBox#Load_the_VirtualBox_kernel_modules
This answer was tested only in Ubuntu and Debian 9 in my case, but maybe can works for you.
I think the problem is that the vboxdrv module is not signed and therefore not loaded with the kernel. This will happen if your computer has the SecureBoot mode activated, something very common in modern equipment.
That's why I get this error opening any machine in the Virtual Box
Kernel driver not installed (rc=-1908)
Do the following steps to sign a driver, and it is loaded as a kernel module:
1. Install the mkutil package to be able to do signed.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mokutil
2. generate the signature file:
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"
3. Then add it to the kernel:
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
4. Register it for the Secure Boot.
IMPORTANT! That will ask you for a password, put the one you want, you will only have to use it once in the next reboot.
sudo mokutil --import MOK.der
5. Finally, restart the computer. A blue screen will appear with a keyboard wait, press the key that asks you to interrupt the boot.
When you are inside the blue screen, select
Enroll MOK > Continue > Yes > and it will ask you for the password
that you have previously entered, you will enter it and you will be informed that the operation has been completed successfully.
Now your operating system will start and you can now use VirtualBox without problem :)
Hope this help someone.
Open Terminal - Verify version / codename
Code:
lsb_release -a
Using whatever plain text editors like gedit/scite/bash
Code:
sudo gedit /etc/apt/sources.list
Add the following line to your /etc/apt/sources.list:
Code:
deb http://download.virtualbox.org/virtualbox/debian xenial contrib
Save and Close
Add Key, and combine with Downloading and Registering;
Code:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Make sure DKMS is installed. May need to re-install to current kernal.
Code:
dkms status
You might encounter an error at this point complaining about linux-headers, simply download the header package by apt-get install linux-headers-5.4.0-28-generic
Make sure Computer and OS is upto date
Code:
sudo apt-get autoclean sudo apt-get clean sudo apt-get autoremove sudo apt-get update sudo apt-get upgrade
Rebuild all DKMS modules for the currently running kernel:
Code:
dkms autoinstall
Install Latest Version of VirtualBox
Code:
sudo apt-get install virtualbox
I've been using stunnel for local Django development on SSL-enabled pages for a while, but since upgrading to Yosemite it seems to have stopped working:
$ sudo stunnel stunnel/dev_https
dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
Referenced from: /usr/bin/stunnel
Reason: image not found
I tried building libssl from source using this gist and symlinking libssl.1.0.0.dylib to /opt/local/lib/libssl.1.0.0.dylib. That then failed, looking for /opt/local/lib/libcrypto.1.0.0.dylib. So I symlinked the version I'd just built to that expected path, and got this:
$ sudo stunnel stunnel/dev_https
dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib
Referenced from: /opt/local/lib/libssl.1.0.0.dylib
Reason: image not found
What's going on here? stunnel is at /usr/bin/stunnel and I've checked it's not installed via homebrew. Has anyone else managed to work this out?
I just got stunnel working for Django on Yosemite. If I remember correctly, I also had to previously fix my libssl as explained in this other answer for psycopg2.
Then, I use homebrew for everything:
$ brew install stunnel
$ openssl req -new -x509 -days 9999 -nodes -out stunnel.pem -keyout stunnel.pem
I put this in stunnel.conf (derived from here):
pid=/tmp/stunnel.pid
setuid=nobody
setgid=nobody
foreground=yes
client=no
[https]
cert = ./stunnel.pem
accept=443
connect=5000
I run stunnel with:
$ sudo stunnel stunnel.conf
And run Django with:
$ python manage.py runserver 0.0.0.0:5000
Hope that helps.