Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Virtualization Server Host - GUI guide
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
sevilla.larry
n00b
n00b


Joined: 09 Nov 2015
Posts: 42

PostPosted: Wed Jan 30, 2019 1:47 am    Post subject: Virtualization Server Host - GUI guide Reply with quote

Objective:
Installing/Setting-up a (physical) PC as a Virtualization Server Host using the following softwares:
1. Gentoo (x64) as host OS
2. QEMU/KVM and its companions
3. Virt-Manager as GUI manager

Sources:

https://wiki.gentoo.org/wiki/QEMU
https://wiki.gentoo.org/wiki/QEMU/Options
http://big-elephants.com/2015-09/virtual-public-network-setup-with-gentoo-and-kvm/

1. Install/Setup-up a PC like as Desktop PC with GUI (in my case XFCE).


2. Virtualization Host settings in Kernel
///--- Begin Kernel modifiation ---///

[*] Virtualization --->
<*> Kernel-based Virtual Machine (KVM) support
<*> KVM for Intel processors support (in my case, I have an Intel processor)
<*> Host kernel accelerator for virtio net

Device Drivers --->
[*] Network device support --->
[*] Network core driver support
<*> MAC-VLAN support
<*> MAC-VLAN based tap driver
<*> Universal TUN/TAP device driver support
[*] IOMMU Hardware Support --->

[*] Networking support --->
Networking options --->
<*> The IPv6 protocol
[*] Network packet filtering framework (Netfilter) --->
[*] Advanced netfilter configuration
Core Netfilter Configuration --->
*** Xtables targets ***
<*> CHECKSUM target support
<*> "CONNMARK" target support
<*> Ethernet Bridge tables (ebtables) support --->
<*> ebt: nat table support
<*> ebt: mark target support
<*> 802.1d Ethernet Bridging
[*] QoS and/or fair queueing --->
*** Queueing/Scheduling ***
<*> Hierarchical Token Bucket (HTB)
<*> Stochastic Fairness Queueing (SFQ)
<*> Ingress/classifier-action Qdisc
*** Classification ***
<*> Netfilter mark (FW)
<*> Universal 32bit comparisons w/ hashing (U32)
[*] Actions
<*> Traffic Policing
[*] Network priority cgroup

Kernel hacking --->
Compile-time checks and compiler options --->
[*] Debug Filesystem

File systems --->
<*> The Extended 4 (ext4) filesystem
[*] Ext4 Security Labels

General
-*- Control Group support --->
[*] Memory controller
[*] Swap controller
[*] Swap controller enabled by default
[*] IO controller
[*] CPU controller --->
[*] Group scheduling for SCHED_OTHER
[*] Freezer controller
[*] Cpuset controller
[*] Include legacy /proc/<pid>/cpuset file
[*] Device controller
[*] Simple CPU accounting controller
[*] Perf controller

///--- End Kernel modifiation ---///


3. /etc/portage/make.conf (in my case)

additional USE settings

USE="bindist -systemd X aio alsa bzip2 capstone curl fdt filecaps iscsi jpeg lzo ncurses nfs numa pin-upstream-blobs png pulseaudio python sdl snappy spice ssh systemtap tci usb usbredir vhost-net virtfs vnc vte attr virt-network"

///--- Note: virt-network in USE is important so that DHCP will be created similar to https://wiki.gentoo.org/wiki/File:Qemu_network_diag.png ---///

QEMU_SOFTMMU_TARGETS="i386 x86_64"
QEMU_USER_TARGETS=""


4. Install Virtual Manager

root #emerge --ask app-emulation/virt-manager

///--- Note: app-emulation/qemu will be automatically included ---///


5. Permissions

root #gpasswd -a <username> kvm
root #usermod -a -G libvirt <user>


6. /etc/libvirt/libvirtd.conf (UnComment the following settings)

unix_sock_group = "libvirt"
unix_sock_ro_perms = "0777"
unix_sock_rw_perms = "0770"


7. auto start libvirtd

root #rc-update add libvirtd default


8. Restart PC/Server


Note: this is just a guide, might help others.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1146
Location: Romania

PostPosted: Wed Jan 30, 2019 4:09 am    Post subject: Reply with quote

I have a strong suspicion this is kreyren. When on wiki didn't work, he moved on facebook and even posted a bug on bugtracker (about him being banned). Meanwhile he seems to post his guides that seem to be both the product of many trial and error and the word of god at the same time. Like this one.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22876

