{"id":408687,"date":"2024-06-29T20:19:21","date_gmt":"2024-06-29T20:19:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=408687"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=408687","title":{"rendered":"<span>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Gentoo<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/4b\/qt\/zv\/4bqtzvevydrpiuqqrqw5nrzebeu.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/4b\/qt\/zv\/4bqtzvevydrpiuqqrqw5nrzebeu.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u00ab\u0421\u043a\u0430\u0436\u0438 \u043c\u043d\u0435, \u0420\u043e\u0436\u0434\u0451\u043d\u043d\u044b\u0439 \u0416\u0435\u043d\u0449\u0438\u043d\u043e\u0439,<br \/>   \u2014 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u041a\u0440\u0438\u0448\u043d\u0430,<br \/>  \u041a\u0443\u0434\u0430 \u0434\u0432\u0438\u0436\u0443\u0442\u0441\u044f \u044d\u0442\u0438 \u043c\u0438\u0440\u044b,<br \/>  \u0417\u0430\u0447\u0435\u043c \u0437\u043b\u043e\u0439 \u041f\u0430\u0440\u0432\u0430\u043d\u0430 \u043f\u043e \u043d\u043e\u0447\u0430\u043c \u043e\u0445\u043e\u0442\u0438\u0442\u0441\u044f<br \/>   \u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e,<br \/>  \u0418 \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043b\u0430\u0441\u0442\u043e\u0447\u043a\u0438 \u0411\u0448\u0430\u043a\u0442\u0438 \u0434\u0432\u0435 \u043d\u043e\u0433\u0438,<br \/>   \u0430 \u0443 \u041c\u0435\u043d\u044f \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435?\u00bb<br \/>   \u2014 \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e, \u2014 \u0441\u043a\u0430\u0437\u0430\u043b \u0410\u0440\u0434\u0436\u0443\u043d\u0430, \u2014  \u0431\u0435\u0440\u0451\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u041f\u043e\u0439\u043d\u0442\u0438\u043d\u0433\u0430\u2026<br \/>  \u0411\u0425\u0410\u0413\u0410\u0412\u0410\u0414-\u0413\u0418\u0422\u0410 (\u043c\u043b. \u0442\u0438\u0431\u0435\u0442\u0441\u043a\u0430\u044f)<br \/>  \u0417\u0430\u043f\u0435\u0432 30 \u0442\u043e\u043c\u0430<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h3>\n<p>  \u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0434\u0430\u0432\u043d\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0448\u0438\u043d (\u0434\u0430\u043b\u0435\u0435 \u0412\u041c) \u0432 Gentoo Linux \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b libvirt, \u0432\u0441\u0451 \u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e, \u043d\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0441\u0432\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u043b\u0430 \u0432\u0435\u0440\u0441\u0438\u044f Qemu \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0447\u0438\u043f\u0441\u0435\u0442\u0430 Q35, libvirt \u0436\u0435 \u0435\u0449\u0451 \u0434\u043e\u043b\u0433\u043e\u0435 (\u043a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c) \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0438\u043c \u0441\u0442\u0430\u0440\u044b\u043c \u0434\u043e\u0431\u0440\u044b\u043c i440FX. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u043c\u043e\u0434\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u0432 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0412\u041c. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0440\u0435\u0434\u044b \u043f\u0440\u043e\u0431 \u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u0440\u0435\u0434\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c Qemu, \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u044f (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434), \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u0430\u044f \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0412\u041c, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435\u0434\u043e\u043b\u0433\u043e\u0436\u0438\u0432\u0443\u0449\u0438\u0445, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (\u0434\u0430\u043b\u0435\u0435 \u041e\u0421) \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f (\u0434\u0430\u043b\u0435\u0435 \u041f\u041e) \u043d\u0430 \u0433\u043e\u043b\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0421 \u2014 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e CentOS, Astra Linux, Windows Server. \u0412\u044b\u0445\u043e\u0434\u0438\u0442, \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u041e\u0421 \u0438\u043b\u0438 \u041f\u041e \u2014 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043f\u0443\u0441\u0442\u044b\u0435 \u0412\u041c \u0434\u043b\u044f \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0439 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u041f\u041e.<\/p>\n<h3>\u0414\u0430\u043d\u043e<\/h3>\n<p>  <\/p>\n<div class=\"scrollable-table\">\n<table>\n<tr>\n<td>\u041e\u0421 \u0445\u043e\u0441\u0442\u0430<\/td>\n<td>Gentoo Linux<br \/>  \u041f\u0440\u043e\u0444\u0438\u043b\u044c default\/linux\/amd64\/17.1\/no-multilib  <\/td>\n<\/tr>\n<tr>\n<td>\u042f\u0434\u0440\u043e<\/td>\n<td>sys-kernel\/gentoo-sources-5.13.0-r1<br \/>  USE=\u00abexperimental symlink\u00bb<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0441\u043d\u044f\u0442\u044b\u0435 USE-\u0444\u043b\u0430\u0433\u0438 \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b.<\/p>\n<p>  <b>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/b> \u0432\u0435\u0440\u0441\u0438\u044f \u044f\u0434\u0440\u0430 5.13.0 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043a\u043e\u0434\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 NFS (\u0441\u043c., \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/elrepo.org\/bugs\/view.php?id=1116\">elrepo.org\/bugs\/view.php?id=1116<\/a>), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434 \u043d\u0438\u043c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0441\u0435\u0442\u0435\u0432\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 CentOS \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e NFS  <\/td>\n<\/tr>\n<tr>\n<td>\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0441\u043b\u0443\u0436\u0431<\/td>\n<td>sys-apps\/systemd-248.3-r1<br \/>  USE=\u00abgcrypt hwdb kmod lz4 pam pcre policykit seccomp split-usr sysv-utils zstd\u00bb  <\/td>\n<\/tr>\n<tr>\n<td>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0442\u043e\u043c\u0430\u043c\u0438<\/td>\n<td>sys-fs\/lvm2-2.02.188<br \/>  USE=\u00absystemd thin udev\u00bb  <\/td>\n<\/tr>\n<tr>\n<td>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/td>\n<td>app-emulation\/qemu-6.0.0-r50<br \/>  USE=\u00abcaps io-uring usb vhost-net vnc\u00bb<br \/>  QEMU_SOFTMMU_TARGETS=\u00abx86_64\u00bb<br \/>  QEMU_USER_TARGETS=&#187;&#187;  <\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0449\u0438\u043a VNC<\/td>\n<td>net-libs\/gtk-vnc-1.2.0<br \/>  USE=\u00abintrospection vala\u00bb<\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u044d\u0442\u043e\u0442 ebuild \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a\u043b\u0438\u0435\u043d\u0442 VNC, \u0435\u0433\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438:<\/p>\n<p>  ebuild \/\u043f\u0443\u0442\u044c\/\u0434\u043e\/\u0434\u0435\u0440\u0435\u0432\u0430\/\u043f\u043e\u0440\u0442\u0435\u0436\u0435\u0439\/net-libs\/gtk-vnc\/gtk-vnc-1.2.0.ebuild unpack<br \/>  ebuild \/\u043f\u0443\u0442\u044c\/\u0434\u043e\/\u0434\u0435\u0440\u0435\u0432\u0430\/\u043f\u043e\u0440\u0442\u0435\u0436\u0435\u0439\/net-libs\/gtk-vnc\/gtk-vnc-1.2.0.ebuild compile<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 gvncviewer \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 \/usr\/local\/bin, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440  <\/td>\n<\/tr>\n<tr>\n<td>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u044c\u044e<\/td>\n<td>net-misc\/connman-1.40<br \/>  USE=\u00abethernet nftables wifi\u00bb  <\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0435\u0442\u0435\u0432\u043e\u0439 \u044d\u043a\u0440\u0430\u043d<\/td>\n<td>net-firewall\/nftables-0.9.9<br \/>  USE=\u00abgmp modern-kernel\u00bb  <\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440 DNS, DHCP \u0438 TFTP<\/td>\n<td>net-dns\/dnsmasq-2.85<br \/>  USE=\u00abdhcp idn inotify libidn2 tftp\u00bb  <\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440 HTTP \u0438 FTP<\/td>\n<td>sys-apps\/busybox-1.33.1<br \/>  USE=\u00absavedconfig systemd\u00bb<\/p>\n<p>  \u0412\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u041e\u0421  <\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0435\u0440\u0432\u0435\u0440 CIFS<\/td>\n<td>net-fs\/samba-4.14.5-r1<br \/>  USE=\u00absystem-mitkrb5 systemd\u00bb<\/p>\n<p>  \u041d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0433\u043e Windows Server  <\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u043e\u043a\u0435\u0442\u0430\u043c Unix<\/td>\n<td>net-misc\/socat-1.7.4.1<br \/>  USE=&#187;&#187;  <\/td>\n<\/tr>\n<tr>\n<td>\u041e\u043a\u043e\u043d\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440<\/td>\n<td>gui-wm\/sway-1.6.1<br \/>  USE=\u00abX man swaybar swaybg swayidle swaylock swaymsg swaynag tray\u00bb<\/p>\n<p>  \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0437\u0434\u0435\u0441\u044c \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u0441 \u044d\u0442\u0438\u043c \u0441\u0432\u044f\u0437\u0430\u043d  <\/td>\n<\/tr>\n<tr>\n<td>\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438<\/td>\n<td>gui-apps\/ydotool-0.1.9<\/p>\n<p>  \u042d\u0442\u043e\u0442 ebuild \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0434\u0435\u0440\u0435\u0432\u0435 \u043f\u043e\u0440\u0442\u0435\u0436\u0435\u0439, \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u043e\u0432\u0435\u0440\u043b\u0435\u044f pg_overlay, \u043e\u0442\u0442\u0443\u0434\u0430 \u0436\u0435 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0434\u0432\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p>  dev-libs\/libevdevplus-0.1.1<br \/>  dev-libs\/libuinputplus-0.1.4  <\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044f\u0434\u0440\u0430<\/h3>\n<p>  <\/p>\n<pre><code class=\"apache\">    General setup  --->       [*] Configure standard kernel features (expert users)  ---> <\/code><\/pre>\n<p>  <i># \u0412\u044b\u0431\u0435\u0440\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0442\u0438\u043f AIO (Asynchronous Input\/Output) \u0434\u043b\u044f \u0412\u041c, \u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u0443\u0436\u0430\u0441\u043d\u043e \u043d\u043e\u0432\u043e\u043c\u043e\u0434\u043d\u044b\u0439<\/i><\/p>\n<pre><code class=\"apache\">        [*]   Enable IO uring support [*] Virtualization  ---> <\/code><\/pre>\n<p>  <i># \u0411\u0435\u0437 KVM, \u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0412\u041c \u0431\u0443\u0434\u0443\u0442 \u043e-\u043e-\u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u043c\u0438<\/i><\/p>\n<pre><code class=\"apache\">&lt;*>   Kernel-based Virtual Machine (KVM) support<\/code><\/pre>\n<p>  <i># \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u0434\u0430\u043b\u0435\u0435 \u0426\u041f) \u0445\u043e\u0441\u0442\u0430 (\u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u043b\u0441\u044f Intel)<\/i><\/p>\n<pre><code class=\"apache\">      &lt;*>     KVM for Intel (and compatible) processors support       &lt; >     KVM for AMD processors support [*] Networking support  --->         Networking options  ---> <\/code><\/pre>\n<p>  <i># \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0412\u041c<\/i><\/p>\n<pre><code class=\"apache\">        &lt;*> 802.1d Ethernet Bridging     Device Drivers  --->       [*] Block devices  ---> <\/code><\/pre>\n<p>  <i># \u0414\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ISO-\u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u041e\u0421<\/i><\/p>\n<pre><code class=\"apache\">        &lt;*>   Loopback device support       [*] Multiple devices driver support (RAID and LVM)  --->         &lt;*>   Device mapper support <\/code><\/pre>\n<p>  <i># \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043d\u0430\u043f\u0448\u043e\u0442\u043e\u0432 \u0412\u041c<\/i><\/p>\n<pre><code class=\"apache\">&lt;*>     Snapshot target<\/code><\/pre>\n<p>  <i># \u0414\u043b\u044f \u0431\u0435\u0440\u0435\u0436\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0430 \u0445\u043e\u0441\u0442\u0430<\/i><\/p>\n<pre><code class=\"apache\">        &lt;*>     Thin provisioning target       [*] Network device support  --->         [*]   Network core driver support <\/code><\/pre>\n<p>  <i># \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0412\u041c<\/i><\/p>\n<pre><code class=\"apache\">        &lt;*>     Universal TUN\/TAP device driver support           Input device support  --->             [*]   Miscellaneous devices  ---> <\/code><\/pre>\n<p>  <i># \u042d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u0412\u041c<\/i><\/p>\n<pre><code class=\"apache\">&lt;M>   User level driver support<\/code><\/pre>\n<p>  <i># \u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0442\u0438 \u0432 \u0412\u041c<\/i><\/p>\n<pre><code class=\"apache\">      [*] VHOST drivers  --->         &lt;*>   Host kernel accelerator for virtio net     File systems  --->           CD-ROM\/DVD Filesystems  ---> <\/code><\/pre>\n<p>  <i># \u0414\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ISO-\u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u041e\u0421<\/i><\/p>\n<pre><code class=\"apache\">            &lt;M> ISO 9660 CDROM file system support             [*]   Microsoft Joliet CDROM extensions <\/code><\/pre>\n<p>  <i># \u0414\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ISO-\u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 Windows Server<\/i><\/p>\n<pre><code class=\"apache\">            &lt;M> UDF file system support           Pseudo filesystems  ---> &lt;i><\/code><\/pre>\n<p>  # \u041e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u0412\u041c<\/p>\n<pre><code class=\"apache\">        [*] HugeTLB file system support       [*] Network File Systems  ---> <\/code><\/pre>\n<p>  <i># \u041f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 CentOS<\/i><\/p>\n<pre><code class=\"apache\">        &lt;M>   NFS server support         [*]     NFS server support for NFS version 4 <\/code><\/pre>\n<p>  <b>\u0414\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0437 \/usr\/src\/linux\/.config:<\/b><\/p>\n<p>  <code>CONFIG_IO_URING=y<br \/>  CONFIG_VIRTUALIZATION=y<br \/>  CONFIG_KVM=y<br \/>  CONFIG_KVM_INTEL=y<br \/>  CONFIG_BRIDGE=y<br \/>  CONFIG_BLK_DEV_LOOP=y<br \/>  CONFIG_DM_SNAPSHOT=y<br \/>  CONFIG_DM_THIN_PROVISIONING=y<br \/>  CONFIG_TUN=y<br \/>  CONFIG_INPUT_UINPUT=m<br \/>  CONFIG_VHOST_NET=y<br \/>  CONFIG_ISO9660_FS=m<br \/>  CONFIG_JOLIET=y<br \/>  CONFIG_UDF_FS=m<br \/>  CONFIG_HUGETLBFS=y<br \/>  CONFIG_NFSD=m<br \/>  CONFIG_NFSD_V4=y<br \/>  <\/code><br \/>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f, \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c: \u00ab<a href=\"https:\/\/habr.com\/ru\/company\/infowatch\/blog\/492260\/\">\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 Squid \u0441 SSL-Bump \u0434\u043b\u044f Gentoo \u0441 nft<\/a>\u00bb.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430<\/h3>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0438\u043c\u0435\u0435\u0442\u0441\u044f 500 \u0413\u0411 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0442\u043e\u043c\u043e\u0432 \u00abvg\u00bb, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043d\u0451\u043c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u00ab\u0442\u043e\u043d\u043a\u0438\u0439 \u043f\u0443\u043b\u00bb \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u00abthin\u00bb:<\/p>\n<pre><code class=\"apache\">lvm lvcreate -c 64M -I 64M -L 500G -Zn --type thin-pool --thinpool thin vg<\/code><\/pre>\n<p>  \u041a\u043b\u044e\u0447 -Zn \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u043b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u043c\u043e\u0432.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<p>  \u041c\u043e\u0439 \u0426\u041f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0443\u0445\u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u043d\u044b\u0435 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0434\u043b\u044f \u0433\u0438\u0433\u0430\u0431\u0430\u0439\u0442\u043d\u044b\u0445 \u043d\u0443\u0436\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430. \u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0432 \/etc\/sysctl.conf:<\/p>\n<pre><code class=\"apache\">vm.nr_hugepages = 5000<\/code><\/pre>\n<p>  Hugetlbs \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0441\u043b\u0443\u0436\u0431 Systemd \u0432 \/dev\/hugepages.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0438<\/h3>\n<p>  \u0414\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0441 OpenRC \u043d\u0430 Systemd \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0441\u0435\u0442\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e. \u0422\u0430\u043a \u043a\u0430\u043a Systemd \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0435\u0442\u044c (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u043f\u043e\u043a\u0430), \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043b\u0443\u0436\u0431\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438, \u0432 \u044d\u0442\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d connman. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430. Systemd \u043c\u043e\u0433 \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u043c\u043e\u0441\u0442, \u043d\u043e \u043e\u043d \u043d\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0443\u0441\u0442\u043e\u043c\u0443 \u043c\u043e\u0441\u0442\u0443 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u043b\u0443\u0436\u0431\u0443 \/etc\/systemd\/system\/create-br0.service:<\/p>\n<pre><code class=\"apache\">[Unit] Description=Bridge creation. Before=network-pre.target Before=nftables-restore.service  [Service] Type=simple ExecStart=\/bin\/bash \/usr\/local\/sbin\/create-br0.sh RemainAfterExit=yes  [Install] WantedBy=nftables-restore.service WantedBy=dnsmasq.service <\/code><\/pre>\n<p>  \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \/usr\/local\/sbin\/create-br0.sh \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"apache\">#!\/bin\/sh ip link add br0 type bridge ip link set br0 address 8e:fb:65:16:72:38 ip link set br0 up ip addr add 192.168.120.1\/24 dev br0 <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b connman \u043d\u0435 \u043c\u0435\u0448\u0430\u043b, \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u043c \u0432 \u0435\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043c\u043e\u0441\u0442 \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0441\u0442\u044b\u043a\u0438 \u0412\u041c, \u0432 \u0438\u0442\u043e\u0433\u0435 \/etc\/connman\/main.conf \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"axapta\">[General] AllowDomainnameUpdates=false AllowHostnameUpdates=false NetworkInterfaceBlacklist=lo,vnet,br <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nft, \u0437\u0430 \u0432\u044b\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0433\u043e, \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043a\u0430\u0441\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0412\u041c, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <i>#!\/sbin\/nft -f<\/i><\/p>\n<pre><code class=\"apache\">define icmp_types = { destination-unreachable, time-exceeded, parameter-problem, timestamp-request, echo-request, echo-reply } define br = br0 define host = 192.168.120.1 define virtual_machines = 192.168.120.0\/24 define br_bcast = 192.168.120.255 define eth = enp0s25 define wifi = wlp2s0 define dhcp_client = 192.168.120.224\/27 <\/code><\/pre>\n<p>  <i># \u0412\u041c \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442<\/i><\/p>\n<pre><code class=\"apache\">define privileged_vm = { 192.168.120.22, 192.168.120.127, 192.168.120.129 } define nat_if = { $eth, $wifi } define squid = 3128  flush ruleset  table ip filter {   chain input {     type filter hook input priority 0; policy drop;     iif lo accept comment \"allow loopback\"     icmp type $icmp_types accept comment \"allow important ICMP types\"     ct state invalid counter drop comment \"drop invalid packets\"     tcp flags syn tcp option maxseg size &lt; 999 counter drop comment \"TCP SACK Panic workaround\"     tcp flags &amp; (syn | ack) == syn ct state untracked counter drop comment \"drop initial packets from untracked ports\"     iif $br ip daddr $host ip saddr $virtual_machines tcp dport { domain, http, https, microsoft-ds, nfs, $squid, ftp } accept comment \"allow services for virtual machines\"     ct state { established, related } accept comment \"allow all related connections\"     iif $br udp dport { domain, bootps, tftp, 4011 } counter accept comment \"allow DNS, DHCP, TFTP, proxyDHCP\"     counter comment \"count dropped packets\"   }    chain output {     type filter hook output priority 100; policy drop;     oif lo accept comment \"allow loopback\"     icmp type $icmp_types counter accept comment \"allow important ICMP types\"     oif { $eth, $wifi } udp dport . udp sport { bootps . bootpc } counter accept comment \"allow exchange with DHCP servers\"     oif $br ip saddr $host ip daddr { $dhcp_client, 255.255.255.255 } udp sport . udp dport { bootps . bootpc } counter accept comment \"allow DHCP of dnsmasq\"     oif $br ip saddr $host ip daddr $virtual_machines udp sport { domain, tftp } counter accept comment \"allow DNS, TFTP\"     oif $br ip saddr $host ip daddr $virtual_machines tcp sport { domain, http, https, microsoft-ds, ftp } accept comment \"allow DNS, HTTP, Samba, FTP\"     meta l4proto { tcp, udp } th sport >= 1025 accept comment \"allow unprivileged ports\"     counter comment \"count dropped packets\"   }    chain forward {     type filter hook forward priority 0; policy drop;     tcp flags syn tcp option maxseg size set rt mtu counter comment \"clamp TCP MSS to path MTU\"     iif $br ip daddr != $host meta l4proto { tcp, udp } th dport domain drop comment \"deny DNS to external servers\"     iif $br ip saddr { $privileged_vm, $dhcp_client } accept comment \"allow privileged virtual machine &amp; DHCP clients\"     oif $br ip daddr { $privileged_vm, $dhcp_client } accept comment \"allow privileged virtual machine &amp; DHCP clients\"     counter comment \"count dropped packets\"   } }  table ip nat {   chain postrouting {     type nat hook postrouting priority 100; policy accept;     oif $nat_if ip saddr { $privileged_vm, $dhcp_client } counter masquerade comment \"masquerade virtual machine\"   } } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c<\/h3>\n<p>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0412\u041c \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0433\u043e \/usr\/local\/sbin\/qemu:<\/p>\n<pre><code class=\"apache\">#!\/bin\/bash VM=$2 if [[ \"$1\" != status &amp;&amp; -z \"$VM\" ]]; then echo \"No VM name was supplied\" exit 4 fi WAIT=60 CFGDIR=\/etc\/qemu CHROOT=\/var\/tmp\/qemu\/empty export LVM_SUPPRESS_FD_WARNINGS=1 [ -f \/etc\/conf.d\/qemu.$VM ] &amp;&amp; . \/etc\/conf.d\/qemu.$VM CFG=$CFGDIR\/$VM.cfg  case $1 in start) if [[ -r $CFG ]]; then CPU=`sed -ne '\/#CPU\/{s\/.*=\\(.*\\)\/\\1\/p;q}' $CFG` X[0]=`sed -ne '\/#MEM\/{s\/.*=\\(.*\\)\/\\1\/p;q}' $CFG` if grep '^#kernel=' $CFG &amp;> \/dev\/null; then X[1]='-kernel' X[2]=`sed -ne '\/#kernel\/{s\/[^=]*=\\(.*\\)\/\\1\/p;q}' $CFG` X[3]='-append' X[4]=`sed -ne '\/#append\/{s\/[^=]*=\\(.*\\)\/\\1\/p;q}' $CFG` X[5]='-initrd' X[7]=`sed -ne '\/#initrd\/{s\/[^=]*=\\(.*\\)\/\\1\/p;q}' $CFG` fi N=`sed -ne '\/= \"vnet[0-9]\/{s\/.*\"vnet\\([0-9]\\+\\).*\/\\1\/p;q}' $CFG` echo \"Starting $VM\" taskset -c $CPU qemu-system-x86_64 -name $VM -nodefaults -daemonize -runas qemu -cpu host -machine q35 -readconfig $CFG -m \"${X[@]}\" \\ -mem-prealloc -mem-path \/dev\/hugepages -rtc base=utc -chroot $CHROOT -vga virtio -audiodev id=none,driver=none \\ -object rng-random,filename=\/dev\/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=vrng0,max-bytes=1024,period=200 -vnc 127.0.0.1:$N || exit 1  else echo \"Unrecognized VM: $VM\" exit 3 fi ;; stop) if [[ -r $CFG ]]; then PID=`pgrep -f \"qemu-system-x86_64 -name $VM \"` if [[ -n $PID ]]; then echo \"Stopping $VM\" MON=`sed -ne 's\/^\\s*path\\s*=\\s*\"\\(.*\\)\"\/\\1\/p' $CFG` echo '{ \"execute\": \"qmp_capabilities\" } { \"execute\": \"system_powerdown\" }' | socat - $MON > \/dev\/null while ps -p $PID >\/dev\/null 2>&amp;1; do [[ $((i++)) -ge $WAIT ]] &amp;&amp; break || sleep 1 done [[ $i -gt $WAIT ]] &amp;&amp; kill $PID fi [[ $i -gt $WAIT ]] &amp;&amp; sleep 2 pgrep -f \"qemu-system-x86_64 -name $VM \" &amp;&amp; exit 1 else echo \"Unrecognized VM: $VM\" exit 3 fi ;; status) ps -eo args | sed -ne 's\/.*[q]emu-system-x86_64 -name \\([^ ]\\+\\) .* -vnc \\([^ ]\\+\\)\/\\1\\t\\2\/p' ;; *) echo \"Unrecognized command: $1\" exit 2 ;; esac <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 qemu-system-x86_64:<\/p>\n<ol>\n<li>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u0431\u043e\u0440\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 (\u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 taskset). \u041d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0412\u041c.<\/li>\n<li>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f qemu (-runas qemu). \u0415\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d, \u0442\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c \/dev\/null \u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u043e\u0439 \/sbin\/nologin. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 kvm.<\/li>\n<li>\u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0434\u043b\u044f \u0412\u041c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0445\u043e\u0441\u0442\u043e\u0432\u044b\u0439, \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (-cpu host). \u0427\u0438\u043f\u0441\u0435\u0442 \u2014 Q35 (-machine q35), \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u043b\u043e\u0441\u044c.<\/li>\n<li>\u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0412\u041c (-readconfig $CFG).<\/li>\n<li>\u041f\u0430\u043c\u044f\u0442\u044c \u0412\u041c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e (-mem-prealloc), \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (-mem-path \/dev\/hugepages). \u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0412\u041c (-m &#171;${X[@]}&#187;). \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 $X \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/li>\n<li>\u0412\u0440\u0435\u043c\u044f \u0411\u0418\u041e\u0421\u0430 \u0432 \u0412\u041c \u0431\u0443\u0434\u0435\u0442 \u0432 \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435 UTC (-rtc base=utc), \u044d\u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f Unix-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u0414\u043b\u044f Windows \u044d\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0435\u0451 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/li>\n<li>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043f\u0438\u0440\u0430\u0435\u0442 \u0441\u0435\u0431\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/var\/tmp\/qemu\/empty \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 chroot (-chroot $CHROOT). \u0412 \u044d\u0442\u043e\u0442 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043c\u044b \u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u043e\u0431\u0440\u0430\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u044a\u0451\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f (\u00ab\u0444\u043b\u0435\u0448\u043a\u0438\u00bb).<\/li>\n<li>Audio-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0412\u041c \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f (-audiodev id=none,driver=none). \u041e\u0431\u044b\u0447\u043d\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0443\u0434\u0438\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e RDP \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0412\u041c \u043d\u0430 Windows.<\/li>\n<li>\u041a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Virtio-RNG \u2014 \u043f\u0430\u0440\u0430\u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (-object rng-random,filename=\/dev\/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=vrng0,max-bytes=1024,period=200).<\/li>\n<li>\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0412\u041c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f VNC \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0435 127.0.0.1, \u043d\u043e\u043c\u0435\u0440 \u044d\u043a\u0440\u0430\u043d\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 (-vnc 127.0.0.1:$N).<\/li>\n<\/ol>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \/etc\/qemu\/ifup.sh:<\/p>\n<pre><code class=\"apache\">#!\/bin\/bash ip link set $1 master br0 ip link set $1 up <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0412\u041c<\/h3>\n<p>  <b>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u0430 \u0432 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/b><\/p>\n<p>  \u041c\u0435\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043d\u043a\u043e\u043c \u043f\u0443\u043b\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"apache\">lvm lvcreate -T vg\/thin -V 10G -n ubuntu<\/code><\/pre>\n<p>  \u0411\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u043e\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 10 \u0413\u0411, \u043f\u0443\u0442\u044c \u043a \u0431\u043b\u043e\u0447\u043d\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \/dev\/mapper\/vg-ubuntu. \u041f\u043e\u043a\u0430 \u0433\u043e\u0441\u0442\u0435\u0432\u0430\u044f \u041e\u0421 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430, \u044d\u0442\u043e\u0442 \u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043a\u0435 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442.<\/p>\n<p>  <b>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0412\u041c<\/b><\/p>\n<p>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \/etc\/qemu\/\u0418\u043c\u044f_\u0412\u041c.cfg. \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043b\u0438\u043d\u0443\u043a\u0441\u043e\u0432\u043e\u0439 \u0412\u041c:<\/p>\n<p>  # qemu config file<br \/>  # \u042d\u0442\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c<br \/>  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a \u043a\u0430\u043a\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 qemu<br \/>  #CPU=0,1,2,3<br \/>  # \u042d\u0442\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c<br \/>  # \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438 \u0412\u041c \u0432 \u041c\u0411<br \/>  #MEM=4096<br \/>  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c<br \/>  # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044f\u0434\u0440\u0430 \u0441\u0430\u043c\u0438\u043c qemu<br \/>  #kernel=\/var\/tmp\/qemu\/vmlinuz-3.10.0-957.el7.x86_64<br \/>  #initrd=\/var\/tmp\/qemu\/initramfs-3.10.0-957.el7.x86_64.img<br \/>  #append=ro root=\/dev\/vda1 elevator=noop numa=off transparent_hugepage=never nosoftlockup mce=ignore_ce audit=0<\/p>\n<p>  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u0432\u043e\u0434 DVD<br \/>  # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u041e\u0421 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0430 DVD  <\/p>\n<pre><code class=\"apache\">[drive \"cd0\"]   file = \"\/opt\/dist\/ks-CentOS_2009-tm_7.2.0.155.iso\"   if = \"none\"   readonly = \"on\"   format = \"raw\"  [device]   driver = \"ide-cd\"   drive = \"cd0\"   bus = \"ide.0\"   unit = \"0\" <\/code><\/pre>\n<p>  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0436\u0451\u0441\u0442\u043a\u0438\u0439 \u0434\u0438\u0441\u043a \u0412\u041c<\/p>\n<pre><code class=\"apache\">[drive \"vhd0\"]   file = \"\/dev\/mapper\/vg-centos\"   if = \"none\"   format = \"raw\" <\/code><\/pre>\n<p>  # \u041a\u0435\u0448 \u0432 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0434\u043b\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438, \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u0430\u0436\u043d\u0430 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<br \/>  # \u041b\u0438\u0431\u043e \u0436\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u041e\u0421,<br \/>  # \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c \u00abnone\u00bb<\/p>\n<pre><code class=\"apache\">cache = \"unsafe\"   cache.direct = \"on\"   aio = \"io_uring\"  [device \"virtio0\"]   driver = \"virtio-blk-pci\"   scsi = \"off\"   bus = \"pcie.0\"   drive = \"vhd0\" <\/code><\/pre>\n<p>  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u043e\u043a\u0435\u0442\u0430 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 qemu \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434 QMP (QEMU Machine Protocol)<\/p>\n<pre><code class=\"apache\">[chardev \"charmonitor\"]   backend = \"socket\"   path = \"\/var\/tmp\/qemu\/centos.monitor\"   server = \"on\"   wait = \"off\" <\/code><\/pre>\n<p>  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u044b\u043a \u0412\u041c<\/p>\n<pre><code class=\"apache\">[device \"net0\"]   driver = \"virtio-net-pci\"   netdev = \"hostnet0\"   mac = \"52:54:00:07:00:08\"   bus = \"pcie.0\" <\/code><\/pre>\n<p>  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0433\u043e (mutliqueue) \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0441\u0442\u044b\u043a\u0430 \u0412\u041c<br \/>  # \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u041e\u0421 (\u0441\u043c. \u0434\u0430\u043b\u0435\u0435)<br \/>  # \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e 2 * M + 2, \u0433\u0434\u0435 M \u2014 \u0447\u0438\u0441\u043b\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0412\u041c<\/p>\n<pre><code class=\"apache\">  vectors = \"10\"   mq = \"on\"  [netdev \"hostnet0\"]   type = \"tap\" <\/code><\/pre>\n<p>  # \u0427\u0438\u0441\u043b\u043e \u043f\u043e\u0441\u043b\u0435 \u00abvnet\u00bb \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u044d\u043a\u0440\u0430\u043d\u0430 VNC<\/p>\n<pre><code class=\"apache\">  ifname = \"vnet6\"   vhost = \"on\"   script = \"\/etc\/qemu\/ifup.sh\"   downscript = \"no\" <\/code><\/pre>\n<p>  # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043d\u043e\u0433\u043e\u043e\u0447\u0435\u0440\u0451\u0434\u043d\u043e\u0433\u043e (multiqueue) \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0441\u0442\u044b\u043a\u0430 \u0412\u041c<br \/>  # \u0432 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u041e\u0421 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439: ethtool -L eth0 combined 4<br \/>  # \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e \u041c, \u0433\u0434\u0435 M \u2014 \u0447\u0438\u0441\u043b\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0412\u041c<\/p>\n<pre><code class=\"apache\">queues = \"4\"  [mon]   chardev = \"charmonitor\"   mode = \"control\"  [machine]   type = \"q35\"   accel = \"kvm\"   usb = \"on\" <\/code><\/pre>\n<p>  # \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0412\u041c<\/p>\n<pre><code class=\"apache\">[smp-opts]   sockets = \"1\"   cores = \"2\"   threads = \"2\" <\/code><\/pre>\n<p>  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 \u0431\u043b\u043e\u043a\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442 \u0412\u041c \u0432 \u0440\u0435\u0436\u0438\u043c UEFI<\/p>\n<pre><code class=\"apache\">[drive]   file = \"\/usr\/share\/edk2-ovmf\/OVMF_CODE.fd\"   if = \"pflash\"   format = \"raw\"   unit = \"0\"   readonly = \"on\"  [drive]   file = \"\/var\/tmp\/qemu\/OVMF_VARS_tm72p.fd\"   if = \"pflash\"   format = \"raw\"   unit = \"1\" <\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0412\u041c c Windows:<\/b><\/p>\n<p>  # qemu config file<br \/>  #MEM=3072<br \/>  #CPU=2,3<\/p>\n<p>  # \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442 \u0434\u0432\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u043e\u0434\u0430 DVD<br \/>  # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u041e\u0421 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0430 DVD<\/p>\n<pre><code class=\"apache\">[drive \"cd0\"]   file = \"\/opt\/distr\/windows_server.iso\"   if = \"none\"   readonly = \"on\"   format = \"raw\"  [device]   driver = \"ide-cd\"   drive = \"cd0\"   bus = \"ide.0\"   unit = \"0\"  [drive \"cd1\"] <\/code><\/pre>\n<p>  # \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0432\u043e\u0434 DVD \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0443 Windows \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 Virtio<\/p>\n<pre><code class=\"apache\">  file = \"\/opt\/distr\/virtio-win-0.1.190.iso\"   if = \"none\"   readonly = \"on\"   format = \"raw\"  [device]   driver = \"ide-cd\"   drive = \"cd1\"   bus = \"ide.1\"   unit = \"0\"  [drive \"vhd0\"]   file = \"\/dev\/mapper\/vg-windoze\"   if = \"none\"   format = \"raw\"   cache = \"unsafe\"   cache.direct = \"on\"   aio = \"io_uring\"  [device \"virtio0\"]   driver = \"virtio-blk-pci\"   scsi = \"off\"   bus = \"pcie.0\"   drive = \"vhd0\"  [chardev \"charmonitor\"]   backend = \"socket\"   path = \"\/var\/tmp\/qemu\/windoze.monitor\"   server = \"on\"   wait = \"off\"  [device \"net0\"]   driver = \"virtio-net-pci\"   netdev = \"hostnet0\"   mac = \"52:54:00:20:12:04\"   bus = \"pcie.0\"  [netdev \"hostnet0\"]   type = \"tap\"   ifname = \"vnet8\"   vhost = \"on\"   script = \"\/etc\/qemu\/ifup.sh\"   downscript = \"no\" <\/code><\/pre>\n<p>  # \u041d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0435\u0440\u0435\u0437 VNC<\/p>\n<pre><code class=\"apache\">[device \"tablet\"]   driver = \"usb-tablet\"  [mon]   chardev = \"charmonitor\"   mode = \"control\"  [machine]   type = \"q35\"   accel = \"kvm\"   usb = \"on\"  [smp-opts]   cpus = \"2\" <\/code><\/pre>\n<p>  <b>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432<\/b><\/p>\n<p>  \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0412\u041c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 UEFI \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0412\u041c \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \/usr\/share\/edk2-ovmf\/OVMF_VARS.fd \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 Qemu, \u0432 \u043c\u043e\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \/var\/tmp\/qemu.<br \/>  \u0414\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0412\u041c \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b: \/etc\/conf.d\/qemu.\u0418\u043c\u044f_\u0412\u041c (\u043a\u0430\u043a \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u043e OpenRC). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 QEMU_OPTS. \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043e \u0441\u0435\u0442\u0438:<\/p>\n<pre><code class=\"apache\">QEMU_OPTS=\"-boot order=n\"<\/code><\/pre>\n<p>  \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435, \u043a\u0430\u0441\u0430\u044e\u0449\u0435\u0435\u0441\u044f Systemd: \u0434\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0441 OpenRC \u044f \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \/var\/tmp (\u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b) \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u0430\u043d\u043d\u044b\u0445 qemu. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 Systemd \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u043d\u0451\u043c \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u0430 systemd-tmpfiles-clean, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0434\u0430\u043b\u0438\u043b\u0430, \u043a \u043c\u043e\u0435\u043c\u0443 \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u0437 \/var\/tmp \u043c\u043d\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b qemu, \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \/usr\/lib\/tmpfiles.d\/qemu.conf:<\/p>\n<pre><code class=\"apache\">d \/var\/tmp\/qemu 0755 qemu qemu -<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0412\u041c<\/h3>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a \u0412\u041c \u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"apache\">\/usr\/local\/sbin\/qemu start \u0418\u043c\u044f_\u0412\u041c<\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<pre><code class=\"apache\">\/usr\/local\/sbin\/qemu stop \u0418\u043c\u044f_\u0412\u041c<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0447\u043d\u044f \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0412\u041c:<\/p>\n<pre><code class=\"apache\">\/usr\/local\/sbin\/qemu status<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0412\u041c \u0445\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 USB \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0435<\/h3>\n<p>  \u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c VID \u0438 PID \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"apache\">[device \"usbaudio\"]   driver = \"usb-host\"   vendorid = \"0x041e\"   productid = \"0x30e0\" <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043a\u0430\u043a \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 qemu \u0434\u043e \u0441\u0431\u0440\u043e\u0441\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439, \u043c\u0435\u043d\u044f\u0442\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 qemu:qemu \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0439 \u0412\u041c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u044a\u0451\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f (\u00ab\u0444\u043b\u0435\u0448\u043a\u0438\u00bb)<\/h3>\n<p>  \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u043e\u0431\u0440\u0430\u0437 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u044a\u0451\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 1 \u0413\u0411, \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 $CHROOT (\u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \/var\/tmp\/qemu\/empty):<\/p>\n<pre><code class=\"apache\">truncate -s 1G \/var\/tmp\/qemu\/empty\/usb.img chown qemu:qemu \/var\/tmp\/qemu\/empty\/usb.img <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u043d\u0430\u0448\u0435\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0443 \u0412\u041c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c VNC, \u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 Qemu Monitor \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c QMP, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044f\u0441\u044c \u043a \u0441\u043e\u043a\u0435\u0442\u0443, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code class=\"apache\">socat - \/var\/tmp\/qemu\/windoze.monitor<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0441\u043e\u043a\u0435\u0442\u0443 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0430\u0451\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"apache\">{ \"execute\": \"qmp_capabilities\" }<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (\u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430):<\/p>\n<pre><code class=\"apache\">{   \"execute\": \"human-monitor-command\",   \"arguments\": {     \"command-line\": \"drive_add auto if=none,id=hd1,file=\/usb.img,cache=writeback,cache.direct=on,aio=io_uring,format=raw\"   } } {   \"execute\": \"device_add\",   \"arguments\": {     \"driver\": \"usb-storage\",     \"drive\": \"hd1\",     \"id\": \"usb1\"   } } <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u0443\u0434\u0443\u0442, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a\u0438\u043c\u0438:<\/p>\n<pre><code class=\"apache\">{ \"execute\": \"device_del\", \"arguments\": { \"id\": \"usb1\" } } { \"execute\": \"human-monitor-command\", \"arguments\": { \"command-line\": \"drive_del hd1\" } } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u043a\u0430 (\u0441\u043d\u0430\u043f\u0448\u043e\u0442\u0430) \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439 \u0412\u041c<\/h3>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043d\u0438\u043c\u043a\u0430 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 LVM:<\/p>\n<pre><code class=\"apache\">lvm lvcreate -s vg\/centos -n centos_bak<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0441\u043d\u0438\u043c\u043e\u043a \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u0434\u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 LVM.<\/p>\n<h3>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0434\u0438\u0441\u043a\u0430 \u0412\u041c \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0443\u043b\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439<\/h3>\n<p>  \u041d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043d\u043a\u0438\u0439 \u043f\u0443\u043b \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u043e\u043c\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0442\u043e\u0433\u0434\u0430 \u0412\u041c. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 dd, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043d\u043e\u0432\u043e\u043c \u0442\u043e\u043d\u043a\u043e\u043c \u043f\u0443\u043b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u043e\u043c\u0430:<\/p>\n<pre><code class=\"apache\">dd if=\/dev\/vg\/some_vm of=\/dev\/other_vg\/some_vm bs=64M conv=sparse<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u00abconv=sparse\u00bb, \u043d\u0443\u0436\u043d\u044b\u0439 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0442\u043e\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0412\u041c \u043c\u0435\u0441\u0442\u043e.<\/p>\n<h3>\u0410\u0432\u0442\u043e\u0437\u0430\u043f\u0443\u0441\u043a \u0412\u041c \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0445\u043e\u0441\u0442\u0430<\/h3>\n<p>  \u0418\u043d\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0412\u041c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0430\u0441\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043b\u0443\u0436\u0431\u0430\u043c\u0438 \u0445\u043e\u0441\u0442\u0430. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0433\u043e \/usr\/local\/bin\/guests:<\/p>\n<pre><code class=\"apache\">#!\/bin\/bash export LVM_SUPPRESS_FD_WARNINGS=1 CFGDIR=\/etc\/qemu  case $1 in start) CHROOT=\/var\/tmp\/qemu\/empty for CFG in $CFGDIR\/*.cfg; do VM=${CFG##*\/} VM=${VM%.cfg} [ -f \/etc\/conf.d\/qemu.$VM ] &amp;&amp; . \/etc\/conf.d\/qemu.$VM CPU=`sed -ne '\/#CPU\/{s\/.*=\\(.*\\)\/\\1\/p;q}' $CFG` X[0]=`sed -ne '\/#MEM\/{s\/.*=\\(.*\\)\/\\1\/p;q}' $CFG` if grep '^#kernel=' $CFG &amp;> \/dev\/null; then X[1]='-kernel' X[2]=`sed -ne '\/#kernel\/{s\/[^=]*=\\(.*\\)\/\\1\/p;q}' $CFG` X[3]='-append' X[4]=`sed -ne '\/#append\/{s\/[^=]*=\\(.*\\)\/\\1\/p;q}' $CFG` X[5]='-initrd' X[7]=`sed -ne '\/#initrd\/{s\/[^=]*=\\(.*\\)\/\\1\/p;q}' $CFG` fi N=`sed -ne '\/= \"vnet[0-9]\/{s\/.*\"vnet\\([0-9]\\+\\).*\/\\1\/p;q}' $CFG` echo \"Starting $VM\" taskset -c $CPU qemu-system-x86_64 -name $VM -nodefaults -daemonize -runas qemu -cpu host -machine q35 -readconfig $CFG -m \"${X[@]}\" \\ -mem-prealloc -mem-path \/dev\/hugepages -rtc base=utc -chroot $CHROOT -vga virtio -audiodev id=none,driver=none \\ -object rng-random,filename=\/dev\/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=vrng0,max-bytes=1024,period=200 -vnc 127.0.0.1:$N done ;; stop) WAIT=60 for CFG in $CFGDIR\/*.cfg; do VM=${CFG##*\/} VM=${VM%.cfg} PID=`pgrep -f \"qemu-system-x86_64 -name $VM \"` if [[ -n $PID ]]; then echo \"Stopping $VM\" MON=`sed -ne 's\/^\\s*path\\s*=\\s*\"\\(.*\\)\"\/\\1\/p' $CFG` echo '{ \"execute\": \"qmp_capabilities\" } { \"execute\": \"system_powerdown\" }' | socat - $MON > \/dev\/null while ps -p $PID >\/dev\/null 2>&amp;1; do [[ $((i++)) -ge $WAIT ]] &amp;&amp; break || sleep 1 done [[ $i -gt $WAIT ]] &amp;&amp; kill $PID fi [[ $i -gt $WAIT ]] &amp;&amp; sleep 2 pgrep -f \"qemu-system-x86_64 -name $VM \" &amp;&amp; exit 1 done ;; status) ps -eo args | sed -ne 's\/.*[q]emu-system-x86_64 -name \\([^ ]\\+\\) .* -vnc \\([^ ]\\+\\)\/\\1\\t\\2\/p' ;; *) echo \"Unrecognized command: $1\" exit 2 ;; esac <\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \/usr\/lib\/systemd\/system\/guests.service:<\/p>\n<pre><code class=\"apache\">[Unit] Description=Qemu-KVM guests service. After=network.target  [Service] Type=forking ExecStart=\/bin\/bash \/usr\/local\/bin\/guests start ExecStop=\/bin\/bash \/usr\/local\/bin\/guests stop  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u041e\u0421<\/h3>\n<p>  \u0412\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \/netboot.<\/p>\n<p>  <b>DHCP \u0438 TFTP<\/b><\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c dnsmasq. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0447\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u043a\u0430\u0441\u0430\u044e\u0449\u0443\u044e\u0441\u044f DHCP \u0438 TFTP:<\/p>\n<p>  <code>dhcp-range=192.168.120.225,192.168.120.252,3h<br \/>  dhcp-option=option:netmask,255.255.255.0<br \/>  dhcp-option=option:router,192.168.120.1<br \/>  dhcp-option=option:dns-server,192.168.120.1<br \/>  dhcp-option=option:domain-name,shadow.amn<br \/>  dhcp-option-force=209,pxelinux.cfg\/default<br \/>  dhcp-authoritative<br \/>  dhcp-vendorclass=set:uefi,\"PXEClient:Arch:00007\"<br \/>  dhcp-match=set:uefi,option:client-arch,7<br \/>  enable-tftp<br \/>  tftp-root=\/netboot\/tftp<br \/>  dhcp-boot=pxelinux.0,host.shadow.amn,192.168.120.1<br \/>  dhcp-boot=tag:uefi,grubx64.efi,host.shadow.amn,192.168.120.1<br \/>  pxe-prompt=\"Press F8 for PXE Network boot.\",10<br \/>  pxe-service=x86PC,\"Boot from local disk\"<br \/>  pxe-service=x86PC,\"Install OS via PXE\",pxelinux<br \/>  <\/code><br \/>  \u041a\u043e\u0440\u043d\u0435\u043c TFTP \u0443\u043a\u0430\u0437\u0430\u043d \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \/netboot\/tftp. \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043d\u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b:<\/p>\n<p>  1. \u0414\u043b\u044f PXE \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 BIOS:  <\/p>\n<ul>\n<li>pxelinux.0, ldlinux.c32, libcom32.c32, libutil.c32, vesamenu.c32 \u0438 memdisk \u0438\u0437 sys-boot\/syslinux.<\/li>\n<li>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 pxelinux.cfg \u0441 \u0444\u0430\u0439\u043b\u043e\u043c default, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0441\u043e\u0431\u043e\u0439 \u043c\u0435\u043d\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 pxelinux.<\/li>\n<\/ul>\n<p>  2. \u0414\u043b\u044f PXE \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 UEFI:  <\/p>\n<ul>\n<li>grubx64.efi \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD CentOS 7.9 (\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 EFI\/BOOT).<\/li>\n<li>grub.cfg, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u043c \u0441\u043e\u0431\u043e\u0439 \u043c\u0435\u043d\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 Grub.<\/li>\n<li>\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 grub.cfg-00000000-0000-0000-0000-000000000000 \u043d\u0430 \u0444\u0430\u0439\u043b grub.cfg.<\/li>\n<\/ul>\n<p>  3. \u0414\u043b\u044f \u0412\u041c \u043d\u0430 CentOS: \u043a\u0430\u0442\u0430\u043b\u043e\u0433 centos, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0430\u0439\u043b\u044b initrd.img \u0438 vmlinuz \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD CentOS 7.9 (\u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 images\/pxeboot).<\/p>\n<p>  4. \u0414\u043b\u044f \u0412\u041c \u043d\u0430 Astra Linux: \u043a\u0430\u0442\u0430\u043b\u043e\u0433 astra, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0430\u0439\u043b\u044b initrd.gz \u0438 linux \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD Astra Linux.<\/p>\n<p>  5. \u0414\u043b\u044f \u0412\u041c \u043d\u0430 Windows:  <\/p>\n<ul>\n<li>\u043a\u0430\u0442\u0430\u043b\u043e\u0433 windows, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0444\u0430\u0439\u043b\u044b BCD, bootmgr.exe, boot.sdi, pxeboot.0 \u0438 winpe.wim, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Windows Assessment and Deployment Kit (Windows ADK), \u043f\u0443\u0441\u0442\u044b\u0435 \u0444\u0430\u0439\u043b\u044b boot.ini \u0438 hiberfil.sys, \u043a\u0430\u0442\u0430\u043b\u043e\u0433 Fonts \u0441 \u0444\u0430\u0439\u043b\u043e\u043c wgl4_boot.ttf.<\/li>\n<li>\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 Boot \u043d\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 windows.<\/li>\n<li>\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 boot.ini \u043d\u0430 windows\/boot.ini.<\/li>\n<li>\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 bootmgr.exe \u043d\u0430 windows\/bootmgr.exe.<\/li>\n<li>\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 hiberfil.sys \u043d\u0430 windows\/hiberfil.sys.<\/li>\n<\/ul>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 grub.cfg:<\/p>\n<pre><code class=\"apache\">set timeout=60  menuentry 'Rescue installed system (CentOS)' {     linuxefi centos\/vmlinuz inst.stage2=nfs:nfsvers=4:192.168.120.1:\/netboot\/nfs rescue selinux=0     initrdefi centos\/initrd.img }  menuentry 'Install CentOS' {     linuxefi centos\/vmlinuz rd.net.timeout.carrier=15 inst.repo=nfs:nfsvers=4:192.168.120.1:\/netboot\/nfs inst.ks=http:\/\/192.168.120.1\/ks.cfg inst.sshd     initrdefi centos\/initrd.img }  menuentry 'Install Astra Linux' {     linuxefi astra\/linux auto=true priority=critical debian-installer\/locale=ru_RU console-keymaps-at\/keymap=ru url=ftp:\/\/192.168.120.1\/preseed.cfg interface=auto netcfg\/dhcp_timeout=60     initrdefi astra\/initrd.gz } <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 pxelinux.cfg\/default:<\/p>\n<pre><code class=\"apache\">default vesamenu.c32  label CentOS kernel centos\/vmlinuz append initrd=centos\/initrd.img rd.net.timeout.carrier=15 inst.repo=nfs:nfsvers=4:192.168.120.1:\/netboot\/nfs inst.ks=http:\/\/192.168.120.1\/ks.cfg inst.sshd   label Astra menu label Astra Linux kernel astra\/linux append initrd=astra\/initrd.gz auto=true priority=critical debian-installer\/locale=ru_RU console-keymaps-at\/keymap=ru url=ftp:\/\/192.168.120.1\/preseed.cfg interface=auto netcfg\/dhcp_timeout=60  label Windows menu label Windows Server kernel windows\/pxeboot.0 <\/code><\/pre>\n<p>  <b>NFS<\/b><\/p>\n<p>  \u041a\u0430\u0442\u0430\u043b\u043e\u0433 \/netboot\/nfs \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0447\u043a\u043e\u0439 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ISO-\u043e\u0431\u0440\u0430\u0437\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD CentOS.<\/p>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \/etc\/exports.d\/netboot.exports \u0434\u043b\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 CentOS \u0447\u0435\u0440\u0435\u0437 NFS \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"apache\">\/netboot\/nfs  -sec=sys,mp,async,no_root_squash,no_subtree_check  192.168.120.0\/24<\/code><\/pre>\n<p>  <b>HTTP \u0438 FTP<\/b><\/p>\n<p>  \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433e \/netboot\/http \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f ks.cfg \u2014 \u043a\u0438\u043a\u0441\u0442\u0430\u0440\u0442 \u0434\u043b\u044f CentOS, \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/netboot\/ftp \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f preseed.cfg \u2014 \u0430\u043d\u0430\u043b\u043e\u0433 \u043a\u0438\u043a\u0441\u0442\u0430\u0440\u0442\u0430 \u0434\u043b\u044f Astra Linux \u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 astra \u2014 \u0442\u043e\u0447\u043a\u0430 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ISO-\u043e\u0431\u0440\u0430\u0437\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD Astra Linux.<\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043f\u043e\u043b\u043d\u043e\u0432\u0435\u0441\u043d\u044b\u0445 \u0432\u0435\u0431- \u0438 FTP-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0430\u043f\u043f\u043b\u0435\u0442\u0430\u043c\u0438 busybox\u2019\u0430. \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u0445 \u043a\u0430\u043a \u0441\u043b\u0443\u0436\u0431 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u043e\u0448\u0451\u043b Systemd.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u0443 \/etc\/systemd\/system\/httpd@.service:<\/p>\n<pre><code class=\"apache\">[Unit] Description=Busybox HTTPd Requires=httpd.socket  [Service] Type=simple ExecStart=\/sbin\/httpd -h \/netboot\/http\/ -vvfi StandardInput=socket StandardError=journal TimeoutStopSec=60  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p>  \u0418 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0435\u0439 \u0441\u043e\u043a\u0435\u0442 \/etc\/systemd\/system\/httpd.socket:<\/p>\n<pre><code class=\"apache\">[Unit] Description=Busybox HTTPd  [Socket] ListenStream=192.168.120.1:80 Accept=yes  [Install] WantedBy=sockets.target <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u0443 \/etc\/systemd\/system\/ftpd@.service:<\/p>\n<pre><code class=\"apache\">[Unit] Description=Busybox FTPd Requires=ftpd.socket  [Service] Type=simple ExecStart=\/sbin\/ftpd \/netboot\/ftp StandardInput=socket StandardError=journal TimeoutStopSec=60  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p>  \u0418 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0435\u0439 \u0441\u043e\u043a\u0435\u0442 \/etc\/systemd\/system\/ftpd.socket:<\/p>\n<pre><code class=\"apache\">[Unit] Description=Busybox FTPd  [Socket] ListenStream=192.168.120.1:21 Accept=yes  [Install] WantedBy=sockets.target <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u043a httpd \u0438 ftpd \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0441\u043e\u043a\u0435\u0442\u0430 Systemd:<\/p>\n<pre><code class=\"apache\">systemctl start httpd.socket systemctl start ftpd.socket <\/code><\/pre>\n<p>  <b>CIFS<\/b><\/p>\n<p>  \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \/netboot\/smb \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0432\u0430 \u043f\u0443\u0441\u0442\u044b\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 2k16 \u0438 virtio), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f ISO-\u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD Windows Server \u0438 ISO-\u043e\u0431\u0440\u0430\u0437\u0430 \u0441 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430\u043c\u0438 Virtio \u0434\u043b\u044f Windows. \u041f\u0440\u0430\u0432\u0434\u0430, \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432 \u043f\u0440\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Windows Server \u0431\u044b\u043b\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u0438\u0434\u0438\u043c\u043e, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432 ISO-\u043e\u0431\u0440\u0430\u0437 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u043e\u0433\u043e DVD Windows Server.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432 \/netboot\/smb \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0444\u0430\u0439\u043b autounattend.xml \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Windows Server.<\/p>\n<p>  \u0427\u0430\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \/etc\/samba\/smb.conf, \u043a\u0430\u0441\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Windows Server, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"apache\">[global] workgroup = AMN netbios name = HOST interfaces = 192.168.120.1\/255.255.255.0 bind interfaces only = yes load printers = no show add printer wizard = no server string = My notebook disable netbios = yes  [public] comment = Public hosts allow = 192.168.120.0\/255.255.255.0 path = \/netboot\/smb force user = nobody force group = nobody create mask = 0644 directory mask = 0755 read only = yes guest ok = yes oplocks = no level2 oplocks = no locking = no acl allow execute always = yes <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0444\u0430\u0439\u043b winpe.wim \u0431\u044b\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ADK, \u0432 \u043d\u0435\u0433\u043e \u0431\u044b\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 Virtio (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e viostor \u0438 netkvm), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 startnet.cmd:<\/p>\n<p>  <code>@echo off<br \/>  chcp 65001<\/p>\n<p>  echo.<br \/>  echo \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e wpeinit.<br \/>  echo.<br \/>  wpeinit<\/p>\n<p>  echo \u041d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0442\u0440\u0438 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b WinPE:<br \/>  echo 1) \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443.<br \/>  echo.<br \/>  echo 2) \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<br \/>  echo Windows Server 2016 Standard.<br \/>  echo.<br \/>  echo 3) \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439<br \/>  echo \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Windows Server 2016 Standard <br \/>  echo.<br \/>  echo \u0414\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0435\u043c\u0443 \u0446\u0438\u0444\u0440\u0443, <br \/>  echo \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0443 Enter (\u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0439 \u0432\u0432\u043e\u0434 = 1 \u043f\u0443\u043d\u043a\u0442). <br \/>  set \/p ID=<br \/>  echo.<\/p>\n<p>  if %ID%==1 goto :first<br \/>  if %ID%==2 goto :second<br \/>  if %ID%==3 goto :third<br \/>  if %ID% GTR 3 goto :failure<br \/>  if %ID% LSS 3 goto :failure<br \/>  exit \/b<\/p>\n<p>  :second<br \/>  echo \u0412\u044b\u0431\u0440\u0430\u043d \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 2<br \/>  echo.<br \/>  echo \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u044e \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441.<br \/>  net use S: \\\\192.168.120.1\\public<br \/>  echo \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e S:\\2k16\\setup.exe<br \/>  S:\\2k16\\setup.exe<br \/>  exit \/b<\/p>\n<p>  :third<br \/>  echo \u0412\u044b\u0431\u0440\u0430\u043d \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 3<br \/>  echo.<br \/>  echo \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u044e \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441.<br \/>  net use S: \\\\192.168.120.1\\public<br \/>  echo \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443: S:\\2k16\\setup.exe \/unattend:S:\\autounattend.xml<br \/>  S:\\2k16\\setup.exe \/unattend:S:\\autounattend.xml<br \/>  exit \/b<\/p>\n<p>  :first<br \/>  echo \u0412\u044b\u0431\u0440\u0430\u043d \u043f\u0443\u043d\u043a\u0442 \u043c\u0435\u043d\u044e \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 1<br \/>  echo.<\/p>\n<p>  :failure<br \/>  echo.<br \/>  echo \u041c\u043e\u043d\u0442\u0438\u0440\u0443\u044e \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441.<br \/>  net use S: \\\\192.168.120.1\\public<br \/>  exit \/b<br \/>  <\/code>  <\/p>\n<h3>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 Windows Server \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 VNC. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0432\u043e\u0434 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0432 \u043e\u043a\u043d\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 VNC, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438. \u0414\u043b\u044f Wayland\u2019\u0430 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 ydotool, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043f\u0440\u0430\u0432\u0434\u0430, \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0430\u0441\u044c. \u0415\u044e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u043b\u0438\u0442\u043e\u0447\u043d\u043e\u043c \u043e\u043a\u043e\u043d\u043d\u043e\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0435 sway, \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0435 \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 gvncviewer \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043c\u0435\u0441\u0442\u0435 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<p>  Ydotool \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c uinput, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0435\u0433\u043e \u0438 \u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0433\u0440\u0443\u043f\u043f\u0435 wheel, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0443\u0447\u0451\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c (\u0434\u0430\u043b\u0435\u0435 \u0423\u0417):<\/p>\n<pre><code class=\"apache\">modprobe uinput chgrp wheel \/dev\/uinput chmod g+rw \/dev\/uinput <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c, \u0443\u0436\u0435 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0423\u0417 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0434\u0435\u043c\u043e\u043d ydotoold:<\/p>\n<pre><code class=\"apache\">ydotoold &amp;<\/code><\/pre>\n<p>  \u0413\u043e\u0442\u043e\u0432\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c gvncviewer \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u0412\u041c. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0434\u0430\u0451\u043c \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0447\u0435\u0440\u0435\u0434\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 (\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0441\u0442\u0440\u043e\u043a \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0447\u0442\u0435\u043d\u0438\u044f):<\/p>\n<pre><code class=\"apache\">ydotool mousemove 350 15; ydotool click 1; ydotool key Alt+s; ydotool type d; sleep 5; ydotool type P@ssw0rd; ydotool key Enter <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0443\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<ol>\n<li>\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u043a\u043d\u043e gvncviewer,<\/li>\n<li>\u0432\u044b\u0431\u043e\u0440 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e \u00abSend Key \u2192 Ctrl+Alt+Del\u00bb,<\/li>\n<li>\u043f\u044f\u0442\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u043d\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043a\u043d\u0430 \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430,<\/li>\n<li>\u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f,<\/li>\n<li>\u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 Enter.<\/li>\n<\/ol>\n<p>  <\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<p>  <\/p>\n<ol>\n<li><a href=\"http:\/\/pavsh.ru\/official\/non-koncerts\/stemsite-frolov\/public\/prosp\/legendy.htm\">pavsh.ru\/official\/non-koncerts\/stemsite-frolov\/public\/prosp\/legendy.htm<\/a> \u2014 \u044d\u043f\u0438\u0433\u0440\u0430\u0444.<\/li>\n<li><a href=\"http:\/\/gpo.zugaina.org\">gpo.zugaina.org<\/a> \u2014 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u043e\u0432\u0435\u0440\u043b\u0435\u044f\u043c Gentoo, Funtoo \u0438 Zentoo.<\/li>\n<li><a href=\"https:\/\/gitlab.com\/Perfect_Gentleman\/PG_Overlay\">gitlab.com\/Perfect_Gentleman\/PG_Overlay<\/a> \u2014 \u0434\u043e\u043c\u0430\u0448\u043d\u044f\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043e\u0432\u0435\u0440\u043b\u0435\u044f pg_overlay.<\/li>\n<li><a href=\"https:\/\/qemu-project.gitlab.io\/qemu\/\">qemu-project.gitlab.io\/qemu<\/a> \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Qemu.<\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/infowatch\/blog\/492260\/\">habr.com\/ru\/company\/infowatch\/blog\/492260<\/a> \u2014 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 nft, \u0443\u0436\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043d\u0430 Systemd.<\/li>\n<li><a href=\"https:\/\/fedorapeople.org\/groups\/virt\/virtio-win\/direct-downloads\/latest-virtio\/\">fedorapeople.org\/groups\/virt\/virtio-win\/direct-downloads\/latest-virtio<\/a> \u2014 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 Virtio \u0434\u043b\u044f Windows.<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/ru-ru\/windows-hardware\/get-started\/adk-install\">docs.microsoft.com\/ru-ru\/windows-hardware\/get-started\/adk-install<\/a> \u2014 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 Windows (Windows ADK).<\/li>\n<\/ol>\n<p>  <b>\u0410\u0432\u0442\u043e\u0440 \u0441\u0442\u0430\u0442\u044c\u0438:<\/b> \u0428\u0430\u043c\u0438\u043b\u044c \u0421\u0430\u0438\u0442\u043e\u0432 <a href=\"https:\/\/habr.com\/ru\/users\/nikodim_tychoblin\/\" class=\"user_link\">Nikodim_Tychoblin<\/a><br \/>  <i>\u00ab\u0412 \u043b\u0435\u0442\u043e 7529\u00bb<\/i><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/575018\/\"> https:\/\/habr.com\/ru\/articles\/575018\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/4b\/qt\/zv\/4bqtzvevydrpiuqqrqw5nrzebeu.jpeg\" alt=\"image\" data-src=\"https:\/\/habrastorage.org\/webt\/4b\/qt\/zv\/4bqtzvevydrpiuqqrqw5nrzebeu.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u00ab\u0421\u043a\u0430\u0436\u0438 \u043c\u043d\u0435, \u0420\u043e\u0436\u0434\u0451\u043d\u043d\u044b\u0439 \u0416\u0435\u043d\u0449\u0438\u043d\u043e\u0439,<br \/>   \u2014 \u0432\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u041a\u0440\u0438\u0448\u043d\u0430,<br \/>  \u041a\u0443\u0434\u0430 \u0434\u0432\u0438\u0436\u0443\u0442\u0441\u044f \u044d\u0442\u0438 \u043c\u0438\u0440\u044b,<br \/>  \u0417\u0430\u0447\u0435\u043c \u0437\u043b\u043e\u0439 \u041f\u0430\u0440\u0432\u0430\u043d\u0430 \u043f\u043e \u043d\u043e\u0447\u0430\u043c \u043e\u0445\u043e\u0442\u0438\u0442\u0441\u044f<br \/>   \u0437\u0430 \u0441\u0432\u043e\u0435\u0439 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e,<br \/>  \u0418 \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043b\u0430\u0441\u0442\u043e\u0447\u043a\u0438 \u0411\u0448\u0430\u043a\u0442\u0438 \u0434\u0432\u0435 \u043d\u043e\u0433\u0438,<br \/>   \u0430 \u0443 \u041c\u0435\u043d\u044f \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435?\u00bb<br \/>   \u2014 \u042d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e, \u2014 \u0441\u043a\u0430\u0437\u0430\u043b \u0410\u0440\u0434\u0436\u0443\u043d\u0430, \u2014  \u0431\u0435\u0440\u0451\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u041f\u043e\u0439\u043d\u0442\u0438\u043d\u0433\u0430\u2026<br \/>  \u0411\u0425\u0410\u0413\u0410\u0412\u0410\u0414-\u0413\u0418\u0422\u0410 (\u043c\u043b. \u0442\u0438\u0431\u0435\u0442\u0441\u043a\u0430\u044f)<br \/>  \u0417\u0430\u043f\u0435\u0432 30 \u0442\u043e\u043c\u0430  <\/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-408687","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408687","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=408687"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/408687\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}