bhyve Is it possible to run OpenBSD virtualization (vm) within bhyve?

ikevin8me

Active Member

Reaction score: 12
Messages: 179

I've launched an OpenBSD instance within bhyve. I'm testing if it is possible to run OpenBSD's virtualization (vm) by executing this command (from within OpenBSD):
dmesg | egrep '(VMX/EPT|SVM/RVI)'
and it returned nothing.

So, it is possible to set bhyve to to enable OpenBSD to run virtualization?
 

astyle

Aspiring Daemon

Reaction score: 240
Messages: 535

Let me see if I got you straight:
1. On a FreeBSD host, you have a bhyve VM with OpenBSD running.
2. Within that VM (within OpenBSD) you're trying to run yet another VM.

I don't know if bhyve can handle 2-layered virtualization like that. I think VirtualBox can. In any case, you'd have to go into the BIOS of the physical metal (the one where you have FreeBSD installed), and enable VT-x paging or something like that (Check documentation!).

2-layered virtualization has been historically VERY difficult to pull off.

BTW, based on the documentation you linked to, it looks like you need to set bhyve's processor to something else. [Your command returning nothing] tells me that your current setup cannot run yet another VM inside.
 

Alain De Vos

Daemon

Reaction score: 541
Messages: 1,880

I think you can run bhyve host under a vmware host.
Or a bhyve host under a Linux KVM host.
I found no references to other forms of nested virtualisation.
 
OP
I

ikevin8me

Active Member

Reaction score: 12
Messages: 179

Let me see if I got you straight:
1. On a FreeBSD host, you have a bhyve VM with OpenBSD running.
Yes.

2. Within that VM (within OpenBSD) you're trying to run yet another VM.
Yes. Specifically, OpenBSD’s [built-in] vm: https://www.openbsd.org/faq/faq16.html
BTW, based on the documentation you linked to, it looks like you need to set bhyve's processor to something else. [Your command returning nothing] tells me that your current setup cannot run yet another VM inside.
How do I set bhyve’s processor to something else, so I can run OpenBSD’s vm?
 
OP
I

ikevin8me

Active Member

Reaction score: 12
Messages: 179

(Sorry for the formatting above. Couldn’t get it right…)
 

astyle

Aspiring Daemon

Reaction score: 240
Messages: 535

@OP: I would strongly suggest reading the FreeBSD handbook to educate yourself about what bhyve options you can play with, and then search the Internet. Yeah, this does sound a lot like the same old tired 'RTFM', but that's how we help around here... Give the man a fish...
 
Top