WSL does not have hpet at /dev/hpet - windows-subsystem-for-linux

/dev/hpet appears to be absent in WSL2 (Ubuntu 20.04) - is there any way to enable it to allow for applications that read from /dev/hpet?

Related

React-Native installation on Windows 11 machine

I'm trying to get React Native installed on a Windows 11 virtual machine.
I keep getting Intel® HAXM installation failed. To install Intel® HAXM follow the instructions found at: https://github.com/intel/haxm/wiki/Installation-Instructions-on-Windows
I've tried installing Intel Haxm manually but I get
As this is a virtual machine I'm unable to access the bios to enable virtualization, so I've been following https://learn.microsoft.com/en-us/windows-365/enterprise/nested-virtualization
Set up a WSL development environment.
Windows Subsystem for Android™️.
Install Hyper-V on Windows 10.
From the document linked above, I've tried all of them, restarted the machine and still I get the above error.
Can someone recommend any steps I may have missed to get Intel Haxm installed?
My virtual machine specs

Mount VHDX within WSL Ubuntu 18.04 to edit Linux files

I'm looking to change a process (which currently is an elevated PowerShell script running in Windows 10, and I want to keep it close to that) I have that currently uses Paragon Linux Filesystem for Windows tool. While it does work, it doesn't work consistently. What I'd like to do instead is to use WSL on Windows 10, 1909 currently (will go to 2004 when available), to mount a VHDX which contains to partitions, /dev/sda1 for /boot, and /dev/sda2 another for an Linux LVM. The OS within this VHDX is CentOS 7.5, and the filesystem I want to modify is formatted in ext4. I need to edit some files within a logical volume within the group.
Currently, I'm running into an issue where qemu-nbd doesn't help, as there doesn't appear to be an NBD kernel mode driver provided by the Microsoft Linux kernel in Ubuntu 18.04 image from the Windows Store. I've tried guestfish (using guestmount), but it is unable to find an operating system and fails to mount any of the volumes.
Is this possible? Am I going down the wrong path, and is this not possible?
As I understand your question...
Seems to me that you want to offline access a .vhdx containing Linux
using powershell to manipulate some files...
(I think the issue here is ext4 and file rights)
1. Mount the .vhdx you want to '''work''' in a linux virtual machine as second disk
2. Install Powershell 7 in linux VM
3. Configure Powershell remote in the Linux VM (via SSH)
4. Access the Linux VM from Windows Powershell 7 and execute your scripts.
there are other ways using VMs+NBD or using WSL and mounted
drives... but this seems to be the most practical end efficient!
as you for sure know you can start/stop the VMs from Powershell

VT-x isn't available & No Hyper-V manager on Windows 10

