What specs, distros, and settings would work best for running one (or more) VMs on a Framework laptop? My old laptop can barely run a VM and I don’t want to run into that problem again. I also would like the flexibility to run multiple VMs if necessary.
My current specs are:
32GB RAM (2x16GB)
OS: Undecided… leaning towards Fedora 34
Do you think this setup will struggle, or that I have nothing to worry about?
I ran Windows VMs in Ubuntu 20.04 with 256gb primary storage HDD and 8gb RAM in an i7 laptop from 2013ish. Two wouldn’t work, and I couldn’t run anything else in the host OS, but it worked fine otherwise. I expect that with your specs, you should be good to go for at least one, even running other stuff in the host OS.
I don’t have a specific use case in mind. But I imagine others have the same question. As a CS student the typical use case was running a single Ubuntu VM and writing/compiling/executing C/C++ code. The most intensive use case I ran into was compiling the linux kernel (which took 4-8 hours for most laptops and 30 hours for my laptop). The (very uncommon) use case for multiple VMs was simulating a network between a few nodes. The individual VMs weren’t doing anything intensive other than communicating with other nodes in the simulated network.
I don’t have any specific projects planned that I would need virtualization for, but I would like to know that if I need to, I can spin up a funtional VM.
You’ll be able to virtualize pretty well on this IMO if you don’t overdue it. Can squeak out more performance if you do a mix of VMs and containers.
My main box is an a i5 with 32GB of ram from 2015 and I run a bunch of VMs all the time for different purposes being automatically stood up when I need them with vagrant/terraform. But this will be a much better experience because it has a better processor, more performant and higher capacity ram, PCI gen. 4 SSD (if you got that) and even the gen. 3 is better than what I have now honestly.
For most use cases including what you outlined, you shouldn’t have many issues with this and I think you’ll be just fine.
I cannot imagine you’ll have an issue given your VM use cases. As soon as I get mine I plan to do some stress tests with VM’s just to see, but I expect flying colors.
I just realized I didn’t answer your questions:
What specs, distros, and settings would work best for running one (or more) VMs on a Framework laptop?
Really depends on what your VMs need. For kernel work / compiling code I’d say CPU and memory being the most important with a disk I/O coming in 3rd. Between the CPU choices the 1165G7 will be very close to the performance of the higher one. 32GB of memory will be fine as long as the host has enough. The important thing is that you run in dual channel which you will be with two sticks. As far as disk I/O. Gen. 4 is faster than Gen. 3, but after you add on the virtualization layers… I kinda think there will be a different bottle neck first before Gen. 3 becomes a problem.
This one is really dealers choice. It really comes down to what you are most comfortable with. I am running Manjaro/Arch personally. And I do a mix of KVM/Qemu and LXD. Docker sometimes if needed as well.
Hmm… I can’t think of too much here. Make sure virtualization is turned on in the BIOS (which will probably be default anyway). Possibly look at power settings when you are on battery.
I went with the i5 and 64gb of ram. I have docker/podman and microk8s running on Ubuntu off of the external modules. Haven’t tried spinning up virtualbox, but the containers seem to do well.
You mentioned you’re a student. For a network security and malware analysis degree we had some fairly minor requirements all in all. The biggest environment I would ever run was a windows AD server and 3 windows VMs. From a number stand point there was a network we built with a gateway, dns server, file host, a netboot machine and a handful of “users”. I used an i7 and 16g of ram on that four years ago.
For that you I would do an i7 and 32g of ram. Nomb85 had it on the nose with what I would expect for performance expectations.
Only thing I would say is depending on your course or prof Windows is a fairly reasonable choice of OS. I used Ubuntu and Arch for most of my courses and there were some profs who weren’t as good at assisting if I had questions or problems arise.
I’m no longer a student myself, so I have more freedom when it comes to OS choice. For any students looking to run linux, i would definitely recommend dual booting with windows. You could put windows on a 256GB storage expansion card and just have it when you need it.
I have 5 VMs on the below hardware spec… I can run 3 at a time with no issues or loss of resources… the VMs range and are mostly for testing (Win 11, Server 2022, Image Capture, Some Linux distros etc etc)… The only thing I need more of is memory… but seeing as the CPU is less powerful and mem speed is slower I don’t see why you would have any issues running multiple VMs on there!
i7-7700T 2.9GHz w/ 8MB L3 Cache (Intel 630 HD graphics)
16 GB DDR4 2400MHz Memory
1TB WD Blue SSD
… Using Hyper-V and Dynamic Memory since I only have 16GB… Hope that helps.
I am running a virtual machines on the FrameWork, using both VirtualBox and Qemu, as I hope move from VB to Qemu in general.
I run Ubuntu 21.04, but Arch or other distributions should do just as well.
Since I want to run Windows in VMs, I invested in 64 GB of RAM, but for Linux machines 16/32 is plenty.
I have run into a few bumps, I’ll describe to save others a little time.
First of all disable Secure boot in the Bios. I did try to make it work with secure boot, updating kernel drivers etc. But I decided it wasn’t worth the effort. If anybody does succeed, please leave a note.
Second for VirtualBox. Install using the cli “sudo apt install virtualbox-6.1” as I experienced the version from the “Software”-UI, is not the latest version.
Then I copied my Windows 10 Work-machine image files, to the FramWork laptop and added it in the VirtualBox Manager. Everything runs fine.
My only problem with VirtualBox is, that it doesn’t allow nested virtualization and I want to be able to run WSL2 on Windows 10, which is basically a virtual Ubuntu running in Windows enabling the user to run docker and other tools Windows doesn’t support properly. This is necessary for my work to run on windows as well as Linux(sigh!).
With Qemu and KVM this is no problem, so I converted the image and got it running with the following command: qemu-system-x86_64 --enable-kvm -display gtk -m 16G -drive driver=raw,file=/path_to/windows.img -cpu host -smp cores=2,threads=2
I am working on getting bridged network to work, to be able to reach the machine from outside.
Hope this helps somebody apart from myself
The nested virtualzation problem you’re experiencing might actually be a restriction with recent releases of Windows 10 and WSL2.
The problem is a combination of MS’ Hyper-v and the VirtualBox hypervisor, as the issue describes.
I admit I have no real idea of the details of why its not working, but the client-Windows machine ‘knows’ it’s virtualized (look in task manager) and Hyper-v doesn’t work.
It don’t think its a deliberate restriction in Windows, rather a temporary bug in VB, but I don’t know.
The result is that until it is fixed, we have to use alternatives or forget WSL2.
Qemu works for me, but VMWare seems to be working too .
I have been highly enjoying LXD (coming from VMware / parallels).
It does OS containers (not app containers like Docker) as well as Virtual Machines using Qemu: https://linuxcontainers.org/
I am really enjoying it a lot.
@Henrik_Runge Did you ever get bridged networking working? I’m attempting it now and from what I’ve learned it seems like perhaps it isn’t possible since the laptop only has the one wireless network device?
It was quite obvious actually. To access the client from the outside, you have to set up portforwarding.
I am using this to turn on my VM(ubuntu client):
“qemu-system-x86_64 --enable-kvm -drive file=/home/path_to_vm_disk/disk-image.img,format=raw,cache=none,if=virtio -m 6G -cpu host -smp cores=4,threads=2 -vga virtio -display gtk,gl=on,window-close=off -nic user,hostfwd=tcp::2222-:22 -audiodev pa,id=snd0 -device ich9-intel-hda -device hda-output,audiodev=snd0”
The interesting part is: -nic user,hostfwd=tcp::2222-:22
It sets up the hosts port 2222 to match the clients port 22 (default for ssh).
To test, go to the host, open a terminal and type: “ssh user@localhost -p 2222”
This can be done with other ports as well, but i am satisfied with ssh/scp so far.
Remember to assign different port numbers, if you run more than one client-machine
More info at Qemus network docs