Comment Re:sounds pretty cool but (Score 1) 94
I had this exact issue. I spent some time experimenting with UTM, QEMU and Vagrant. This was a little over a year ago (March 2022 according to the timestamp on the Vagrantfile).
I was hoping that Parallels would eventually release something that would make this a lot more seamless, but apparently they're nervous about Apple bashing them overt the head for providing x86 on Arm compatibility and as such aren't going to release something that allows it.
I managed to get x86 vagrant images working fine, here's the relevant section of Vagrantfile
config.vm.box = "peru/ubuntu-20.04-server-amd64"
config.vm.provider "qemu" do |qe|
qe.arch = "x86_64"
qe.machine = "q35"
qe.cpu = "max"
qe.smp = "cpus=4,sockets=2,cores=2,threads=1"
qe.net_device = "virtio-net-pci"
end
As for speed, I was pretty concerned it would be unusable, however whilst it wasn't blazingly fast, it was substantially faster than I thought it would be. A terminal was very responsive, essentially instant and if I didn't know better I'd have assumed I was using a virtual machine on a native CPU.
In the end I haven't actually had to use in anger it over the last year so I don't know how it would be compiling things, but I spun it up (had to update both Vagrant and all it's plugins) and here are some profiling comparisons from sysbench and a few random other experiments below.
Host CPU vs Virtual CPU for comparison:
Virtual CPU speed:
events per second: 304.60
Host CPU speed:
events per second: 12951889.44
File IO:
File operations:
reads/s: 2686.80
writes/s: 1791.20
fsyncs/s: 5737.60
Throughput:
read, MiB/s: 41.98
written, MiB/s: 27.99
Memory:
Total operations: 2844369 (284335.43 per second)
2777.70 MiB transferred (277.67 MiB/sec)
Quick curl+gzip:
curl -s <large gzipped text file>|pigz -dc |cpipe -vt 2>&1 >/dev/null| perl -pe 's/\n/\r/g'
thru: 5.159ms at 24.2MB/s ( 26.5MB/s avg) 310.8MB
Compile hello world:
time g++ test.cpp
real 0m2.457s
user 0m2.133s
sys 0m0.325s