Gentoo Archives: gentoo-user

From: Michael Mair-Keimberger <m.mairkeimberger@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] kvm/libvirt and kernel configuration
Date: Tue, 23 Apr 2013 07:43:46
Message-Id: 3040541.1JoMIEfg3I@getafix
In Reply to: Re: [gentoo-user] kvm/libvirt and kernel configuration by Michael Mol
1 On Monday 22 April 2013 16:19:11 Michael Mol wrote:
2 > On 04/22/2013 03:44 PM, Michael Mair-Keimberger wrote:
3 > > On Monday 22 April 2013 15:17:20 Michael Mol wrote:
4 > >> On 04/22/2013 03:04 PM, Michael Mair-Keimberger wrote:
5 > >> > Regarding devices which devices qemu-kvm supports, just take a look at
6 > >> >
7 > >> > following commands:
8 > >> >
9 > >> >
10 > >> >
11 > >> > Available net devices:
12 > >> >
13 > >> >
14 > >> >
15 > >> > qemu-system-x86_64 -net nic,model=?
16 > >> >
17 > >> >
18 > >> >
19 > >> > Available cpu's:
20 > >> >
21 > >> >
22 > >> >
23 > >> > qemu-system-x86_64 -cpu ?
24 > >> >
25 > >> >
26 > >> >
27 > >> > Available machines (if needed)
28 > >> >
29 > >> >
30 > >> >
31 > >> > qemu-system-x86_64 -machine ?
32 > >> >
33 > >> >
34 > >> >
35 > >> > General list of available devices:
36 > >> >
37 > >> >
38 > >> >
39 > >> > qemu-system-x86_64 -device ?
40 > >> >
41 > >> >
42 > >> >
43 > >> >
44 > >> >
45 > >> >
46 > >> >
47 > >> > Depending on your arch it might differ..
48 > >> >
49 > >> >
50 > >> >
51 > >> >
52 > >> >
53 > >> >
54 > >> >
55 > >> > Regarding virito devices:
56 > >> >
57 > >> >
58 > >> >
59 > >> > I highly recommend using those drivers. For my gentoo guests i always
60 > >> >
61 > >> > use virtio drivers for network devices (with vhost=on) and harddisks.
62 > >> >
63 > >> > (on windows guests only virito-net drivers) The performance gain is
64 > >> >
65 > >> > incredible. However, especially for the virtio harddisk driver, make
66 > >> >
67 > >> > sure you change fstab entries, because harddisk names change from sda
68 > >> > to
69 > >> >
70 > >> > vda (or just use them from the beginning.
71 > >> >
72 > >> >
73 > >> >
74 > >> >
75 > >> >
76 > >> >
77 > >> >
78 > >> > If you going to try out desktop vm's too i also recommend qxl with
79 > >> >
80 > >> > spice. It's really fast and it also supports copy/paste (however you
81 > >> >
82 > >> > need an service for copy/paste on linux "app-emulation/spice-vdagent")
83 > >> >
84 > >> > and window resizing. Those features also work on windows.
85 > >>
86 > >> Good to know. Does it work over the network, or does it presume local
87 > >>
88 > >> connectivity? My primary use case is connecting to the box over
89 > >>
90 > >> wireless. My secondary use case is connecting over a WAN link. Local
91 > >>
92 > >> connectivity is out of the question for this VM server.
93 > >
94 > > It works over the network. I have all my vms on a server and i only
95 > > access those vm's over network. As client i suggest net-misc/spice-gtk.
96 > >
97 > >> > Regarding libvirt my experience is actually very low since i setup my
98 > >> >
99 > >> > vms with an custom init script. You can take a look on it here:
100 > >> >
101 > >> > https://github.com/mm1ke/qemu-init/tree/devel
102 > >>
103 > >> I'm actually not having any real difficulty setting up the VMs. As I
104 > >>
105 > >> said, the matter is largely academic. It's really not difficult to set
106 > >>
107 > >> up a guest primarily with virtio drivers, of course.
108 > >>
109 > >>
110 > >>
111 > >> The "problem" I'm trying to solve is the apparent lack of documentation
112 > >>
113 > >> mapping host kvm/qemu capabilities with guest kernel configurations
114 > >>
115 > >> > I can also provide a basic kernel .config for the latest stable kernel
116 > >> >
117 > >> > on x64 and x86 if you are interrested.
118 > >>
119 > >> Like Stefan, I'm also curious. I would probably go through and tweak a
120 > >>
121 > >> number of network-related features (add a netfilter feature here, remove
122 > >>
123 > >> a network stack component there), but it'd be interesting to look at.
124 > >
125 > > Below are both configs (kernel 3.7.10)(hope bpaste is ok).
126 > >
127 > > If you going to use them and don't use virtio-net make sure you enable
128 > > appropriate net drivers (e1000,rtl8129,..), because i've disabled all of
129 > > them.
130 > >
131 > >
132 > >
133 > > http://bpaste.net/show/93300/
134 > >
135 > > http://bpaste.net/show/93301/
136 >
137 > Attachments are ideal; the mailing list supports them, and it's more
138 > beneficial for the ml archives. (Even if gentoo infra's ml archives have
139 > been down for a year, gmane et al are also archiving.)
140
141 Well, in this case here are the config's again as an attachment. :)

Attachments

File name MIME type
x64-3.7.10.config text/x-mpsub
x86-3.7.10.config text/x-mpsub