How do I install virtualbox on PureOS?

I want to set up a VM for web development on my Librem 13v1. I figured I’d try virtualbox and Vagrant, since I have some experience with them on OS X. However, I’m having a hard time figuring out how to actually install virtualbox!

The first thing I tried was “sudo apt-get install virtualbox”, but that just returns “E: Package ‘virtualbox’ has no installation candidate”.

I tried looking at the Debian docs for virtualbox at https://wiki.debian.org/VirtualBox , but it seems that the “deb” command doesn’t exist. And I wouldn’t know which Debian version to go with anyway.

As an aside, I also found something called “Boxes” pre-installed on my Librem, but trying that ended with a “Box creation failed” error with no further information.

Could someone provide me with step-by-step instructions on how to set up virtualbox on PureOS, please?

1 Like

So the real GNU/Linux way to do virtualization is either through Xen or KVM/Libvirt and QEMU. Xen doesn’t have good guis for users, so I’ll help you through the process of setting up KVM/Libvirt and QEMU (it’s as easy to use as virtualbox, I swear).
First, you’ll need to install the necessary packages:

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system virt-manager

Then, you’ll need to give the necessary groups to the user:

sudo adduser libvirt
sudo adduser libvirt-qemu

Now you can run virt-manger. To create a VM, choose File > New Virtual Machine. The process is very similar to virtualbox.

Cool, thanks for that! I’ve installed a Debian VM, and I’ve got a LEMP stack up and running.

What would be the recommended way of sharing files between the host machine and the VM? I’ve got a bunch of sites sitting on the hard drive of the host machine, and I’d like to set it up so that the VM can read that directory.

Easiest way to do that is by setting up a SFTP server (is on by default if you set up openssh-server) and sftp into the server via the sftp command (most guis wont work, such as filezilla for example).

I think there’s also a shared folder mechanism but I haven’t used that much honestly.

Hello, I just tried installing Windows 10 in Virtual Machine Manager and got the following error… do you have any thoughts on how I can resolve this? Thank you!

Unable to complete install: ‘internal error: process exited while connecting to monitor: 2018-07-20T21:06:11.590942Z qemu-system-x86_64: can’t apply global Broadwell-noTSX-x86_64-cpu.spec-ctrl=on: Property ‘.spec-ctrl’ not found’

Traceback (most recent call last):
File “/usr/share/virt-manager/virtManager/asyncjob.py”, line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File “/usr/share/virt-manager/virtManager/create.py”, line 2553, in _do_async_install
guest.start_install(meter=meter)
File “/usr/share/virt-manager/virtinst/guest.py”, line 498, in start_install
doboot, transient)
File “/usr/share/virt-manager/virtinst/guest.py”, line 434, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File “/usr/lib/python2.7/dist-packages/libvirt.py”, line 3659, in createXML
if ret is None:raise libvirtError(‘virDomainCreateXML() failed’, conn=self)
libvirtError: internal error: process exited while connecting to monitor: 2018-07-20T21:06:11.590942Z qemu-system-x86_64: can’t apply global Broadwell-noTSX-x86_64-cpu.spec-ctrl=on: Property ‘.spec-ctrl’ not found

After getting the ISO image file of the OS launch virtualbox and click on new, give name to your virtual box and after that select the type of OS. Assign a portion of your RAM memory to the virtual machine. Select the amount depending on the RAM you have and also the need of the virtual OS. select a hard drive for the virtual machine after that created it new if you haven’t created it yet. Select the type of disk you want according to your wish. Select the size of the hard drive for your machine. Again, this setting depends on your actual hardware components After creating the virtual disk Click on Next and you’ll be done and the operating system’s requirements.The newly created machine need configuration with VirtualBox interface, but still needs some configuration. Right-click on it and select Settings. Finally, while still on the Settings window, select General on the left-hand menu and configure video memory according to the operating system’s requirements.
Select CD on the left-hand menu and enable the Mount with CD Drive option. Then click on the ISO Image File option to select your ISO file.
Asus Support Number