Issues with Vagrant up

18 views
Skip to first unread message

Bibudh Lahiri

unread,
Aug 16, 2023, 12:10:34 AM8/16/23
to p4-design
Hi
  I am new to P4, and currently trying to get Vagrant + VirtualBox running before trying the tutorial examples. I have Ubuntu 22.04 installed on Windows Subsystem for Linux (WSL) Version 2, VirtualBox-7.0.10 installed on Windows 11, and VirtualBox-6.1.38 and Vagrant 2.2.19 on Ubuntu (WSL). Additionally, I also have the virtualbox_WSL2 plugin installed.
 
   Before running the p4 examples, I am trying this simple https://blog.thenets.org/how-to-run-vagrant-on-wsl-2/ example to create a Vagrantfile using the Vagrant CLI, start a VM using the Vagrantfile and login to the VM. However, "vagrant up" provides the message below:

Bringing machine 'default' up with 'libvirt' provider...
Error while connecting to Libvirt: Error making a connection to libvirt URI qemu:///system:
Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

   and "vagrant up --provider virtualbox" provides the message below:

 The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below:
VirtualBox is complaining that the installation is incomplete. Please run `VBoxManage --version` to see the error message which should contain instructions on how to fix this error.

  VBoxManage --version provides the message below:

 WARNING: The character device /dev/vboxdrv does not exist.
         Please install the virtualbox-dkms package and the appropriate headers, most likely linux-headers-standard. You will not be able to start VMs until this problem is fixed.
6.1.38_Ubuntur153438

I have installed virtualbox-dkms and linux-headers-standard, but they don't seem to help.
Can someone please suggest a workaround?

Thanks
            Bibudh

Andy Fingerhut

unread,
Aug 16, 2023, 1:55:39 AM8/16/23
to Bibudh Lahiri, p4-design
I have successfully followed the instructions in the https://github.com/p4lang/tutorials repository, in particular the directory of that repo named vm-ubuntu-20.04, on several systems:

+ Windows 10 + VirtualBox 6.1 and later
+ Windows 11 + VirtualBox 6.1 and later
+ macOS 12.6.x + VirtualBox 6.1 and later
+ some earlier versions of macOS, I do not recall exactly how far back, but since about 2019 or so

I have never tried to follow those instructions on a Windows system with WSL installed.  I have no idea whether there are issues with trying that or not.

Andy

--
You received this message because you are subscribed to the Google Groups "p4-design" group.
To unsubscribe from this group and stop receiving emails from it, send an email to p4-design+...@lists.p4.org.
To view this discussion on the web visit https://groups.google.com/a/lists.p4.org/d/msgid/p4-design/8bcc98af-0315-463f-8e4f-580c9471a741n%40lists.p4.org.
Reply all
Reply to author
Forward
0 new messages