vm-bhyve vnc issue

I see a somewhat strange vm-bhyve configuration issue (the version is 1.4.2).
The point is that I tried to enable VNC. Per 'vm' man all I had to do is to set 'graphics="yes"' in the VM configuration file.
This is what I had done and VNC was not enabled. I run bhyve manually and VNC started.
I looked at vm-run code and see that 'graphics' parameter processed in 'uefi' mode and this mode requires that _uefi variable is set.
The variable '_uefi' set either if 'loader' is 'uefi' or if 'uefi' configuration parameter is set to "yes", because of the code
config::get "_uefi" "uefi"
I have 'loader="bhyveload"' that is set for freebsd template.
I added 'uefi="yes"' to my configuration file and VNC started to work.
But this configuration parameter neither was described nor even mentioned in the VM man.
I am somewhat confused.
The big part of templates do not have 'loader="uefi"' configuration parameter. They will not have VNC support and I do not see this fact reflected somewhere in the spec.
On the other hand the existing parameter 'uefi' is not reflected in the spec but allows VNC but it can also have some side effect.
Can somebody explain this configuration issue?
 
I see a somewhat strange vm-bhyve configuration issue (the version is 1.4.2).
The point is that I tried to enable VNC. Per 'vm' man all I had to do is to set 'graphics="yes"' in the VM configuration file.
This is what I had done and VNC was not enabled. I run bhyve manually and VNC started.
I looked at vm-run code and see that 'graphics' parameter processed in 'uefi' mode and this mode requires that _uefi variable is set.
The variable '_uefi' set either if 'loader' is 'uefi' or if 'uefi' configuration parameter is set to "yes", because of the code
config::get "_uefi" "uefi"
I have 'loader="bhyveload"' that is set for freebsd template.
I added 'uefi="yes"' to my configuration file and VNC started to work.
But this configuration parameter neither was described nor even mentioned in the VM man.
I am somewhat confused.
The big part of templates do not have 'loader="uefi"' configuration parameter. They will not have VNC support and I do not see this fact reflected somewhere in the spec.
On the other hand the existing parameter 'uefi' is not reflected in the spec but allows VNC but it can also have some side effect.
Can somebody explain this configuration issue?
If you only work with FreeBSD/DragonflyBSD guests ('loader=bhyveload' only supports them), you don't have to use vnc to install it, the normal console is enough. I set my console to use tmux, though. I don't like the default nmdm console.

If you want to use vnc, you had to use uefi. It's common knowledge so it's not in the man page. The graphics is based on uefi framebuffer, so how could you use it without uefi I wonder?

Bhyve is not like VirtualBox. Graphics support on Bhyve is not as good as VirtualBox.
 
Yes, maybe it should be made clear somewhere but the graphics support is actually provided by the uefi firmware.

As sysctl, I much prefer to continue using bhyveload with the tmux console. It doesn’t require opening up ports for vnc or using a vnc client, boots faster and if I am ssh’d into the host I can easily drop into a guest and access the entire boot process from start to finish without leaving that ssh session.
 
Honestly speaking my original intent was to see the boot process. This is what I tried to resolve by using VNC. You mentioned that you could drop into a guest and see the boot process. But how do you do this? Sorry for such stupid question but I am not familiar with bhyve yet. It was my first attempt to work with it: I installed FreeNAS by using vm-bhyve. I used the freebsd template that uses bhyveload. When I finished installation I faced the problem to get the IP address and tried to resolve it by running VNC. BTW I finally succeed by using undocumented parameter 'uefy="yes"' but it seems I could use the easier way.
 
vm console guestname

When using either bhyveload or grub2-bhyve, the guests main console can be directly accessed using either a null modem serial connection or via tmux. This shows everything from the boot loader through to multiuser mode.
 
Honestly speaking my original intent was to see the boot process. This is what I tried to resolve by using VNC. You mentioned that you could drop into a guest and see the boot process. But how do you do this? Sorry for such stupid question but I am not familiar with bhyve yet. It was my first attempt to work with it: I installed FreeNAS by using vm-bhyve. I used the freebsd template that uses bhyveload. When I finished installation I faced the problem to get the IP address and tried to resolve it by running VNC. BTW I finally succeed by using undocumented parameter 'uefy="yes"' but it seems I could use the easier way.
Please read the vm-bhyve wiki on github and the man page of the vm command more thoroughly. From what you said, we know you didn't do that at all or read very carelessly. The vm-bhyve templates are a bit outdated, but "uefi="yes"" is not undocumented. The fact is it's also deprecated in favor of "loader="uefi"".

Please also note that we are here only support FreeBSD but not derivatives like FreeNAS since they are heavily modifed from the standard FreeBSD and we don't have the needed knowledge to deal with them. We only know about FreeBSD. You would rather get more useful support about installing FreeNAS on bhyve on the FreeNAS forums.
 
Please read the vm-bhyve wiki on github and the man page of the vm command more thoroughly. From what you said, we know you didn't do that at all or read very carelessly.
My problem was that I used FreeNAS as the guest system. I do not know why but for this installation nmdm console does not work at all. As for tmux it shows just beginning of the boot process and then disconnects.
But I tried to install a cloud Linux and tmux works as it should.
As for FreeNAS, VNC does work for this installation. It has a CLI screen and I see it on VNC and can manipulate it even though I use bhyveload. But to enable VNC I had to use 'uefi="yes"' parameter. Maybe it is outdated but without it I couldn't run VNC and therefore I couldn't even get the client's IP address. I used my router to get the address but it does not look like a good idea.
It seems to me that bhyve is not the system that I will use. I am going to switch back to VirtualBox.
 
My problem was that I used FreeNAS as the guest system. I do not know why but for this installation nmdm console does not work at all. As for tmux it shows just beginning of the boot process and then disconnects.
But I tried to install a cloud Linux and tmux works as it should.
As for FreeNAS, VNC does work for this installation. It has a CLI screen and I see it on VNC and can manipulate it even though I use bhyveload. But to enable VNC I had to use 'uefi="yes"' parameter. Maybe it is outdated but without it I couldn't run VNC and therefore I couldn't even get the client's IP address. I used my router to get the address but it does not look like a good idea.
It seems to me that bhyve is not the system that I will use. I am going to switch back to VirtualBox.
Except VirtualBox has terrible IO performance. If you're fine with it, just use it. No one force you to use Bhyve.

BTW, if you want to continue experiment with bhyve and vm-bhyve, consider use 'loader="uefi"' instead of 'uefi="yes"', the later is deprecated. And yeah, I know it too, bro, nmdm sucks, nmdm is shite. I don't know why they still keep this shite, could be because it fits their kiss principle. If I'm in authority, if you fuse bhyve with qemu to create a complete accelerated emulator the same way they did for kvm.

Please keep in mind FreeNAS is not FreeBSD and is not supported there, too. If you are lucky, some FreeBSD users also used FreeNAS could help you, but most of the time you will not. Most of us use plain FreeBSD. We will try our best to help you the Bhyve part, but the FreeNAS part, we can't. We don't have the knowledge or experience with it. You would have more luck on the FreeNAS forum, not there.
 
Thank you for your advise to use 'loader="uefi"'. It works as expected.
I installed FreeNAS for training/testing purposes before I update my FreeNAS server; bhyve is one of new features of FreeNAS and my intent was to test it also.
My impression is that under bhyve it really works better than under VirtualBox and can be used. But as for installation procedure I'm still somewhat confused. Hope I will be able to find answers to my most important questions.
And I really appreciate your advice to use tmux. Even though it couldn't resolve my installation issue completely it at least started to show the installation process while nmdm showed just an empty screen.
 
Back
Top