# Please give some ideas about the handbook describing FreeBSD in virtual machine How-to.



## fel1x (Jan 3, 2021)

I reported to Bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249976

The problem is this page: https://www.freebsd.org/doc/handbook/virtualization.html

I think this whole chapter is too old.

I think these should be changed
1. Mac OS® X -> macOS(wow, it's years ago since apple changed it to macOS)
2. VirtualPC is dead. We need alternative or delete it. 
3. FreeBSD a guest on Virtualbox --> we need to add screenshots for newbies.

Any other ideas? If there are, PLEASE comment in the Bugzilla, not here, because it is hard to copy-paste all of them.


----------



## scottro (Jan 3, 2021)

It's good that you did this. There are many facets of the handbook that get outdated, and unless people file bugs about them, they may not get changed for a long time. 
Not sure if I agree about adding screen shots. Not that I think newcomers should be neglected, but the steps are relatively simple and don't require screenshots, in my humble opinion.


----------



## tux2bsd (Jan 3, 2021)

FreeBSD can be a guest on KVM so should be mentioned at least.


```
https://www.linux-kvm.org/page/Guest_Support_Status#FreeBSD
```


----------



## drhowarddrfine (Jan 3, 2021)

tux2bsd said:


> FreeBSD can be a guest on KVM so should be mentioned at least.


That would be documentation for Linux, not FreeBSD, and should not be in the FreeBSD documentation.


----------



## fel1x (Jan 3, 2021)

drhowarddrfine said:


> That would be documentation for Linux, not FreeBSD, and should not be in the FreeBSD documentation.


No, there is about parllels desktop on mac and vmware fusion on mac and virtual pc on windows etc in the handbook. There is nothing wrong with FreeBSD as a guest on Linux KVM.








						Chapter 23. Virtualization
					

Virtualization software allows multiple operating systems to run simultaneously on the same computer




					www.freebsd.org
				











						Chapter 23. Virtualization
					

Virtualization software allows multiple operating systems to run simultaneously on the same computer




					www.freebsd.org
				











						Chapter 23. Virtualization
					

Virtualization software allows multiple operating systems to run simultaneously on the same computer




					www.freebsd.org


----------



## jmos (Jan 3, 2021)

My 2 cents: How to run a guest belongs to the documentation of the virtualization (and: as far I know there's nothing special to run a FreeBSD guest, so why should that be explained?). FreeBSD itself has only one virtualization: bhyve should be explained in the handbook, but all others (especially those "FreeBSD as Guest…") don't belong there and can be removed.


----------



## kpedersen (Jan 3, 2021)

jmos said:


> My 2 cents: How to run a guest belongs to the documentation of the virtualization (and: as far I know there's nothing special to run a FreeBSD guest, so why should that be explained?). FreeBSD itself has only one virtualization: bhyve should be explained in the handbook, but all others (especially those "FreeBSD as Guest…") don't belong there and can be removed.


I kind of see this (and particularly agree with your point about running FreeBSD as a guest doesn't really need explaining) however I guess Xorg being a port, just like VirtualBox is still in the handbook so it is fair that core and popular packages should be in there.

KVM is non-trivial to faff around with and is a mess of different config systems (typical Linux problems really) so I don't feel it is suitable for going in the handbook frankly.

I do agree that VirtualPC should be updated to Hyper-V. I am very surprised Microsoft hasn't contributed their very in-depth tutorials from the MSDN / Azure. Perhaps we could just grab that. Some BIS info could be useful:

https://docs.microsoft.com/en-us/wi...best-practices-for-running-freebsd-on-hyper-v
https://wiki.freebsd.org/HyperV

If I can think of anything useful I will comment on the bugzilla. I was even planning to contribute to the handbook in the near future.


----------



## scottro (Jan 3, 2021)

The current handbook does have a section on FreeBSD as a guest on VirtualBox, so I'd have to, most respectfully, disagree with Doc Howard's side there. It would be for users of FreeBSD.  As for KVM, as kpederson wrote, it can be non-trivial, but its configuration is basically a Linux issue. However, once set up, installing FreeBSD as a guest falls under FreeBSD documentation, in my opinion.
As for hyper-v, even if there isn't documentation on it, perhaps simply a link to the MS article that kpederson mentions might be sufficient. I guess, as there are manpower limitations, one should think about which section is most likely to be used. VirtualBox is probably the most common for those experimenting with FreeBSD.  If using it on hyper-v, you are probably experienced enough to find the MS article.  KVM users tend to be more advanced, but probably less common, so if there are tricks to running it on KVM, a guide to that would be useful. (While I use KVM at times, we're mostly a FreeBSD shop, so I run FreeBSD on baremetal, not in VMs, so I'm not sure what, if anything, needs to be documented.)


----------



## tux2bsd (Jan 3, 2021)

KVM is not mentioned in the virtualization doc at all and that is absurd, it actually looks like FreeBSD is being petty by not mentioning it...

FreeBSD can run on KVM.  Mention KVM in the doc and point to the KVM site or wiki page or both, whatever.  *Mention does not mean provide in-depth guides.*

For the other virtualization methods maybe look at reducing the amount of in-depth guides provided.

For the grey area between there should be a wiki where people can add specifics regarding usage of FreeBSD as a guest and/or host (whatever the permutation between version and virtualization platform).



kpedersen said:


> KVM is non-trivial..


KVM on Linux can be extremely trivial, the abstraction stuff just does it for you (but, like most things, excessive complexity can also be the path of choice).


----------



## kpedersen (Jan 4, 2021)

tux2bsd said:


> KVM is not mentioned in the virtualization doc at all and that is absurd, it actually looks like FreeBSD is being petty by not mentioning it...


Can you point us towards any Linux distro's docs on how to run as a guest inside FreeBSD's Bhyve? Perhaps the RHEL docs or the Arch Linux wiki? Probably not because perhaps all Linux distros are being "petty" not mentioning how to run inside Bhyve?



tux2bsd said:


> KVM on Linux can be extremely trivial, the abstraction stuff just does it for you


You mean the unsupported 3rd party stuff that will likely be replaced by the end of the year? Where do we start? libvirt XML schema? qemu-kvm arguments or perhaps Gnome's little Boxes GUI frontend screenshots? The list is endless. Using this stuff will rack up a technical debt that will make maintaining the FreeBSD handbook non-trivial. As complex as they are, at least the direct qemu flags will probably still be relevant by the end of the day.

Yes, we should have good documentation on using FreeBSD on Linux's primary virtualization system. I do agree with you. However perhaps just a link to their own documentation would be best. No reason the FreeBSD handbook should provide better documentation than the Linux communities themselves (we probably couldn't keep up with the constant changes anyway).


----------



## drhowarddrfine (Jan 4, 2021)

scottro said:


> The current handbook does have a section on FreeBSD as a guest on VirtualBox


You can run VirtualBox on FreeBSD and have FreeBSD as a guest. So it makes sense.


scottro said:


> As for KVM  ... its configuration is basically a Linux issue. However, once set up, installing FreeBSD as a guest falls under FreeBSD documentation,


The setting up part is Linux documentation. Setting up VirtualBox is FreeBSD documentation.


----------



## drhowarddrfine (Jan 4, 2021)

tux2bsd said:


> KVM is not mentioned in the virtualization doc at all and that is absurd, it actually looks like FreeBSD is being petty by not mentioning it...


Is Linux being petty by not mentioning bhyve in their documentation and show how to set Linux up on FreeBSD?

I do believe there is documentation on FreeBSD.org, or at least an article, on how to set Linux up on FreeBSD as a guest. Does Linux have such a thing in their docs or published technical articles on their distro web sites?

EDIT: kpedersen is my brother from another mother.


----------



## tux2bsd (Jan 4, 2021)

I don't know why the pair of you turn it into a "they don't so why should FreeBSD".  Lowering the arrogance also wouldn't hurt.

*edit (Jan 5th): *The arrogance, mentioned in this post, was that of the members referred to in the first sentence. Unfortunately they continue to post below claiming things that were never said, their continued trolling ruined what would have been a perfectly good thread.  I'm not wasting more time on them by replying, thread unwatched.

Good luck mintchoco, just a mention (in depth guides not necessary, can come later if needed) p.s. your English is excellent.


----------



## drhowarddrfine (Jan 4, 2021)

tux2bsd Again, you seem to think FreeBSD not doing it is arrogance but Linux not doing it must be OK? I don't understand why you are picking on FreeBSD when Linux does the exact same thing.

Worse, while FreeBSD makes an effort to run Linux programs, Linux makes NO effort to do so. Is that arrogance on their part?


----------



## tux2bsd (Jan 4, 2021)

Grow up.  All I have said is include a mention in the docs, it is not my place to teach you comprehension.


----------



## a6h (Jan 4, 2021)

To address the use of word "absurd" in one of the replies:

Technically and to some extend historically, a UNIX OS provides two source of documentation:
1. A UNIX Programming Environment, which explains how to use the base, i.e. kernel and userland.
2. A UNIX Programmer Manual aka man page, which documents various programs in the base.

In addition to those:
1. For further in-depth investigation, a developer or even a user suppose to study the /usr/src.
2. And finally, to post his problems to mailing lists, and hopefully but not necessarily find some solutions.

Anything other than that is bonus, including this Forums, forty-three books and articles in the /usr/doc, and so forth and so on.
Providing such added bonuses are always at the mercy of volunteers.

Ignore the Port Collection for a moment. We have BSD kernels and userland (FreeBSD, OpenBSD, NetBSD, DragonFly BSD),
which by all accounts are the best OSS bases, that's ever created on earth. I'm striking by the absurdity of the using Linux.


----------



## tux2bsd (Jan 4, 2021)

> vigole said:
> 
> 
> > I'm striking by the absurdity of the using Linux.


Try and give OP constructive feedback too.


----------



## a6h (Jan 4, 2021)

kpedersen said:


> I was even planning to contribute to the handbook in the near future.


That's great.

In the meantime, if any one is interested in contributing to FreeBSD Documentation Project (FDP),
and is not familiar with the whole process, please refer to:

The FreeBSD Documentation Project Primer for New Contributors (fdp-primer).

The guide is comprehensive, and process of edit/submit to documentation is very straightforward:
Install few ports, checkout the doc/head source, edit the docs, and submit the diff. And be patient!


----------



## drhowarddrfine (Jan 4, 2021)

tux2bsd said:


> All I have said is include a mention in the docs


No. You've said FreeBSD is arrogant for not doing what Linux also does not do. You are insulting.


----------



## kpedersen (Jan 4, 2021)

tux2bsd said:


> I don't know why the pair of you turn it into a "they don't so why should FreeBSD".


For me, I think this is exactly it. FreeBSD does not exist to babysit Linux. Let them roll around in their own bad ideas. It is the only way for them to learn.

In general I do agree with you though. One day when Linux matures, I am sure we will bother writing documentation for running FreeBSD on KVM.

<troll>The Microsoft Hyper-V FreeBSD integration docs are very good. So the correct phrase would be "Linux doesn't so why should the others?"


----------



## a6h (Jan 4, 2021)

1. Many of people regard the word "obsession", as a pejorative word. I don't. I think it's a useful trait.
2. In fact, you have to be obsessed with some thing/target/project/etc, to make progress in that field.
3. This is the FreeBSD Forums. Some of us are obsessed with FreeBSD, and I think that's a good thing.


----------



## fel1x (Jan 5, 2021)

Sorry I'm bit late. This thread is talking about documentation, not Linux or word definitions. 









						Chapter 23. Virtualization
					

Virtualization software allows multiple operating systems to run simultaneously on the same computer




					www.freebsd.org
				



Here, it says


> Virtualization software allows multiple operating systems to run simultaneously on the same computer. Such software systems for PCs often involve a host operating system which runs the virtualization software and supports any number of guest operating systems.
> 
> After reading this chapter, you will know:
> 
> ...



So I think "Running FreeBSD on KVM" is a good idea. 

This is why I support writing about KVM.
Most people are conservative, which means they feel safe when they use familiar OSs. Some of people here know how hard and uncomfortable when we started learning FreeBSD. This trend goes extreme when the users are professionals, such as server manager. When they hear about FreeBSD, they might use Virtual Machine because it's safer than multi-booting. The influence of Linux has been increased and now it is equivalent to Windows and macOS. There are documents about virtualising FreeBSD on Windows and macOS, but not Linux. It's unfair.

The handbook director said I should send him a patch. However, I don't have any experience. Is there anyone who have experience contributing the handbook?

And, sorry for my poor English.


----------



## a6h (Jan 5, 2021)

Handbook doesn't have a dedicated section for Windows/host VMware. There's nothing special about VMware on Windows,
and running a FreeBSD guest on a Windows/VMware doesn't have a lot of quirks. Also, a comprehensive guideline is available on VMware website (about VMware itself),
but here's some tips (how to, but not why) for new FreeBSD/VMware users on Windows:

*1.* In case of NAT (preferable method of networking for new users):
VMware "Virtual Network Manager" selects the right configuration for you. But if it's necessary to customise NAT, to specific address/value:

*I.* Suppose the ADSL/Router address is set to 192.168.0.1, and you want to use 192.168.1.x for VMware NAT.
*II.* You have to set "Subnet IP" to 192.168.1.0.
*III.* Then you have to configure the "Gateway IP" in "NAT setting". To prevent headache, just set it to 192.168.1.2.


*2.* Keep it simple, and use DHCP in the guest.
But if you want to use static IP, just remember to set the `defaultrouter` in the rc.conf to correct value. In this particular case:
/etc/rc.conf

```
defaultrouter="192.168.1.2"
```

Also ifconfig_XXX should reflect this setting. For example:

```
ifconfig_bge0="inet 192.168.1.3 netmask 255.255.255.0"
```

*3.* VMware "Virtual Network Manager" defines a range for DHCP/NAT, and it's configurable in "DHCP Setting", e.g.
192.168.1.128 ~ 192.168.1.254.
You can change those values.


*4.* "Restore Defaults" in the VMware "Virtual Network Manager" will reset all your NAT settings. After a "Restore Defaults", don't forget to either:

I. Reflect the new settings in the rc.conf
OR
II. Reconfigure the Virtual Network Manager accordingly.


*5.* If you want to use a CLI-only FreeBSD guest:
The easiest way, to enlarge/resize fonts in "System Console" and "Virtual Consoles":

*I.* Set the `kern.vty` in the loader.conf to sc(4)
/boot/loader.conf

```
kern.vty=sc
```
*II.* Probe the resolution:
`vidcontrol -i mode`


*III.* Test the different values and find the optimal resolution, e.g.
`vidcontrol MODE_306`



*IV. *Then set it in the rc.conf
/etc/rc.conf

```
allscreens_flags="MODE_306"
```


*6.* VMware and Hyper-V have slightly different approach to handle Text-Only console (CLI). You have to probe and test different value, to find the optimal resolution separately.
In other word, to get a similar font size in both VMware and Hyper-V, you may have to set different values accordingly. For example:

*I.* allscreens_flags="MODE_306" for VMware
AND
*II.* allscreens_flags="MODE_299" for Hyper-V


----------



## fel1x (Jan 5, 2021)

Anyone who can edit handbook files? I'm having a vacation for a while so it will take too long if I edit them.


----------

