bhyve Bhyve virtual CPU use

Another question about bhyve. I have a host with four cores on it, and I am running two bhyve VMs presently. One of these VMs has two CPUs assigned to it, and the other has one. Now I find myself wishing to add a third VM to this host, but by way of poor planning I may not be able to do this. Reading the bhyve man page, there is a section that leads me to believe that a core assigned to a VM is not otherwise available to be used by the host:
Code:
-H             Yield the virtual CPU thread when a HLT instruction is
                 detected.  If this option is not specified, virtual CPUs will
                 use 100% of a host CPU.

Does anyone know for sure? If a core cannot be shared with a host, I can either get a host with more cores, or reconfigure one of the existing VMs to use one core rather than two.
 
My understanding is that cores can be shared- that's my experience, too. Running heavy compression tasks (writing to an archive dataset with zstd-19) on my host managed to stall a VM for some time. CPU pinning is an option in bhyve, but it's not the default.
 
Thanks for the good news. One VM here runs Kali Linux, and the second runs the Metasploitable Linux. Got this set up so that the Kali machine has limited network access, and the Metasploitable is totally isolated from everything but the Kali machine. I was hoping to add a Windows 10 VM for learning, hacking. I'm taking a class in Ethical Hacking, and it is nice to have some targets here at home. Thanks again for the good info!
 
Do note that if you heavily oversubscribe CPU you may start getting guest crashes.
E.g., a guest FreeBSD can crash with "spinlock held too long" panic.
 
Do note that if you heavily oversubscribe CPU you may start getting guest crashes.
E.g., a guest FreeBSD can crash with "spinlock held too long" panic.
Thanks, Andriy, that is good to know. In practice here, most of the VMs are idle while I do other things on the host system. But if I should get such an error, I will know what's up. Thanks again.
 
Back
Top