When I used vagrant up to boot a VM, I found the following error ox80004005 (Note that I am using Oracle VM Virtualbox for the virtualization)
kayan#kayan-VirtualBox:~/vagrant/rpm$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'jhcook/fedora27' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "769fc6c1-ea8d-46d8-8a7b-16989540d530", "--type", "gui"]
Stderr: VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Screenshot: VT-x isn't available ERROR
I am using 64-bit Windows 10. My processor is Intel(R) Core(TM) i7-7500U CPU # 2.70 GHz.
To solve this error, I was suggested by someone that I should disable Hyper -v on my host windows machine. When I opted to disable Hyper -v feature, I found that there is no Hyper-v in my machine (strange!!!)
Screenshot: No option to enable or disable Hyper-v
I then used this command dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All to disable the hypervisor and I found this (Note: I run CMD as administrator).
Microsoft Windows [Version 10.0.16299.125]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
Deployment Image Servicing and Management tool
Version: 10.0.16299.15
Image Version: 10.0.16299.125
Error: 0x800f080c
Feature name Microsoft-Hyper-V is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.
The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
C:\WINDOWS\system32
Screenshot: 0x800f080c ERROR
My virtual machine configuration:
OS: Ubuntu 16.04.03
RAM: 3072 MB
Storage: 500 GB
storage type: VDI
If you are facing the problem in VirtualBox after the Windows 10 Founder's Update, you need to turn Core Isolation Memory Integrity back off again. The UI is bugged, here's how it can be done via. registry, navigate to below and set 0:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity\Enabled
Hyper-V is not installed/available on windows 10 Home edition, which might be why you aren't seeing it.
https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
You need to change your Bios settings to enable Virtualization.
https://www.laptopmag.com/articles/access-bios-windows-10
Once enabled, you'll be good to go with VirtualBox.
(UPDATED)
Oracle VM Virtualbox doesn't support nested 64-bit virtual machines.
My host machine is actually a 64-bit machine. I installed Oracle VM Virtualbox and installed a 64-bit Linux VM there. My target was to install another 64-bit Linux VM on that VM. Unluckily, Oracle VM Virtualbox doesn't provide us that support.
To solve this issue, I used VMWare to install the first VM. Then I installed Oracle VM Virtualbox on that VM and installed the second VM on VirtualBox.
I have same problem when i want to run emulator and thanks to bluedi solved this problem.
just disable Memory Integrity
"Settings" -> "Update & Security" -> "Windows Security" -> "Device Security" -> "Core Isolation" -> Turn it off
I tried these two solutions without luck:
Enabling virtualization in BIOS
Disabling (or enable, then disable) Hyper-V
What finally worked was running this privileged command:
bcdedit /set hypervisorlaunchtype off
Run that command with cmd in Administrator mode and reboot.