PostPosted: Wed Jan 30, 2019 4:47 am    Post subject: Reply with quote

This user has a registration date of 2015. I doubt this is kreyren. That person seemed too hot-headed to maintain a long term dummy account.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1146
Location: Romania

PostPosted: Wed Jan 30, 2019 7:36 am    Post subject: Reply with quote

https://bugs.gentoo.org/676876

he posted a bug report because he was banned from wiki for guides like this one. he was treating wiki like his personal blog.

https://drive.google.com/drive/folders/1s2eRQIEckhSBZSgFAkqt3oCtK5Ut_AS5

he got into fights with the gentoo people, and documented it. this was part of his bug report.

I told you people. facebook and this forum will intersect at one time. here it is.

my personal favorite is when he called someone dumb dumb. u can always recover from that. after many trials and errors, you get on wiki, and call admins dumb dumb. that will work. just so we know who this guy is.


and in this instance, he mastered the virt-network flag, because he couldn't make a bridge in openrc. instructions were only for systemd and ofc he is against that... so ... long way around i'm gonna have a farm of servers behind masquarade. that will work.
Back to top
View user's profile Send private message
sevilla.larry
n00b
n00b


Joined: 09 Nov 2015
Posts: 42

PostPosted: Wed Jan 30, 2019 7:54 am    Post subject: Reply with quote

Prior to this, I was using MS Server/Hyper-V 2016 (and now 2019).

I already installed Qemu/KVM in Devuan. Easy installation.

I'm new to Gentoo and to Linux(s).
Trying to learn in Linux way.
Using Gentoo, it optimizes the kernel.

I'm NOT kreyren.

I was looking for guides in the wiki, but encountered problems.

So I post this one, hoping it will help others.


To axl, your comments seems offensive.

If you have better idea, pls post your guide.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1146
Location: Romania

PostPosted: Wed Jan 30, 2019 8:00 am    Post subject: Reply with quote

ok.

here's my guide. if you want a bridge connection in openrc you have to edit /etc/conf.d/net|networking and be sure to have

config_br0
routes_br0 if applies
and
bridge_br0="eth0 tap0" or whatever.

ln -s /etc/init.d/net.lo /etc/init.d/net.br0

and here are my credentials. I can make a bridge connection on openrc. :)
Back to top
View user's profile Send private message
Maitreya
Guru
Guru


Joined: 11 Jan 2006
Posts: 445

PostPosted: Wed Jan 30, 2019 8:48 am    Post subject: Reply with quote

Quote:

If you have better idea, pls post your guide.


I don't think kreyren is capable of admitting he wants to see some others guide.

So I'll do right thing then,

Hey new Gentoo user, welcome! (and sorry for some of our more damaged users)


Some sidenotes on your "howto"
The title can be seen as a bit misleading as a host that dedicately serves virtual machines is usually not equiped with a GUI (that one is a client living on your desktop with which you connect to this server)

And virt-network is indeed not strictly needed when making a bridge (which works fine in openrc)

Also you might want to join on IRC as the help there is great for these kind of things :)
Back to top
View user's profile Send private message
sevilla.larry
n00b
n00b


Joined: 09 Nov 2015
Posts: 42

PostPosted: Wed Jan 30, 2019 9:03 am    Post subject: Reply with quote

thx for a nice professional reply.

Since I'm new and learning, I prefer GUI. Maybe later if it's production, it should be console/text based.

I will try IRC later. Not familiar.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9320

PostPosted: Wed Jan 30, 2019 9:00 pm    Post subject: Reply with quote

Maitreya wrote:
Hey new Gentoo user, welcome!

That seems a bit out of place considering the join date.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Jan 30, 2019 9:13 pm    Post subject: Reply with quote

asturm wrote:
Maitreya wrote:
Hey new Gentoo user, welcome!

That seems a bit out of place considering the join date.

People can register without becoming full-time users of the distro and come back when they're ready. There's nothing wrong with that.

I'd say there's much more wrong with silently tolerating trolls that haven't shaped up after eighteen years…
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9320

PostPosted: Wed Jan 30, 2019 10:13 pm    Post subject: Reply with quote

I'll give you that; there's probably a fair share of OTW participants who've never installed Gentoo.
Back to top
View user's profile Send private message
sevilla.larry
n00b
n00b


