{"id":210668,"date":"2014-01-29T11:20:04","date_gmt":"2014-01-29T07:20:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=210668"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=210668","title":{"rendered":"<span class=\"post_title\">\u0414\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u2014 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4cd\/a96\/7f3\/4cda967f366b86e2db579b9002db6545.jpg\"\/><br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u044f \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 (multiseat) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 KVM, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 libvirt. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442 \u043a\u0430\u043a \u0432 \u043e\u0444\u0438\u0441\u0435, \u0442\u0430\u043a \u0438 \u0434\u043e\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. \u041f\u0440\u0438\u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c Windows, Linux, Mac OS X, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u0432\u043a\u0443\u0441\u0443.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0416\u0435\u043b\u0430\u043d\u0438\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u0445\u043e\u0442\u044f \u0431\u044b \u0434\u0432\u0443x \u043b\u044e\u0434\u0435\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0434\u0430\u0432\u043d\u044b\u043c-\u0434\u0430\u0432\u043d\u043e. \u0418\u0434\u0435\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e \u0438\u043b\u0438 \u043e\u0444\u0438\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442\u0430 \u0440\u0430\u043d\u044c\u0448\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u044b\u0442\u0435\u043a\u0430\u044e\u0449\u0438\u043c\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u043c\u0438. \u0422\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u043e\u043c\u0443 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 windows, \u0430 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0432 Linux \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u0442\u0435\u0440\u043f\u0435\u0442\u044c, \u0435\u0441\u043b\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0443 \u041e\u0421. \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u0431\u044b\u043b\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b \u0441\u0442\u0430\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0440\u043e\u0441\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0443\u0436\u0435 \u043d\u0430\u0441 \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u0440\u0430\u0434\u0443\u0435\u0442, \u043d\u043e \u0437\u0430\u0442\u043e \u0440\u0430\u0434\u0443\u0435\u0442 \u0440\u043e\u0441\u0442 \u044f\u0434\u0435\u0440. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043c\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432. \u0418 \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u044f \u044d\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u0442\u0438. \u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0441 \u043e\u0434\u043d\u0438\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043a\u043e\u0440\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435 \u0438 \u0443\u0436\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.  <\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Gentoo<\/h4>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\"> \u041a\u0430\u0447\u0430\u0435\u043c <a href=\"http:\/\/mirror.yandex.ru\/gentoo-distfiles\/releases\/amd64\/current-stage3\/stage3-amd64-nomultilib-20140123.tar.bz2\">\u0442\u0435\u043a\u0443\u0449\u0438\u0439 livecd<\/a> \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f.<br \/>   \u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0441\u0435\u0442\u044c. \u041a\u0430\u043a \u0437\u043e\u0432\u0443\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441?  <\/p>\n<pre><code class=\"bash\">ifconfig   eno1: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500 <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u043b\u044e\u0431\u0438\u0442 \u043e\u043a\u043e\u0448\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0442\u0430\u043a  <\/p>\n<pre><code class=\"bash\">net-setup eno1 <\/code><\/pre>\n<p>  \u042f \u043b\u0438\u0447\u043d\u043e \u043f\u0440\u0438\u0432\u044b\u043a \u043f\u043e \u0441\u0442\u0430\u0440\u0438\u043d\u043a\u0435. \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0432\u043e\u0439 ip  <\/p>\n<pre><code class=\"bash\">ifconfig eno1 192.168.1.2\/24 <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e  <\/p>\n<pre><code class=\"bash\">route add default gw 192.168.1.1 <\/code><\/pre>\n<p>  \u0423\u043a\u0430\u0436\u0435\u043c \u043d\u0430\u0448\u0438 DNS  <\/p>\n<pre><code class=\"bash\">echo &quot;nameserver 8.8.8.8&quot; &gt;&gt; \/etc\/resolv.conf <\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f root  <\/p>\n<pre><code class=\"bash\">passwd root <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c ssh, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e  <\/p>\n<pre><code class=\"bash\">\/etc\/init.d\/sshd start <\/code><\/pre>\n<p>  C \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e ssh  <\/p>\n<pre><code class=\"bash\">ssh root@192.168.1.186 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0412\u0430\u0441 \u043e\u0434\u0438\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u0434\u0438\u0441\u043a \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \/dev\/sda  <\/p>\n<pre><code class=\"bash\">parted -a opt  \/dev\/sda (parted) mklabel msdos <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. 150M \u0441 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0437\u0430\u043f\u0430\u0441\u043e\u043c. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0438\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0432 GPT \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c EFI.  <\/p>\n<pre><code class=\"bash\">(parted) mkpart primary ext2 1 150M (parted) name 1 grub (parted) set 1 boot on <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u0434 lvm  <\/p>\n<pre><code class=\"bash\">(parted) mkpart primary 150M -1s (parted) #Is this still acceptable to you? Yes\/No? yes  (parted) set 2 lvm on                                                      (parted) quit <\/code><\/pre>\n<p>  LVM \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043d\u0438\u043c\u043a\u0438 \u0434\u0438\u0441\u043a\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d, \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439. \u0422\u0430\u043a \u0436\u0435 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445.<br \/>  \u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043a\u0430 \u0434\u043b\u044f LVM. \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043d\u0430 \u0412\u0430\u0448 \u0432\u043a\u0443\u0441  <\/p>\n<pre><code class=\"bash\">pvcreate \/dev\/sda3 vgcreate vg \/dev\/sda3  lvcreate -L 1G -n root vg lvcreate -L 1G -n tmp vg lvcreate -L 5G -n var vg lvcreate -L 10G -n usr vg <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d LVM, \u0442\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c  <\/p>\n<pre><code class=\"bash\">vgchange -ay <\/code><\/pre>\n<p>  \u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b  <\/p>\n<pre><code class=\"bash\">mkfs.ext2 \/dev\/sda2 mkfs.ext2 \/dev\/vg\/tmp for p in root var usr ; do mkfs.ext4 \/dev\/vg\/$p ; done <\/code><\/pre>\n<p>  \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0431\u0443\u0434\u0443\u0449\u0438\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b  <\/p>\n<pre><code class=\"bash\">mount \/dev\/vg\/root \/mnt\/gentoo <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  <\/p>\n<pre><code class=\"bash\">cd \/mnt\/gentoo mkdir boot usr var tmp sys proc dev chmod 1777 tmp <\/code><\/pre>\n<p>  \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b  <\/p>\n<pre><code class=\"bash\">mount \/dev\/vg\/usr \/mnt\/gentoo\/usr mount \/dev\/vg\/tmp \/mnt\/gentoo\/tmp mount \/dev\/vg\/var \/mnt\/gentoo\/var mount \/dev\/sda2 \/mnt\/gentoo\/boot <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a chroot<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">cd \/mnt\/gentoo <\/code><\/pre>\n<p>  \u041a\u0430\u0447\u0430\u0435\u043c \u0441\u0432\u0435\u0436\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 (\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0434\u0430\u0442\u0443 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430)  <\/p>\n<pre><code class=\"bash\">wget http:\/\/mirror.yandex.ru\/gentoo-distfiles\/releases\/amd64\/current-stage3\/stage3-amd64-nomultilib-20140123.tar.bz2 <\/code><\/pre>\n<p>  \u0417\u0430\u0431\u0435\u0440\u0435\u043c portage. Portage \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b  <\/p>\n<pre><code class=\"bash\">wget http:\/\/mirror.yandex.ru\/gentoo-distfiles\/snapshots\/portage-latest.tar.bz2  <\/code><\/pre>\n<p>  \u0420\u0430\u0441\u043f\u0430\u043a\u0443\u0435\u043c \u0432\u0441\u0435 \u044d\u0442\u043e  <\/p>\n<pre><code class=\"bash\">tar xvjpf stage3-amd64-nomultilib-20140123.tar.bz2 tar xvjf portage-latest.tar.bz2 -C \/mnt\/gentoo\/usr  <\/code><\/pre>\n<p>  \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c resolv.conf \u0432 \u0431\u0443\u0434\u0443\u0449\u0438\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b  <\/p>\n<pre><code class=\"bash\">cp \/etc\/resolv.conf \/mnt\/gentoo\/etc\/resolv.conf  <\/code><\/pre>\n<p>  \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b  <\/p>\n<pre><code class=\"bash\">mount --rbind \/dev \/mnt\/gentoo\/dev mount -t proc none \/mnt\/gentoo\/proc mount --rbind \/sys \/mnt\/gentoo\/sys <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0430 (\u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b)  <\/p>\n<pre><code class=\"bash\">chroot \/mnt\/gentoo env-update source \/etc\/profile <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0431\u0436\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">nano \/etc\/portage\/make.conf <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c, \u0442\u043e \u043c\u0435\u043d\u044f\u0435\u043c CFLAGS \u2014 \u043e\u043f\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041e\u043f\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435, \u043a\u0440\u043e\u043c\u0435 -march=native (\u0432\u043c\u0435\u0441\u0442\u043e -march=i686), \u0447\u0442\u043e \u043e\u0431\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0415\u0441\u043b\u0438 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0436\u0435\u043b\u0435\u0437\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0442.\u043a. \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u0436\u0435\u043b\u0435\u0437\u0435 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e) \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043c\u0438\u0440.<br \/>  USE \u2014 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b.<br \/>   \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043d\u043a\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b, \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 USE \u00abspice\u00bb, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c USB \u043f\u043e\u0440\u0442\u044b \u0442\u043e\u043d\u043a\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u00abusbredir\u00bb  <\/p>\n<pre><code class=\"bash\">CFLAGS=&quot;-O2 -pipe -march=native&quot; # \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 MAKEOPTS=&quot;-j3&quot; USE=&quot;bindist mmx sse sse2 -ipv6 unicode device-mapper -X slang udev pulseaudio&quot; GENTOO_MIRRORS=http:\/\/mirror.yandex.ru\/gentoo-distfiles\/ SYNC=&quot;rsync:\/\/rsync.ru.gentoo.org\/gentoo-portage&quot; LINGUAS=&quot;ru en&quot;  <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e-\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f  <\/p>\n<pre><code class=\"bash\">cat &gt; \/etc\/fstab &lt;&lt; &quot;EOF&quot; \/dev\/sda1 \/boot ext2 noauto,noatime 1 2 \/dev\/vg\/root \/ ext4 noatime 0 1  \/dev\/vg\/tmp \/tmp ext2 noatime 0 0 \/dev\/vg\/usr \/usr ext4 noatime 0 0  \/dev\/vg\/var \/var ext4 noatime 0 0 EOF <\/code><\/pre>\n<p>  \u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0434\u0435\u0440\u0435\u0432\u043e portage  <\/p>\n<pre><code class=\"bash\">emerge --sync <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c, \u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f  <\/p>\n<pre><code class=\"bash\">eselect profile list eselect profile set &lt;\u0446\u0438\u0444\u0440\u0430&gt; <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0438  <\/p>\n<pre><code class=\"bash\">cat &gt; \/etc\/conf.d\/net &lt;&lt; &quot;EOF&quot; config_eno1=&quot;null&quot; config_br0=&quot;192.168.1.2\/24&quot; routes_br0=&quot;default via 192.168.1.1&quot; bridge_br0=&quot;eno1&quot; rc_net_br0_need=&quot;net.eno1&quot; ethtool_offload_eno1=&quot;gro off&quot; dns_domain=&quot;mydomain.ru&quot; dns_servers=&quot;8.8.8.8 8.8.4.4&quot; EOF ln \u2013s \/etc\/init.d\/net.lo \/etc\/init.d\/net.eno1 ln \u2013s \/etc\/init.d\/net.lo \/etc\/init.d\/net.br0 <\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f root  <\/p>\n<pre><code class=\"bash\">passwd root <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u044f (testuser), \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u044b users,wheel,audio  <\/p>\n<pre><code class=\"bash\">useradd -m -G users,wheel,audio -s \/bin\/bash testuser passwd testuser <\/code><\/pre>\n<p>  \u041a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0435 \u0432\u044b\u0448\u043b\u0430 \u0435\u0449\u0435 qemu-1.7.1, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0432\u0438\u043c \u0434\u0432\u0435 \u0437\u0432\u0435\u0437\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u0441\u043a\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e  <\/p>\n<pre><code class=\"bash\">echo &quot;app-emulation\/qemu ** ~amd64&quot; &gt;&gt;\/etc\/portage\/package.accept_keywords <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b pulseaudio \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043a\u0430\u043a \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 libvirt \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u00abnographics_allow_host_audio=1\u00bb \u0432 libvirtd.conf. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443 \u0412\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f?  <\/p>\n<pre><code class=\"bash\">echo &quot;media-sound\/pulseaudio -system-wide&quot; &gt;&gt;\/etc\/portage\/make.profile\/package.use.mask echo &quot;media-sound\/pulseaudio -dbus system-wide&quot; &gt;&gt;\/etc\/portage\/package.use  <\/code><\/pre>\n<p>  \u0423\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432  <\/p>\n<pre><code class=\"bash\">for p in sys-kernel\/gentoo-sources app-emulation\/libvirt sys-apps\/dtc sys-firmware\/seabios; do echo $p &quot; ~amd64&quot; &gt;&gt;\/etc\/portage package.accept_keywords ; done  <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041a\u043b\u044e\u0447 -av \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043e\u043f\u0446\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e \u0432 USE \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \/etc\/portage\/make.conf. misc-app\/mc \u2014 \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u0443-\u0442\u043e \u043e\u043d \u0443\u0434\u043e\u0431\u0435\u043d  <\/p>\n<pre><code class=\"bash\">emerge -av gentoo-sources vixie-cron lvm2 genkernel syslog-ng iproute2 libvirt ethtool bridge-utils grub terminus-font radeon-ucode misc-app\/mc <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443  <\/p>\n<pre><code class=\"bash\">for s in sshd vixie-cron syslog-ng net.br0 libvirtd ; do rc-update add $s default; done <\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0435\u0440\u0435\u043c \u044f\u0434\u0440\u043e Linux, \u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445<br \/>  &gt; Device Drivers &gt; IOMMU Hardware Support &gt; IOMMU Hardware Support <br \/>  \u041e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 <br \/>  &gt; Device Drivers &gt; VFIO Non-Privileged userspace driver framework <br \/>  \u041e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 <br \/>  &gt;Device Drivers &gt; Networking support &gt; Universal TUN\/TAP device driver support<br \/>  \u0421\u0442\u0430\u0432\u0438\u043c \u0437\u0432\u0451\u0437\u0434\u043e\u0447\u043a\u0443.<br \/>  \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u0432\u043a\u0443\u0441\u0443 \ud83d\ude09  <\/p>\n<pre><code class=\"bash\">genkernel \u2013lvm \u2013menuconfig all <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u043b\u0430\u0433 \u00abdolvm\u00bb, \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 LVM  <\/p>\n<pre><code class=\"bash\">nano \/etc\/default\/grub # \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e GRUB_CMDLINE_LINUX=&quot;dolvm&quot; <\/code><\/pre>\n<p>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a Grub  <\/p>\n<pre><code class=\"bash\">grub2-install \/dev\/sda grub2-mkconfig -o \/boot\/grub\/grub.cfg <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e  <\/p>\n<pre><code class=\"bash\">cat \/usr\/share\/i18n\/SUPPORTED | grep -E 'ru_RU|en_US' &gt;&gt; \/etc\/locale.gen && locale-gen <\/code><\/pre>\n<p>  \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043e\u043d\u044b \u0432 \/etc\/localtime  <\/p>\n<pre><code class=\"bash\">cp \/usr\/share\/zoneinfo\/Europe\/Moscow \/etc\/localtime <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b   <\/p>\n<pre><code class=\"bash\">nano \/etc\/conf.d\/keymaps # \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b dumpkeys_charset=&quot;utf8&quot; keymap=&quot;-u ru&quot; <\/code><\/pre>\n<p>  \u0424\u043e\u043d\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c  <\/p>\n<pre><code class=\"bash\">nano \/etc\/conf.d\/consolefont # \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 consolefont=&quot;ter-k14n&quot; <\/code><\/pre>\n<p>  \u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439  <\/p>\n<pre><code class=\"bash\">cat &gt; \/etc\/env.d\/02locale &lt;&lt; &quot;EOF&quot; LANG=&quot;ru_RU.UTF-8&quot; LC_ALL=&quot;ru_RU.UTF-8&quot; LANG=&quot;ru_RU.UTF-8&quot; LC_MESSAGES=&quot;POSIX&quot; LC_NUMERIC=&quot;POSIX&quot; LC_TIME=&quot;POSIX&quot; EOF env-update && source \/etc\/profile <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 USE \u0444\u043b\u0430\u0433\u0430\u043c\u0438   <\/p>\n<pre><code class=\"bash\">emerge -avuDN system world <\/code><\/pre>\n<p>  \u0417\u0430\u0434\u0430\u0435\u043c \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430  <\/p>\n<pre><code class=\"bash\">nano \/etc\/conf.d\/hostname hostname=&quot;testhost&quot; <\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043c \/etc\/hosts  <\/p>\n<pre><code class=\"bash\">nano \/etc\/hosts 127.0.0.1 localhost testhost testhost.mydomain.ru <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u0412\u0430\u043c \u043f\u043e\u0432\u0435\u0437\u043b\u043e \ud83d\ude09 \u0412\u0441\u0435-\u0442\u0430\u043a\u0438 \u0436\u0435\u043b\u0435\u0437\u043e \u0443 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043d\u043e\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u044f\u0434\u0440\u043e.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043b\u043e\u0445\u043e, \u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f google. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0432 \u0441\u0435\u0442\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h4>\n<p>  <\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 BIOS<\/h5>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432 BIOS VT-d \u0432\u043a\u043b\u044e\u0447\u0451\u043d, \u0434\u043b\u044f Z87 \u00abusb intel XHCI\u00bb \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 USB \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u043e\u0432.<\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0432\u0443\u043a\u0430<\/h5>\n<p>  usermod -G kvm,audio,pulse-access -d \/home\/qemu qemu <br \/>  usermod -G wheel,audio,pulse-access,users testuser<br \/>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c pulseaudio.  <\/p>\n<pre><code class=\"bash\">echo 'PULSEAUDIO_SHOULD_NOT_GO_SYSTEMWIDE=&quot;1&quot;' &gt;&gt; \/etc\/conf.d\/pulseaudio  rc-update add pulseaudio default  \/etc\/init.d\/pulseaudio start su - testuser  # C \u043f\u043e\u043c\u043e\u0449\u044c\u044e alsamixer \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u0443\u044e \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u041c\u041c \u0442\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u041c. alsamixer # \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043a root exit # \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \/etc\/init.d\/alsasound save  \/etc\/init.d\/alsasound start rc-update add alsasound default <\/code><\/pre>\n<p>  <\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 libvirt<\/h5>\n<p>  \u0412 \u0444\u0430\u0439\u043b \/etc\/libvirt\/qemu.conf \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a  <\/p>\n<pre><code class=\"bash\">user = &quot;qemu&quot; group = &quot;qemu&quot; # \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043b\u043e\u0445\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c # clear_emulator_capabilities = 0 <\/code><\/pre>\n<p>  \u0412 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 seabios \u0432 gentoo 1.7.3, \u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0441\u0432\u0435\u0436\u0438\u0439, \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c  <\/p>\n<pre><code class=\"bash\">cd \/etc\/libvirt  wget http:\/\/code.coreboot.org\/p\/seabios\/downloads\/get\/bios.bin-1.7.4.gz  gzip -d bios.bin-1.7.4.gz <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432  <\/p>\n<pre><code class=\"bash\">cat &gt; \/etc\/libvirt\/vfio-bind &lt;&lt; &quot;EOF&quot; #!\/bin\/sh for dev in &quot;$@&quot;; do    vendor=$(cat \/sys\/bus\/pci\/devices\/$dev\/vendor)    device=$(cat \/sys\/bus\/pci\/devices\/$dev\/device)   if [ -e \/sys\/bus\/pci\/devices\/$dev\/driver ]; then     echo $dev &gt; \/sys\/bus\/pci\/devices\/$dev\/driver\/unbind   fi                                                                                                            echo $vendor $device &gt; \/sys\/bus\/pci\/drivers\/vfio-pci\/new_id done EOF chmod +x \/etc\/libvirt\/vfio-bind <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c lspci \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0436\u0435\u0440\u0442\u0432\u0443 \u0434\u043b\u044f \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430  <\/p>\n<pre><code class=\"bash\">03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD\/ATI] Turks PRO [Radeon HD 6570\/7570] 03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD\/ATI] Turks\/Whistler HDMI Audio [Radeon HD 6000 Series 00:1a.0 USB controller: Intel Corporation 8 Series\/C220 Series Chipset Family USB EHCI #2 (rev 04) <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b  <\/p>\n<pre><code class=\"bash\">cat &gt; \/etc\/libvirt\/bind-vga-1 &lt;&lt; &quot;EOF&quot; #!\/bin\/sh                                                                                                     \/etc\/libvirt\/vfio-bind 0000:03:00.0 0000:03:00.1                                                                     # \u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0433\u0440\u0443\u043f\u043f\u0443 6. \u041d\u0430\u0439\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c \/sys\/kernel\/iommu_groups\/6\/devices chown qemu \/dev\/vfio\/6 EOF chmod +x \/etc\/libvirt\/bind-vga-1 # \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \/etc\/libvirt\/bind-vga-1 # \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 cat &gt; \/etc\/init.d\/bind-vga-1 &lt;&lt; &quot;EOF&quot; #!\/sbin\/runscript                                                                                             start() {   ebegin &quot;Starting vfio-bind&quot;   \/etc\/libvirt\/bind-vga-1   eend $? &quot;Failed to start vfio-bind&quot; } EOF # \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e, \u0442\u043e \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0435\u0433\u043e rc-update add bind-vga-1 default <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0440\u0430\u0437\u0434\u0435\u043b \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b  <\/p>\n<pre><code class=\"bash\">vcreate -L70G -nwks1 vg <\/code><\/pre>\n<p>   \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043c\u0430\u0448\u0438\u043d\u0430, \u0433\u0434\u0435 \u043b\u0435\u0436\u0430\u0442 \u043e\u0431\u0440\u0430\u0437\u044b \u0443\u0436\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a \u0441 \u0441\u043e\u0444\u0442\u043e\u043c, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0438 \u0443 \u0412\u0430\u0441 \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f. \u041a\u0430\u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430\u043f\u0438\u0448\u0443 \u043d\u0438\u0436\u0435.  <\/p>\n<pre><code class=\"bash\">ssh root@192.168.1.3 &quot;dd if=\/dev\/vg_archive\/windows7 bs=1M |gzip -&quot; |gunzip - | dd of=\/dev\/vg\/wks1 bs=1M <\/code><\/pre>\n<p>  <\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u0430<\/h5>\n<p>  \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0444\u0430\u0439\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438. <\/p>\n<pre><code class=\"xml\">&lt;domain type='kvm' xmlns:qemu='http:\/\/libvirt.org\/schemas\/domain\/qemu\/1.0'&gt;   &lt;name&gt;wks1&lt;\/name&gt;    &lt;uuid&gt;2811e544-bf4d-baf6-1135-ec5acd139999&lt;\/uuid&gt;   &lt;memory unit='KiB'&gt;4145152&lt;\/memory&gt;   &lt;currentMemory unit='KiB'&gt;4145152&lt;\/currentMemory&gt;   &lt;cpu mode='host-passthrough'\/&gt;   &lt;os&gt;     &lt;type arch='x86_64' machine='pc-q35-2.0'&gt;hvm&lt;\/type&gt;     &lt;loader&gt;\/etc\/libvirt\/bios.bin-1.7.4&lt;\/loader&gt;     &lt;boot dev='hd'\/&gt;     &lt;bootmenu enable='yes'\/&gt;   &lt;\/os&gt;   &lt;features&gt;     &lt;acpi\/&gt;     &lt;apic\/&gt;     &lt;pae\/&gt;   &lt;\/features&gt;   &lt;clock offset='localtime'\/&gt;   &lt;on_poweroff&gt;destroy&lt;\/on_poweroff&gt;   &lt;on_reboot&gt;restart&lt;\/on_reboot&gt;   &lt;on_crash&gt;restart&lt;\/on_crash&gt;   &lt;devices&gt;     &lt;emulator&gt;\/usr\/bin\/qemu-kvm&lt;\/emulator&gt;     &lt;disk type='block' device='disk'&gt;       &lt;driver name='qemu' type='raw' cache='none'\/&gt;       &lt;source dev='\/dev\/vg\/wks1'\/&gt;       &lt;!-- \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 windows \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 target          &lt;target dev='sda' bus='sata'\/&gt;       --&gt;       &lt;target dev='vda' bus='virtio'\/&gt;     &lt;\/disk&gt;     &lt;!-- \u0441\u0435\u043a\u0446\u0438\u044f \u0434\u043b\u044f CD \u043e\u0431\u0440\u0430\u0437\u043e\u0432                                                                                                 &lt;disk type='file' device='cdrom'&gt;       &lt;driver name='qemu' type='raw'\/&gt;       &lt;source file='\/usr\/win_7.iso'\/&gt;       &lt;target dev='hdc' bus='sata'\/&gt;       &lt;readonly\/&gt;       &lt;address type='drive' controller='0' bus='0' target='0' unit='0'\/&gt;     &lt;\/disk&gt;      --&gt;     &lt;controller type='pci' index='0' model='pcie-root'&gt;       &lt;alias name='pcie.0'\/&gt;     &lt;\/controller&gt;     &lt;controller type='pci' index='1' model='dmi-to-pci-bridge'&gt;       &lt;alias name='pci.1'\/&gt;     &lt;\/controller&gt;     &lt;controller type='pci' index='2' model='pci-bridge'&gt;       &lt;alias name='pci.2'\/&gt;     &lt;\/controller&gt;     &lt;interface type='bridge'&gt;       &lt;mac address='52:54:00:12:50:01'\/&gt;       &lt;source bridge='br0'\/&gt;       &lt;!-- \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 windows \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c --&gt;       &lt;model type='virtio'\/&gt;       &lt;address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'\/&gt;     &lt;\/interface&gt;     &lt;!-- \u0441\u0435\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u043e\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 windows, \u0447\u0435\u0440\u0435\u0437 vnc     &lt;controller type='usb'\/&gt;     &lt;input type='tablet' bus='usb'\/&gt;     &lt;input type='mouse' bus='ps2'\/&gt;     &lt;graphics type='vnc' port='5900' autoport='no' listen='192.168.1.2' passwd='mypassword'\/&gt;     --&gt;     &lt;!-- BEGIN \u0415\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e vn\u0441 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a --&gt;     &lt;hostdev mode='subsystem' type='pci' managed='yes'&gt;        &lt;!-- \u0412\u043c\u0435\u0441\u0442\u043e source1 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c source. \u0421 \u0445\u0430\u0431\u0440\u0430-\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u043e\u0439 \u043d\u0435 \u043c\u043e\u0433\u0443 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f --&gt;        &lt;source1&gt;         &lt;address domain='0x0000' bus='0x00' slot='0x1a' function='0x0'\/&gt;                                            &lt;\/source1&gt;       &lt;address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'\/&gt;                                 &lt;\/hostdev&gt;     &lt;!-- END E\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e vn\u0441 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a --&gt;     &lt;sound model='ich9'\/&gt;     &lt;memballoon model='virtio'&gt;       &lt;address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'\/&gt;     &lt;\/memballoon&gt;   &lt;\/devices&gt;   &lt;seclabel type='none'\/&gt;   &lt;qemu:commandline&gt;     &lt;qemu:env name=&quot;HOME&quot; value=&quot;\/home\/qemu&quot;\/&gt;     &lt;qemu:env name=&quot;QEMU_AUDIO_DRV&quot; value=&quot;pa&quot;\/&gt;     &lt;!-- BEGIN  \u0415\u0441\u043b\u0438 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e vnc, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a --&gt;     &lt;qemu:arg value='-vga'\/&gt;     &lt;qemu:arg value='none'\/&gt;     &lt;qemu:arg value='-device'\/&gt;     &lt;qemu:arg value='vfio-pci,host=03:00.0,bus=pcie.0,addr=02.0,x-vga=on'\/&gt;     &lt;!-- END  \u0415\u0441\u043b\u0438 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u043e vnc, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a --&gt;   &lt;\/qemu:commandline&gt; &lt;\/domain&gt; <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u0444\u0430\u0439\u043b \/etc\/libvirt\/qemu\/wks1.xml<br \/>  \u041f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438  <\/p>\n<pre><code class=\"bash\">\/etc\/init.d\/libvirtd restart <\/code><\/pre>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u043e\u043c\u0435\u043d  <\/p>\n<pre><code class=\"bash\">virsh start wks1 # \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c # virsh autostart wks1 <\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h4>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 iso \u043e\u0431\u0440\u0430\u0437 \u0438 \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u043a\u0446\u0438\u044e cdrom. \u0422\u0430\u043a \u0436\u0435 \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 virtio \u0438 \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 03:00.0 \u2014 \u0432\u0438\u0434\u0435\u043e \u0438 00:1a.0 usb \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043f\u043e vnc. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 virtio \u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u0443\u044e OC. <a href=\"http:\/\/alt.fedoraproject.org\/pub\/alt\/virtio-win\/latest\/images\/virtio-win-0.1-74.iso\">\u0414\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043f\u043e\u0434 windows.<\/a><br \/>  \u0411\u0435\u0437 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.  <\/p>\n<h4>\u0418\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0437\u0430\u0441\u0430\u0434\u044b<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u042f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f windows \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 virtio. <\/li>\n<li>\u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440-virtio \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u0434\u0438\u0441\u043a \u0441 \u0443\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c virtio<br \/> \n<pre><code class=\"bash\">lvcreate -nzero -L1M <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;disk type='block' device='disk'&gt;       &lt;driver name='qemu' type='raw' cache='writethrough'\/&gt;       &lt;source dev='\/dev\/vg\/wks1'\/&gt;       &lt;target dev='sda' bus='sata'\/&gt;     &lt;\/disk&gt; &lt;disk type='block' device='disk'&gt;       &lt;driver name='qemu' type='raw' cache='writethrough'\/&gt;       &lt;source dev='\/dev\/vg\/zero'\/&gt;       &lt;target dev='vda' bus='virtio'\/&gt;     &lt;\/disk&gt; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0412 windows \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u044d\u043d\u0435\u0440\u0433\u043e\u0441\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u044f -&gt; \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 \u0441\u043f\u044f\u0449\u0438\u0439 \u0440\u0435\u0436\u0438\u043c -&gt; \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0432 \u0441\u043f\u044f\u0449\u0438\u0439 \u0440\u0435\u0436\u0438\u043c -&gt; <br \/>  \u00ab\u043d\u0438\u043a\u043e\u0433\u0434\u0430\u00bb <\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u043d\u043e \u0432 crontab \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.  <\/p>\n<pre><code class=\"bash\">cat &gt; \/etc\/libvirtd\/shutdown_if_not_start.sh &lt;&lt; &quot;EOF&quot; #!\/bin\/sh                                                                                                     LIST_VM=`virsh list | awk '{if($3==&quot;running&quot;)print $2}'|wc -l`                                                if [ ${LIST_VM} -ne  0 ] ; then                                                                                 exit 0                                                                                                      fi                                                                                                            awk '{if(int($1)&gt;300){exit 0}else{ exit 1}}' \/proc\/uptime                                                     if [ $? -ne 0 ]; then                                                                                           exit 0                                                                                                      fi                                                                                                            \/sbin\/shutdown -h now EOF chmod +x \/etc\/libvirtd\/shutdown_if_not_start.sh <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412\u0440\u043e\u0434\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043e\u043f\u0438\u0441\u0430\u043b. <a href=\"https:\/\/bbs.archlinux.org\/viewtopic.php?id=162768\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0443\u0442\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0443 \u0412\u0430\u0441 \u0432\u0430\u043b\u0438\u0442\u0441\u044f windows \u0432 BSOD. \u0415\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043d\u0438\u043c\u043a\u0438, \u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c QEMU Guest Agent \u0438 \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<br \/>  \u0423 \u043d\u0430\u0441 \u043d\u0430 \u0431\u043e\u0435\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u0430\u0445 \u0441\u0442\u043e\u0438\u0442 \u0430\u043f\u0430\u0447, \u0447\u0435\u0440\u0435\u0437 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 VM \u0441 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043a\u0438. \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u043e\u043a \u043f\u043e USB \u043a\u043b\u044e\u0447\u0443.<br \/>  \u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c.<br \/>  \u0414\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0442\u0430\u0440\u0438\u0442\u044c \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0430\u0448\u0438\u043d\u044b, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u043e\u0431\u0440\u0430\u0437\u044b \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 OC. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0445\u043e\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043c\u0438\u0434\u0436\u0430, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441\u0430, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0445\u043e\u0441\u0442\u043e\u0432, \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ssh \u043a\u043b\u044e\u0447\u0438.<br \/>  \u041f\u0440\u043e spice \u0438 ARM, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043d\u0430\u043f\u0438\u0448\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/210668\/\"> http:\/\/habrahabr.ru\/post\/210668\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4cd\/a96\/7f3\/4cda967f366b86e2db579b9002db6545.jpg\"\/><br \/>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u044f \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 (multiseat) \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 KVM, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 libvirt. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043c\u0435\u0441\u0442 \u043a\u0430\u043a \u0432 \u043e\u0444\u0438\u0441\u0435, \u0442\u0430\u043a \u0438 \u0434\u043e\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. \u041f\u0440\u0438\u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c Windows, Linux, Mac OS X, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e \u0432\u043a\u0443\u0441\u0443.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-210668","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/210668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=210668"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/210668\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=210668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=210668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=210668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}