VBoxManage: error: Failed to create the host-only adapter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am running vagrant 1.4 and virtual box 4.3 on fedora 17 machine. When I do "vagrant up", I get this error:
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp
I had the same problem today. The reason was that I had another VM running in VirtualBox.
Solution:
Open VirtualBox and shut down every VM running
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
Restart VirtualBox
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
You should now be able to run vagrant up or vagrant reload and have your new host configured.
As mentioned in this answer, recent versions of macOS can block VirtualBox.
Solution:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
(thanks to #pazhyn, #lsimonetti & #dave-beauchesne for clarifications)
For Mac OS X 10.9.3 and Vagrant 1.6.3 and VirtualBox 4.3.6 this problem was fixed with restarting the VirtualBox
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
TL;DR MacOS is probably blocking VirtualBox. Go to System Preferences > Security & Privacy Then hit the "Allow".
Solution:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
MacOS by default can block kexts from loading. You must click the "allow" button before executing the VirtualBoxStartup.sh script.
Then run:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart like the answer above.
(This article provides more clarity to MacOS kernel extension loading)
This issue appears to be fixed by installing the latest version of Virtual Box.
I had this issue after upgrading to OS X El Captian. Upgrading to the latest version of VB solved the issue for me. Virtual box will give you the latest link if you go to the virtualbox menu at the top of your screen and clicking check for updates.
Got the error in Mac after the update to Mojave. Probably you have an older version of virtual box.
Update to a recent version of virtualbox. (5.2 at the time of wrting this post)
Edit: adding #lsimonetti's comment.
In addition to that upgrade to Virtualbox 5.2, you need Vagrant >= 2.0.1
If you are on Linux, simply run: sudo vboxreload
I'm running Oracle VM Virtualbox on Ubuntu 16.04 LTS.
The solution that worked was to reinstall virtualbox as mentioned here:
sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*
sudo apt-get install virtualbox
I couldn't find my VirtualBox installation folder, as such could not issue the command:
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
I had to reinstall Virtual Box on my machine.
Here's the downloads page: Downloads Page
Then vagrant up worked for me after.
If after performing what is said by #totophe and on macOS it still doesn't work, just restart your mac. Then open the terminal and vagrant up.
This usually happens after each macOS update.
I had similar problem upgrading to OSX Monterey.
Solution:
Install VirtualBox Extension (download)
Accept VirtualBox Security & Privacy/Privacy/Input Monitoring
VirtualBox can also have and lose permissions for Accessibility, check that as well
In my case, I was able to solve this issue by reinstalling virtual box. I was trying to use laravel's homestead and was having this error. Reinstalling helps creating the directories that are needed for virtual box again. Took me an hour to figure out.
I'm running Debian 8 (Jessie), Vagrant 1.6.5 and Virtual Box 4.3.x with the same problem.
For me it got fixed executing:
sudo /etc/init.d/vboxdrv setup
Tried multiple solutions but the below sequence works for me.
Virtual Box: 5.2.34
Vagrant: 2.2.5
Mac OSX: 10.14.6
First Allow access to oracle inc:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
Then restart VBox by this command:
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
Now try Vagrant up again.
I've just had the same problem after upgrading to mac os Big Sur
Linus solution worked for me
Grant permission to VirtualBox under System Preferences > Security & Privacy > General (this request is new to macOS High Sierra)
Open Terminal and run: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
https://stackoverflow.com/a/47652517/6146535
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Worked great for me on Mac. This normally happens when I shut down my computer without running
$vagrant suspend
I am using ubuntu 14.04. I have genymotion installed on virtualbox. Every time I start genymotion I had no problem, but suddenly one time it said unable to load virtualbox engine and it didn't open. I went through the log file and found out it could not create a new host only network because it has already created all possible host only networks. And the problem is that it cannot allocate memory for a new network.
Fix: go to your virtual box File --> Preferences --> Network
Click the host-only tab and just delete some of the host-only networks so that you will get some memory freed and next time, a new network can be created easily.
Deletion fixed my problem.
In my case I had to do the following to solve this error for me:
totophe's answer in combination with (re)installing the latest VM-version (https://www.virtualbox.org/wiki/Downloads) (Thanks to jacobappleton & user1718159)
Steps:
First (re)install latest VirtualBox;
Run sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart in terminal (not sure if this is needed in order to get the system preferences show up the allow/disallow option);
Allow in Security & Privacy
Restart your machine
Run sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart again.
Ready to run vagrant up again.
I fixed this error by installing VirtualBox 4.2 instead of 4.3. I think the latest version of vagrant and VB 4.3 are incompatible on a fedora system.
CentOS Linux release 7.2.1511 (Core)
VirtualBox-5.0
I came across this tread while searching Google for...
VBoxManage: error: Failed to create the host-only adapter
I was using VirtualBox-5.0 to test some virtual machines created with Vagrant and setting private networks in my Vagrantfile
web.vm.network "private_network", ip: "192.168.10.2"
When evoking the command $ vagrant up I would get the above mentioned error along with /dev/vboxnetcrl does not exist.
It seems that my version of VirtualBox did not have the proper kernel module compiled for my version of Linux and the device, /dev/vboxnetcrl, does not get created.
Since I wanted to test virtual machine and not troubleshoot VirtualBox, my work around (not a solution) was to:
# yum remove VirtualBox-5.0
# yum install VirtualBox-4.3
After that I was able to create the virtual machines with specified host-adapters. And of course, under VirtualBox-4.3, /dev/vboxnetcrl was there.
Now on to testing my VMs. And when I have time, I'll see if I can get it working under VirtualBox 5.0
If you are on Linux:
sudo service virtualbox restart
Windows 10 Pro
VirtualBox 5.2.12
In my case I had to edit the Host Only Ethernet Adapter in the VirtualBox GUI. Click Global Tools -> Host Network Manager -> Select the ethernet adapter, then click Properties. Mine was set to configure automatically, and the IP address it was trying to use was different than what I was trying to use with drupal-vm and vagrant. I just had to change that to manual and correct the IP address. I hope this helps someone else.
I had the same problem just now and it was solved by simply reinstalling to the latest version of VirtualBox.
For those on Mac OS High Sierra - the installation might fail at first but you need to go to System Preferences > Security & Policy and click on the "Allow" button to allow Oracle installing the software.
For macOS Mojave, this solution worked:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
I faced this issue on mac.
I did the following
Go to:
Launcher->Virtualbox
Click the icon to open Virtualbox
Start Virtualbox with the button that pops up once Virtualbox starts. Wait till the terminal window gives you the prompt,
docker#boot2docker
Then try to open docker. Hope it works!
If you are sure you have allow Oracle from system preference and the error still persist. It is highly possible you have not started VirtualBox. Ensure it is running and run vagrant up again.
Finally worked for me by following Given link.
https://www.mediacurrent.com/blog/drupal-vm-failed-create-host-only-adapter/
Tried on : 06 Mar, 2021
Mac OS = 11.2.2 (20D80)
Oracle Virtual Box = Version 6.1.18 r142142 (Qt5.6.3)
~ ➤ docker-machine create --driver virtualbox Manager1
Running pre-create checks...
Creating machine...
(Manager1) Copying /Users/speedoo/.docker/machine/cache/boot2docker.iso to /Users/speedoo/.docker/machine/machines/Manager1/boot2docker.iso...
(Manager1) Creating VirtualBox VM...
(Manager1) Creating SSH key...
(Manager1) Starting the VM...
(Manager1) Check network to re-create if needed...
(Manager1) Found a new host-only adapter: "vboxnet0"
(Manager1) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env Manager1
~ ➤
~ ➤
~ ➤ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
Manager1 - virtualbox Running tcp://192.168.99.100:2376 v19.03.12
~ ➤
What helped me on Opensuse 42.1 is to install VirtualBox and Vagrant from the official RPMs instead of from Opensuse repositories.
I encountered this problem on Windows 8.1, VirtualBox 5.1.18 and Vagrant 1.9.3.
Deleting the VirtualBox Hosts-only Ethernet Adapter from VirtualBox Preferences (Network --> Hosts-only networks) fixed this for me, and vagrant up could continue and start the VM.
I had the same problem while following a tutorial on setting up Laravel Homestead for Windows 10. The tutorial provides an example IP address 192.168.10.10 to use for the server. The problem with their example IP is that if you already have a VirtualBox Host-Only Adapter set up, the IP you use for your vagrant server must have the same first three parts of the IP address of your current adapter.
You can check what your current Virtualbox Host-Only Adapter IP address is by running ipconfig (windows) ifconfig (mac/linux) and looking for VirtualBox Host-Only Adapter's IPv4 address. 192.168.56.1 was mine. Usually if the host IP is 192.168.56.1 then the guest IP will be 192.168.56.101 so instead of using the example IP I used 192.168.56.102. Any IP that is within 192.168.56.* that is not already taken should work.
After this homestead up worked perfectly for me.
TL;DR - If your current VirtualBox Host-Only Adapter IP is 192.168.56.1, make your Vagrant server IP 192.168.56.102.

NFS unavailable until NFS server restart

I have quite a strange problem with NFS. I have two systems. One is my workstation, Ubuntu 13.04, linux kernel 3.8.0. Here I've got a directory with code I am working on: /home/user/source. The other is a virtual machine running on some remote server. It has Centos 6.3 and mounts the directory at /opt/source. The point is I have got a whole development environment there needed to run my code, but I want to store the code itself on my local machine for easier acces for Eclipse and other development tools.
Unfortunately, when I reboot my local machine, the NFS filesystem is unavailable on the virtual box until I run: /etc/init.d/nfs-kernel-server restart. I cannot figure out why. Here's the only line in /etc/exports on my local machine:
/home/user/source 10.0.19.192(rw,sync,subtree_check)
And here's the line from /etc/fstab on virtual machine, where the NFS is described:
10.10.1.205:/opt/source /opt/WP nfs defaults,nofail 0 0
It looks like your NFS server wasn't started at boot time. I think, even on Ubuntu 13.04, you can still manage this with the "rcconf" program:
sudo apt-get install rcconf dialog
sudo rcconf
Then, check off nfs-kernel-server.
If for some reason this isn't working, try a similar process with the sysv-rc-conf package.