Joined: 09 Nov 2015
Posts: 42

PostPosted: Thu Jan 31, 2019 12:13 am    Post subject: Reply with quote

I'm have a full time job. Mostly (99%) Windows (and DOS since it's inception) [consider me as equivalent to your Guru].

But, I'm learning various Linux distributions, not just Gentoo, on and off, sort of retirement plan [so newbie / rookie].

Windows licenses, specially Enterprise, are so expensive. Not feasible to start an IT business.

fyi...
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jan 31, 2019 12:56 am    Post subject: Reply with quote

sevilla.larry wrote:
Windows licenses, specially Enterprise, are so expensive. Not feasible to start an IT business.

From what I've heard recently, keeping up with Microsoft licensing is quickly becoming a full time job on its own. Good idea to have an escape route.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22876

PostPosted: Thu Jan 31, 2019 2:11 am    Post subject: Reply with quote

axl wrote:
here's my guide. if you want a bridge connection in openrc you have to edit /etc/conf.d/net|networking and be sure to have

config_br0
routes_br0 if applies
and
bridge_br0="eth0 tap0" or whatever.

ln -s /etc/init.d/net.lo /etc/init.d/net.br0

and here are my credentials. I can make a bridge connection on openrc. :)
Your guide is a bit lacking. OP posted instructions that can be followed with a minimum of domain knowledge. There is no file /etc/conf.d/net|networking. You don't say what literal values or even types of values to assign to config_br0 or routes_br0. You don't say how to know whether routes_br0 applies. You don't explain why bridge_br0 has the values shown, or how the user should decide between following your example literally or customizing it. You assume all the kernel support will be available, but users new to this may not have enabled the right options. In contrast, OP outlined specific kernel features to check. (I think he suggested enabling some features that aren't actually needed, but the point is that he doesn't expect readers to guess at how to get a working kernel. It's possible that his suggestions are minimal if you choose to use the wrapper tools. I think some of his suggestions are not required if you use the low level user tools and have simple needs for the bridge.)
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1146
Location: Romania

PostPosted: Fri Feb 01, 2019 2:45 pm    Post subject: Reply with quote

Hu wrote:
axl wrote:
here's my guide. if you want a bridge connection in openrc you have to edit /etc/conf.d/net|networking and be sure to have

config_br0
routes_br0 if applies
and
bridge_br0="eth0 tap0" or whatever.

ln -s /etc/init.d/net.lo /etc/init.d/net.br0

and here are my credentials. I can make a bridge connection on openrc. :)
Your guide is a bit lacking. OP posted instructions that can be followed with a minimum of domain knowledge. There is no file /etc/conf.d/net|networking. You don't say what literal values or even types of values to assign to config_br0 or routes_br0. You don't say how to know whether routes_br0 applies. You don't explain why bridge_br0 has the values shown, or how the user should decide between following your example literally or customizing it. You assume all the kernel support will be available, but users new to this may not have enabled the right options. In contrast, OP outlined specific kernel features to check. (I think he suggested enabling some features that aren't actually needed, but the point is that he doesn't expect readers to guess at how to get a working kernel. It's possible that his suggestions are minimal if you choose to use the wrapper tools. I think some of his suggestions are not required if you use the low level user tools and have simple needs for the bridge.)



Might have gone a bit overboard on this one. But, long story short. It reached my limit when kreyren posted a bugreport on bugzilla to complain he was banned from wiki. while complaining on facebook. And all the while I thought this poor soul / innocent user is him. Because thinking u discovered gold "virt-network" is just the type of thing I seen that dude advertise. no matter. lets leave that aside.

lets get back to this guide. setting up a bridge is a must if you want your virtual machines to be seen from the internet. it's important to understand. virt-network will allow your VM to see the internet, but not the other way around.

HU is a bit harsh imho asking me to explain routes, but the short story is that if you want your vm to be accessible from the internet, you will need a bridge on the host machine. that is because a bridge is like a poor's man switch inside a computer. an ethernet connection is a connection that has one end and a network. a bridge is line a network with never ending ... endings. you can always add one more.

Thing is, I KNOW i'm not good at writing guides. In fact I suck at it. I cannot make justice to the bridge interface. I know how to use it, but I'm not the sort of guy that knows how to sell it to others. Still, you should use a bridge instead of virt-network.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum