Closed kopiczko closed 2 years ago
It should be doable, but might need some special flags:
$ sudo modprobe -r kvm_intel
$ sudo modprobe kvm_intel nested=1
$ cat /sys/module/kvm_intel/parameters/nested
Y
Running the lima VM, on Ubuntu:
anders@lima-default:/home/anders$ sudo apt install cpu-checker
...
anders@lima-default:/home/anders$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
I'm on macOS Monterey and with default ubuntu /dev/kvm
doesn't exist. It's the same with fedora 35.
Sorry, I thought you were on real Ubuntu. So you want three levels of Inception, when it hits the water ?
I think the commercial options (VMware and Parallels) do it, but I don't think QEMU supports it (on Mac)
I'm not sure, but I don't think qemu supports nested virtualization like that on macOS.
I know it works with VMware Fusion, but it is a commercial product. I.e. you can run Ubuntu on Fusion, and then run Lima inside the Ubuntu VM (you need to enable nested virtualization, and possibly virtualized performance counters).
I didn't understand where Lima entered the picture, instead of running the image builder with HVF instead of KVM ?
The supporting scripts probably don't work on macOS, or something. Theoretically they could be translated, instead.
https://github.com/kubernetes-sigs/image-builder/tree/master/images/capi
But most likely the easiest is doing it on a real remote (or local) Linux server.
Duplicate of https://github.com/lima-vm/lima/issues/22
I'd like to ask if there is a chance to have nested virtualization? I tried steps from https://docs.fedoraproject.org/en-US/quick-docs/using-nested-virtualization-in-kvm/ but TBH I have no idea what I'm doing. I need kvm in particular to be able to build capi images.