# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Vladlen Popolitov , 2025, 2026. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2025-11-08 16:17+0000\n" "PO-Revision-Date: 2026-03-09 04:45+0000\n" "Last-Translator: Vladlen Popolitov \n" "Language-Team: Russian \n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/books/handbook/virtualization/_index.adoc:1 #, no-wrap msgid "Virtualization software allows multiple operating systems to run simultaneously on the same computer" msgstr "Программное обеспечение виртуализации позволяет нескольким операционным системам работать одновременно на одном компьютере" #. type: YAML Front Matter: part #: documentation/content/en/books/handbook/virtualization/_index.adoc:1 #, no-wrap msgid "Part III. System Administration" msgstr "Часть III. Администрирование системы" #. type: YAML Front Matter: title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1 #, no-wrap msgid "Chapter 24. Virtualization" msgstr "Глава 24. Виртуализация" #. type: Title = #: documentation/content/en/books/handbook/virtualization/_index.adoc:15 #, no-wrap msgid "Virtualization" msgstr "Виртуализация" #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:53 #, no-wrap msgid "Synopsis" msgstr "Обзор" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:57 msgid "" "Virtualization software allows multiple operating systems to run " "simultaneously on the same computer. Such software systems for PCs often " "involve a host operating system which runs the virtualization software and " "supports any number of guest operating systems." msgstr "" "Программное обеспечение виртуализации позволяет нескольким операционным " "системам работать одновременно на одном компьютере. Такие программные " "системы для ПК часто включают основную операционную систему, которая " "запускает ПО виртуализации и поддерживает произвольное количество гостевых " "операционных систем." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:59 msgid "Read this chapter to learn:" msgstr "Прочтите эту главу, чтобы узнать:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:61 msgid "" "The difference between a host operating system and a guest operating system." msgstr "" "Разница между основной операционной системой и гостевой операционной " "системой." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:62 msgid "How to install FreeBSD on the following virtualization platforms:" msgstr "Как установить FreeBSD на следующие платформы виртуализации:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:63 msgid "Parallels Desktop(Apple(R) macOS(R))" msgstr "Parallels Desktop(Apple(R) macOS(R))" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:64 msgid "VMware Fusion(Apple(R) macOS(R))" msgstr "VMware Fusion(Apple(R) macOS(R))" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:65 msgid "" "VirtualBox(TM)(Microsoft(R) Windows(R), Intel(R)-based Apple(R) macOS(R), " "Linux)" msgstr "" "VirtualBox(TM)(Microsoft(R) Windows(R), Apple(R) macOS(R) на базе Intel(R), " "Linux)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:66 msgid "QEMU(FreeBSD)" msgstr "QEMU(FreeBSD)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:67 msgid "bhyve(FreeBSD)" msgstr "bhyve(FreeBSD)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:68 msgid "How to tune a FreeBSD system for best performance under virtualization." msgstr "" "Как настроить систему FreeBSD для достижения наилучшей производительности " "при виртуализации." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:70 msgid "Before reading this chapter:" msgstr "Прежде чем читать эту главу, необходимо:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:72 msgid "Understand the crossref:basics[basics,basics of UNIX(R) and FreeBSD]." msgstr "Понимать crossref:basics[basics,основы UNIX(R) и FreeBSD]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:73 msgid "Know how to crossref:bsdinstall[bsdinstall,install FreeBSD]." msgstr "Знать, как crossref:bsdinstall[bsdinstall,установить FreeBSD]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:74 msgid "" "Know how to crossref:advanced-networking[advanced-networking,set up a " "network connection]." msgstr "" "Уметь настраивать сетевое соединение, как описано в crossref:advanced-" "networking[advanced-networking,разделе по расширенной настройке сети]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:75 msgid "" "Know how to crossref:ports[ports,install additional third-party software]." msgstr "" "Знать, как crossref:ports[ports,установить дополнительное стороннее " "программное обеспечение]." #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:77 #, no-wrap msgid "FreeBSD as a Guest on Parallels Desktop for macOS(R)" msgstr "FreeBSD в качестве гостевой системы в Parallels Desktop для macOS(R)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:82 msgid "" "Parallels Desktop for Mac(R) is a commercial software product available for " "Apple(R) Mac(R) computers running macOS(R) 10.14.6 or higher. FreeBSD is a " "fully supported guest operating system. Once Parallels has been installed " "on macOS(R), the user must configure a virtual machine and then install the " "desired guest operating system." msgstr "" "Parallels Desktop for Mac(R) - это коммерческий программный продукт, " "доступный для компьютеров Apple(R) Mac(R) под управлением macOS(R) 10.14.6 " "или новее. FreeBSD является полностью поддерживаемой гостевой операционной " "системой. После установки Parallels на macOS(R) пользователь должен " "настроить виртуальную машину и затем установить желаемую гостевую " "операционную систему." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:84 #, no-wrap msgid "Installing FreeBSD on Parallels Desktop on Mac(R)" msgstr "Установка FreeBSD на Parallels Desktop на Mac(R)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:87 msgid "" "The first step in installing FreeBSD on Parallels is to create a new virtual " "machine for installing FreeBSD." msgstr "" "Первым шагом при установке FreeBSD на Parallels является создание новой " "виртуальной машины для установки FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:89 msgid "" "Choose menu:Install Windows or another OS from a DVD or image file[] and " "proceed." msgstr "" "Выберите menu:Установка Windows или другой ОС с DVD или файла образа[] и " "продолжите." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:90 #, no-wrap msgid "Parallels setup wizard showing Install Windows or another OS from a DVD or image file chosen" msgstr "Мастер настройки Parallels с выбранным пунктом \"Установить Windows или другую ОС с DVD или из файла образа\"" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:90 #, no-wrap msgid "parallels-freebsd1.png" msgstr "parallels-freebsd1.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:93 msgid "Select the FreeBSD image file." msgstr "Выберите файл образа FreeBSD." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:94 #, no-wrap msgid "Parallels setup wizard showing FreeBSD image file selected" msgstr "Мастер настройки Parallels с выбранным образом FreeBSD" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:94 #, no-wrap msgid "parallels-freebsd2.png" msgstr "parallels-freebsd2.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:97 msgid "Choose menu:Other as operating system[]." msgstr "Выберите menu:Другое в качестве операционной системы[]." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:101 msgid "Choosing FreeBSD will cause boot error on startup." msgstr "Выбор FreeBSD приведет к ошибке загрузки при запуске." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:103 #, no-wrap msgid "Parallels setup wizard showing Other selected as operating system" msgstr "Мастер настройки Parallels, показывающий \"Другое как операционной система\"" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:103 #, no-wrap msgid "parallels-freebsd3.png" msgstr "parallels-freebsd3.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:106 msgid "" "Name the virtual machine and check menu:Customize settings before " "installation[]" msgstr "" "Назовите виртуальную машину и отметьте пункт menu:Настроить параметры перед " "установкой (Customize settings before installation)[]" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:107 #, no-wrap msgid "Parallels setup wizard showing the checkbox checked for customizing settings before installation" msgstr "Мастер настройки Parallels с отмеченным флажком для настройки параметров перед установкой" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:107 #, no-wrap msgid "parallels-freebsd4.png" msgstr "parallels-freebsd4.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:111 msgid "" "When the configuration window pops up, go to menu:Hardware[] tab, choose " "menu:Boot order[], and click menu:Advanced[]. Then, choose *EFI 64-bit* as " "menu:BIOS[]." msgstr "" "Когда появится окно конфигурации, перейдите на вкладку menu:Hardware[], " "выберите menu:Boot order[] и нажмите menu:Advanced[]. Затем выберите *EFI 64-" "bit* в качестве menu:BIOS[]." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:112 #, no-wrap msgid "Parallels setup wizard showing EFI 64-bit chosen as BIOS" msgstr "Мастер настройки Parallels с выбранным EFI 64-bit в качестве BIOS" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:112 #, no-wrap msgid "parallels-freebsd5.png" msgstr "parallels-freebsd5.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:115 msgid "" "Click menu:OK[], close the configuration window, and click menu:Continue[]." msgstr "" "Нажмите menu:OK[], закройте окно конфигурации и нажмите menu:Continue[]." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:116 #, no-wrap msgid "Parallels setup wizard showing the summary of the new virtual machine" msgstr "Мастер настройки Parallels, отображающий сводную информацию о новой виртуальной машине" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:116 #, no-wrap msgid "parallels-freebsd6.png" msgstr "parallels-freebsd6.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:120 msgid "" "The virtual machine will automatically boot. Install FreeBSD following the " "general steps." msgstr "" "Виртуальная машина автоматически загрузится. Установите FreeBSD, следуя " "общим шагам." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:121 #, no-wrap msgid "FreeBSD booted on Parallels" msgstr "FreeBSD загружена в Parallels" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:121 #, no-wrap msgid "parallels-freebsd7.png" msgstr "parallels-freebsd7.png" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:124 #, no-wrap msgid "Configuring FreeBSD on Parallels" msgstr "Настройка FreeBSD на Parallels" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:127 msgid "" "After FreeBSD has been successfully installed on macOS(R) X with Parallels, " "there are a number of configuration steps that can be taken to optimize the " "system for virtualized operation." msgstr "" "После успешной установки FreeBSD на macOS(R) X с использованием Parallels, " "можно выполнить ряд шагов по настройке для оптимизации системы в виртуальной " "среде." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:130 #: documentation/content/en/books/handbook/virtualization/_index.adoc:243 msgid "Set Boot Loader Variables" msgstr "Установка переменных загрузчика" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:133 msgid "" "The most important step is to reduce the `kern.hz` tunable to reduce the CPU " "utilization of FreeBSD under the Parallels environment. This is " "accomplished by adding the following line to [.filename]#/boot/loader.conf#:" msgstr "" "Самый важный шаг — уменьшить параметр `kern.hz`, чтобы снизить использование " "CPU FreeBSD в среде Parallels. Это достигается добавлением следующей строки " "в [.filename]#/boot/loader.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:137 #: documentation/content/en/books/handbook/virtualization/_index.adoc:250 #, no-wrap msgid "kern.hz=100\n" msgstr "kern.hz=100\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:141 msgid "" "Without this setting, an idle FreeBSD Parallels guest will use roughly 15% " "of the CPU of a single processor iMac(R). After this change the usage will " "be closer to 5%." msgstr "" "Без этой настройки бездействующая гостевая система FreeBSD в Parallels будет " "использовать около 15% процессора однопроцессорного iMac(R). После внесения " "изменений использование снизится до примерно 5%." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:143 msgid "" "If installing FreeBSD 14.0 or later, and CPU utilization is still high, add " "the following additional line to [.filename]#/boot/loader.conf#:" msgstr "" "Если установлена FreeBSD 14.0 или более поздняя версия, а использование ЦП " "по-прежнему высокое, добавьте следующую строку в [.filename]#/boot/loader." "conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:147 #, no-wrap msgid "debug.acpi.disabled=\"ged\"\n" msgstr "debug.acpi.disabled=\"ged\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:149 #: documentation/content/en/books/handbook/virtualization/_index.adoc:255 msgid "Create a New Kernel Configuration File" msgstr "Создание нового файла конфигурации ядра" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:152 msgid "" "All SCSI, FireWire, and USB device drivers can be removed from a custom " "kernel configuration file. Parallels provides a virtual network adapter " "used by the man:ed[4] driver, so all network devices except for man:ed[4] " "and man:miibus[4] can be removed from the kernel." msgstr "" "Все драйверы SCSI, FireWire и USB могут быть удалены из конфигурационного " "файла собственного ядра. Parallels предоставляет виртуальный сетевой " "адаптер, используемый драйвером man:ed[4], поэтому все сетевые устройства, " "кроме man:ed[4] и man:miibus[4], могут быть удалены из ядра." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:153 #: documentation/content/en/books/handbook/virtualization/_index.adoc:259 msgid "Configure Networking" msgstr "Настройка сети" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:157 msgid "" "The most basic networking setup uses DHCP to connect the virtual machine to " "the same local area network as the host Mac(R). This can be accomplished by " "adding `ifconfig_ed0=\"DHCP\"` to [.filename]#/etc/rc.conf#. More advanced " "networking setups are described in crossref:advanced-networking[advanced-" "networking,Advanced Networking]." msgstr "" "Самая базовая настройка сети использует DHCP для подключения виртуальной " "машины к той же локальной сети, что и хост-компьютер Mac(R). Это можно " "сделать, добавив `ifconfig_ed0=\"DHCP\"` в [.filename]#/etc/rc.conf#. Более " "сложные настройки сети описаны в crossref:advanced-networking[advanced-" "networking,Расширенная настройка сети]." #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:159 #, no-wrap msgid "FreeBSD as a Guest on VMware Fusion for macOS(R)" msgstr "FreeBSD в качестве гостевой системы на VMware Fusion для macOS(R)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:164 msgid "" "VMware Fusion for Mac(R) is a commercial software product available for " "Apple(R) Mac(R) computers running macOS(R) 12 or higher. FreeBSD is a fully " "supported guest operating system. Once VMware Fusion has been installed on " "macOS(R), the user can configure a virtual machine and then install the " "desired guest operating system." msgstr "" "VMware Fusion для Mac(R) — это коммерческий программный продукт, доступный " "для компьютеров Apple(R) Mac(R) под управлением macOS(R) 12 или новее. " "FreeBSD является полностью поддерживаемой гостевой операционной системой. " "После установки VMware Fusion на macOS(R) пользователь может настроить " "виртуальную машину и установить желаемую гостевую операционную систему." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:166 #, no-wrap msgid "Installing FreeBSD on VMware Fusion" msgstr "Установка FreeBSD на VMware Fusion" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:170 msgid "" "The first step is to start VMware Fusion which will load the Virtual Machine " "Library. Click [.guimenuitem]#+->New# to create the virtual machine:" msgstr "" "Первым шагом является запуск VMware Fusion, который загрузит библиотеку " "виртуальных машин. Нажмите [.guimenuitem]#+->Создать#, чтобы создать " "виртуальную машину:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:171 #, no-wrap msgid "vmware-freebsd01.png" msgstr "vmware-freebsd01.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:175 msgid "" "This will load the New Virtual Machine Assistant. Choose [." "guimenuitem]#Create a custom virtual machine# and click [." "guimenuitem]#Continue# to proceed:" msgstr "" "Это запустит Мастер создания новой виртуальной машины. Выберите [." "guimenuitem]#Создать пользовательскую виртуальную машину# и нажмите [." "guimenuitem]#Продолжить#, чтобы продолжить:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:176 #, no-wrap msgid "vmware-freebsd02.png" msgstr "vmware-freebsd02.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:179 msgid "" "Select [.guimenuitem]#Other# as the [.guimenuitem]#Operating System# and " "either [.guimenuitem]#FreeBSD X# or [.guimenuitem]#FreeBSD X 64-bit#, as the " "menu:Version[] when prompted:" msgstr "" "Выберите [.guimenuitem]#Другое# в качестве [.guimenuitem]#Операционной " "системы# и либо [.guimenuitem]#FreeBSD X#, либо [.guimenuitem]#FreeBSD X 64-" "bit# в качестве menu:Версия[] при запросе:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:180 #, no-wrap msgid "vmware-freebsd03.png" msgstr "vmware-freebsd03.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:183 msgid "Choose the firmware(UEFI is recommended):" msgstr "Выберите прошивку (рекомендуется UEFI):" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:184 #, no-wrap msgid "vmware-freebsd04.png" msgstr "vmware-freebsd04.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:187 msgid "" "Choose [.guimenuitem]#Create a new virtual disk# and click [." "guimenuitem]#Continue#:" msgstr "" "Выберите [.guimenuitem]#Создать новый виртуальный диск# и нажмите [." "guimenuitem]#Продолжить#:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:188 #, no-wrap msgid "vmware-freebsd05.png" msgstr "vmware-freebsd05.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:191 msgid "Check the configuration and click [.guimenuitem]#Finish#:" msgstr "Проверьте конфигурацию и нажмите [.guimenuitem]#Завершить#:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:192 #, no-wrap msgid "vmware-freebsd06.png" msgstr "vmware-freebsd06.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:195 msgid "" "Choose the name of the virtual machine and the directory where it should be " "saved:" msgstr "" "Выберите имя виртуальной машины и каталог, в котором она будет сохранена:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:196 #, no-wrap msgid "vmware-freebsd07.png" msgstr "vmware-freebsd07.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:199 msgid "" "Press command+E to open virtual machine settings and click [.guimenuitem]#CD/" "DVD#:" msgstr "" "Нажмите command+E, чтобы открыть настройки виртуальной машины, и выберите [." "guimenuitem]#CD/DVD#:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:200 #, no-wrap msgid "vmware-freebsd08.png" msgstr "vmware-freebsd08.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:203 msgid "Choose FreeBSD ISO image or from a CD/DVD:" msgstr "Выберите образ FreeBSD в формате ISO или с CD/DVD:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:204 #: documentation/content/en/books/handbook/virtualization/_index.adoc:226 #, no-wrap msgid "vmware-freebsd09.png" msgstr "vmware-freebsd09.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:207 msgid "Start the virtual machine:" msgstr "Запустите виртуальную машину:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:208 #, no-wrap msgid "vmware-freebsd10.png" msgstr "vmware-freebsd10.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:211 msgid "Install FreeBSD as usual:" msgstr "Установите FreeBSD как обычно:" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:212 #, no-wrap msgid "vmware-freebsd11.png" msgstr "vmware-freebsd11.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:215 msgid "" "Once the install is complete, the settings of the virtual machine can be " "modified, such as memory usage and the number of CPUs the virtual machine " "will have access to:" msgstr "" "После завершения установки можно изменить параметры виртуальной машины, " "такие как использование памяти и количество процессоров, доступных " "виртуальной машине:" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:219 msgid "" "The System Hardware settings of the virtual machine cannot be modified while " "the virtual machine is running." msgstr "" "Настройки аппаратного обеспечения системы виртуальной машины нельзя изменить " "во время её работы." #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:221 #, no-wrap msgid "vmware-freebsd12.png" msgstr "vmware-freebsd12.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:225 msgid "" "The status of the CD-ROM device. Normally the CD/DVD/ISO is disconnected " "from the virtual machine when it is no longer needed." msgstr "" "Состояние устройства CD-ROM. Обычно CD/DVD/ISO отключается от виртуальной " "машины, когда в нём больше нет необходимости." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:231 msgid "" "The last thing to change is how the virtual machine will connect to the " "network. To allow connections to the virtual machine from other machines " "besides the host, choose [.guimenuitem]#Connect directly to the physical " "network (Bridged)#. Otherwise, [.guimenuitem]#Share the host's internet " "connection (NAT)# is preferred so that the virtual machine can have access " "to the Internet, but the network cannot access the virtual machine." msgstr "" "Последнее, что нужно изменить, — это способ подключения виртуальной машины к " "сети. Чтобы разрешить подключения к виртуальной машине с других машин, кроме " "хоста, выберите [.guimenuitem]#Подключиться напрямую к физической сети " "(Bridged)#. В противном случае предпочтительнее выбрать [." "guimenuitem]#Использовать интернет-подключение хоста (NAT)#, чтобы " "виртуальная машина имела доступ в Интернет, но сеть не могла получить доступ " "к виртуальной машине." #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:232 #, no-wrap msgid "vmware-freebsd13.png" msgstr "vmware-freebsd13.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:235 msgid "" "After modifying the settings, boot the newly installed FreeBSD virtual " "machine." msgstr "" "После изменения настроек загрузите новую виртуальную машину с установленной " "FreeBSD." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:237 #, no-wrap msgid "Configuring FreeBSD on VMware Fusion" msgstr "Настройка FreeBSD на VMware Fusion" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:240 msgid "" "After FreeBSD has been successfully installed on macOS(R) X with VMware " "Fusion, there are a number of configuration steps that can be taken to " "optimize the system for virtualized operation." msgstr "" "После успешной установки FreeBSD на macOS(R) X с использованием VMware " "Fusion можно выполнить ряд шагов по настройке для оптимизации системы в " "виртуальной среде." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:246 msgid "" "The most important step is to reduce the `kern.hz` tunable to reduce the CPU " "utilization of FreeBSD under the VMware Fusion environment. This is " "accomplished by adding the following line to [.filename]#/boot/loader.conf#:" msgstr "" "Самый важный шаг — уменьшить параметр `kern.hz`, чтобы снизить использование " "CPU FreeBSD в среде VMware Fusion. Это достигается добавлением следующей " "строки в [.filename]#/boot/loader.conf#:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:254 msgid "" "Without this setting, an idle FreeBSD VMware Fusion guest will use roughly " "15% of the CPU of a single processor iMac(R). After this change, the usage " "will be closer to 5%." msgstr "" "Без этой настройки бездействующая гостевая система FreeBSD в VMware Fusion " "будет использовать около 15% процессора однопроцессорного iMac(R). После " "внесения изменений использование снизится до примерно 5%." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:258 msgid "" "All FireWire, and USB device drivers can be removed from a custom kernel " "configuration file. VMware Fusion provides a virtual network adapter used " "by the man:em[4] driver, so all network devices except for man:em[4] can be " "removed from the kernel." msgstr "" "Все драйверы устройств FireWire и USB могут быть удалены из файла " "конфигурации собственного ядра. VMware Fusion предоставляет виртуальный " "сетевой адаптер, используемый драйвером man:em[4], поэтому все сетевые " "устройства, кроме man:em[4], могут быть удалены из ядра." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:263 msgid "" "The most basic networking setup uses DHCP to connect the virtual machine to " "the same local area network as the host Mac(R). This can be accomplished by " "adding `ifconfig_em0=\"DHCP\"` to [.filename]#/etc/rc.conf#. More advanced " "networking setups are described in crossref:advanced-networking[advanced-" "networking,Advanced Networking]." msgstr "" "Самая базовая настройка сети использует DHCP для подключения виртуальной " "машины к той же локальной сети, что и хост-компьютер Mac(R). Это можно " "сделать, добавив `ifconfig_em0=\"DHCP\"` в [.filename]#/etc/rc.conf#. Более " "сложные настройки сети описаны в crossref:advanced-networking[advanced-" "networking,Сложные вопросы работы в сети]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:265 msgid "Install drivers and open-vm-tools" msgstr "Установите драйверы и open-vm-tools" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:267 msgid "To run FreeBSD smoothly on VMWare, drivers should be installed:" msgstr "" "Для бесперебойной работы FreeBSD на VMWare необходимо установить драйверы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:271 #, no-wrap msgid "# pkg install xf86-video-vmware xf86-input-vmmouse open-vm-tools\n" msgstr "# pkg install xf86-video-vmware xf86-input-vmmouse open-vm-tools\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:276 msgid "The xf86 packages are only available for x86 FreeBSD guests." msgstr "" "Пакеты xf86 доступны только для гостевых систем FreeBSD на архитектуре x86." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:280 #, no-wrap msgid "Enabling the mouse" msgstr "Включение мыши" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:284 msgid "" "Some users have reported issues using the mouse in the virtual machine. The " "mouse may be enabled by appending the following to [.filename]#/boot/loader." "conf#:" msgstr "" "Некоторые пользователи сообщали о проблемах с использованием мыши в " "виртуальной машине. Мышь можно включить, добавив следующее в [.filename]#/" "boot/loader.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:288 #, no-wrap msgid "# ums_load=“YES”\n" msgstr "# ums_load=“YES”\n" #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:292 #, no-wrap msgid "FreeBSD as a Guest on VirtualBox(TM)" msgstr "FreeBSD в качестве гостевой системы в VirtualBox(TM)" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:296 msgid "" "FreeBSD works well as a guest in VirtualBox(TM). The virtualization " "software is available for most common operating systems, including FreeBSD " "itself." msgstr "" "FreeBSD хорошо работает в качестве гостевой системы в VirtualBox(TM). Это " "программное обеспечение виртуализации доступно для большинства " "распространённых операционных систем, включая саму FreeBSD." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:298 msgid "The VirtualBox(TM) guest additions provide support for:" msgstr "Дополнения гостевой ОС VirtualBox(TM) обеспечивают поддержку:" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:300 msgid "Clipboard sharing." msgstr "Общий буфер обмена." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:301 msgid "Mouse pointer integration." msgstr "Интеграция указателя мыши." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:302 msgid "Host time synchronization." msgstr "Синхронизация времени хоста." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:303 msgid "Window scaling." msgstr "Масштабирование окна." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:304 msgid "Seamless mode." msgstr "Бесшовный режим." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:308 msgid "These commands are run in the FreeBSD guest." msgstr "Эти команды выполняются в гостевой системе FreeBSD." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:312 msgid "" "First, install the package:emulators/virtualbox-ose-additions[] package or " "port in the FreeBSD guest. This will install the port:" msgstr "" "Сначала установите пакет или порт package:emulators/virtualbox-ose-" "additions[]` в гостевой системе FreeBSD. Это установит порт:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:316 #, no-wrap msgid "# cd /usr/ports/emulators/virtualbox-ose-additions && make install clean\n" msgstr "# cd /usr/ports/emulators/virtualbox-ose-additions && make install clean\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:319 msgid "Add these lines to [.filename]#/etc/rc.conf#:" msgstr "Добавьте следующие строки в файл [.filename]#/etc/rc.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:324 #, no-wrap msgid "" "vboxguest_enable=\"YES\"\n" "vboxservice_enable=\"YES\"\n" msgstr "" "vboxguest_enable=\"YES\"\n" "vboxservice_enable=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:327 msgid "" "If man:ntpd[8] or man:ntpdate[8] is used, disable host time synchronization:" msgstr "" "Если используется man:ntpd[8] или man:ntpdate[8], отключите синхронизацию " "времени хоста:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:331 #, no-wrap msgid "vboxservice_flags=\"--disable-timesync\"\n" msgstr "vboxservice_flags=\"--disable-timesync\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:335 msgid "" "Xorg will automatically recognize the `vboxvideo` driver. It can also be " "manually entered in [.filename]#/etc/X11/xorg.conf#:" msgstr "" "Xorg автоматически распознает драйвер `vboxvideo`. Его также можно вручную " "добавить в [.filename]#/etc/X11/xorg.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:344 #, no-wrap msgid "" "Section \"Device\"\n" "\tIdentifier \"Card0\"\n" "\tDriver \"vboxvideo\"\n" "\tVendorName \"InnoTek Systemberatung GmbH\"\n" "\tBoardName \"VirtualBox Graphics Adapter\"\n" "EndSection\n" msgstr "" "Section \"Device\"\n" "\tIdentifier \"Card0\"\n" "\tDriver \"vboxvideo\"\n" "\tVendorName \"InnoTek Systemberatung GmbH\"\n" "\tBoardName \"VirtualBox Graphics Adapter\"\n" "EndSection\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:347 msgid "" "To use the `vboxmouse` driver, adjust the mouse section in [.filename]#/etc/" "X11/xorg.conf#:" msgstr "" "Чтобы использовать драйвер `vboxmouse`, измените раздел мыши в [.filename]#/" "etc/X11/xorg.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:354 #, no-wrap msgid "" "Section \"InputDevice\"\n" "\tIdentifier \"Mouse0\"\n" "\tDriver \"vboxmouse\"\n" "EndSection\n" msgstr "" "Section \"InputDevice\"\n" "\tIdentifier \"Mouse0\"\n" "\tDriver \"vboxmouse\"\n" "EndSection\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:359 msgid "" "Shared folders for file transfers between host and VM are accessible by " "mounting them using `mount_vboxvfs`. A shared folder can be created on the " "host using the VirtualBox GUI or via `vboxmanage`. For example, to create a " "shared folder called _myshare_ under [.filename]#/mnt/bsdboxshare# for the " "VM named _BSDBox_, run:" msgstr "" "Общие папки для передачи файлов между хостом и виртуальной машиной доступны " "путем их монтирования с помощью `mount_vboxvfs`. Общую папку можно создать " "на хосте через графический интерфейс VirtualBox или с помощью `vboxmanage`. " "Например, чтобы создать общую папку с именем _myshare_ в [.filename]#/mnt/" "bsdboxshare# для виртуальной машины с именем _BSDBox_, выполните:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:363 #, no-wrap msgid "# vboxmanage sharedfolder add 'BSDBox' --name myshare --hostpath /mnt/bsdboxshare\n" msgstr "# vboxmanage sharedfolder add 'BSDBox' --name myshare --hostpath /mnt/bsdboxshare\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:367 msgid "" "Note that the shared folder name must not contain spaces. Mount the shared " "folder from within the guest system like this:" msgstr "" "Обратите внимание, что имя общей папки не должно содержать пробелов. " "Подключите общую папку из гостевой системы следующим образом:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:371 #, no-wrap msgid "# mount_vboxvfs -w myshare /mnt\n" msgstr "# mount_vboxvfs -w myshare /mnt\n" #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:374 #, no-wrap msgid "FreeBSD as a Host with VirtualBox(TM)" msgstr "FreeBSD в качестве хоста с VirtualBox(TM)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:382 msgid "" "VirtualBox(TM) is an actively developed, complete virtualization package, " "that is available for most operating systems including Windows(R), macOS(R), " "Linux(R) and FreeBSD. It is equally capable of running Windows(R) or " "UNIX(R)-like guests. It is released as open source software, but with " "closed-source components available in a separate extension pack. These " "components include support for USB 2.0 devices. More information may be " "found on the http://www.virtualbox.org/wiki/Downloads[Downloads page of the " "VirtualBox(TM) wiki]. Currently, these extensions are not available for " "FreeBSD." msgstr "" "VirtualBox(TM) — это активно развивающийся комплексный пакет виртуализации, " "доступный для большинства операционных систем, включая Windows(R), macOS(R), " "Linux(R) и FreeBSD. Он одинаково хорошо подходит для запуска гостевых систем " "Windows(R) или UNIX(R)-подобных ОС. Программа распространяется как открытое " "программное обеспечение, но с проприетарными компонентами, доступными в " "отдельном пакете расширений. Эти компоненты включают поддержку устройств USB " "2.0. Дополнительную информацию можно найти на http://www.virtualbox.org/wiki/" "Downloads[странице загрузок вики VirtualBox(TM)]. В настоящее время эти " "расширения недоступны для FreeBSD." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:384 #, no-wrap msgid "Installing VirtualBox(TM)" msgstr "Установка VirtualBox(TM)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:388 msgid "" "VirtualBox(TM) is available as a FreeBSD package or port in package:" "emulators/virtualbox-ose[]. The port can be installed using these commands:" msgstr "" "VirtualBox(TM) доступен в FreeBSD как пакет или порт в package:emulators/" "virtualbox-ose[]. Порт можно установить с помощью следующих команд:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:393 #, no-wrap msgid "" "# cd /usr/ports/emulators/virtualbox-ose\n" "# make install clean\n" msgstr "" "# cd /usr/ports/emulators/virtualbox-ose\n" "# make install clean\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:398 msgid "" "One useful option in the port's configuration menu is the `GuestAdditions` " "suite of programs. These provide a number of useful features in guest " "operating systems, like mouse pointer integration (allowing the mouse to be " "shared between host and guest without the need to press a special keyboard " "shortcut to switch) and faster video rendering, especially in Windows(R) " "guests. The guest additions are available in the menu:Devices[] menu, after " "the installation of the guest is finished." msgstr "" "Одна полезная опция в меню настройки порта — набор программ " "`GuestAdditions`. Они предоставляют ряд полезных функций в гостевых " "операционных системах, таких как интеграция указателя мыши (позволяя " "использовать мышь совместно между хостом и гостем без необходимости нажатия " "специальной комбинации клавиш для переключения) и ускоренный рендеринг " "видео, особенно в гостевых системах Windows(R). Гостевые дополнения доступны " "в меню menu:Devices[] после завершения установки гостевой системы." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:401 msgid "" "A few configuration changes are needed before VirtualBox(TM) is started for " "the first time. The port installs a kernel module in [.filename]#/boot/" "modules# which must be loaded into the running kernel:" msgstr "" "Для начала работы с VirtualBox(TM) необходимо внести несколько изменений в " "конфигурацию. Порт устанавливает модуль ядра в [.filename]#/boot/modules#, " "который должен быть загружен в работающее ядро:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:405 #, no-wrap msgid "# kldload vboxdrv\n" msgstr "# kldload vboxdrv\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:408 msgid "" "To ensure the module is always loaded after a reboot, add this line to [." "filename]#/boot/loader.conf#:" msgstr "" "Чтобы модуль всегда загружался после перезагрузки, добавьте эту строку в [." "filename]#/boot/loader.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:412 #, no-wrap msgid "vboxdrv_load=\"YES\"\n" msgstr "vboxdrv_load=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:415 msgid "" "To use the kernel modules that allow bridged or host-only networking, add " "this line to [.filename]#/etc/rc.conf# and reboot the computer:" msgstr "" "Для использования модулей ядра, которые позволяют организовать мостовую или " "гостевую сеть, добавьте следующую строку в [.filename]#/etc/rc.conf# и " "перезагрузите компьютер:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:419 #, no-wrap msgid "vboxnet_enable=\"YES\"\n" msgstr "vboxnet_enable=\"YES\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:424 msgid "" "The `vboxusers` group is created during installation of VirtualBox(TM). All " "users that need access to VirtualBox(TM) will have to be added as members of " "this group. `pw` can be used to add new members:" msgstr "" "Группа `vboxusers` создается во время установки VirtualBox(TM). Все " "пользователи, которым необходим доступ к VirtualBox(TM), должны быть " "добавлены в эту группу. Для добавления новых участников можно использовать " "`pw`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:428 #, no-wrap msgid "# pw groupmod vboxusers -m username\n" msgstr "# pw groupmod vboxusers -m username\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:431 msgid "" "The default permissions for [.filename]#/dev/vboxnetctl# are restrictive and " "need to be changed for bridged networking:" msgstr "" "Настройки прав доступа по умолчанию для [.filename]#/dev/vboxnetctl# " "являются ограничительными и требуют изменения для работы мостового " "соединения:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:436 #, no-wrap msgid "" "# chown root:vboxusers /dev/vboxnetctl\n" "# chmod 0660 /dev/vboxnetctl\n" msgstr "" "# chown root:vboxusers /dev/vboxnetctl\n" "# chmod 0660 /dev/vboxnetctl\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:439 msgid "" "To make this permissions change permanent, add these lines to [.filename]#/" "etc/devfs.conf#:" msgstr "" "Чтобы сделать это изменение прав постоянным, добавьте следующие строки в [." "filename]#/etc/devfs.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:444 #, no-wrap msgid "" "own vboxnetctl root:vboxusers\n" "perm vboxnetctl 0660\n" msgstr "" "own vboxnetctl root:vboxusers\n" "perm vboxnetctl 0660\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:447 msgid "To launch VirtualBox(TM), type from an Xorg session:" msgstr "Для запуска VirtualBox(TM) введите в сеансе Xorg:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:451 #, no-wrap msgid "% VirtualBox\n" msgstr "% VirtualBox\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:455 msgid "" "For more information on configuring and using VirtualBox(TM), refer to the " "http://www.virtualbox.org[official website]. For FreeBSD-specific " "information and troubleshooting instructions, refer to the http://wiki." "FreeBSD.org/VirtualBox[relevant page in the FreeBSD wiki]." msgstr "" "Для получения дополнительной информации о настройке и использовании " "VirtualBox(TM) обратитесь к http://www.virtualbox.org[официальному сайту]. " "Информация, относящаяся к FreeBSD, и инструкции по устранению проблем " "доступны на http://wiki.FreeBSD.org/VirtualBox[соответствующей странице wiki " "FreeBSD]." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:457 #, no-wrap msgid "VirtualBox(TM) USB Support" msgstr "Поддержка USB в VirtualBox(TM)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:461 msgid "" "VirtualBox(TM) can be configured to pass USB devices through to the guest " "operating system. The host controller of the OSE version is limited to " "emulating USB 1.1 devices until the extension pack supporting USB 2.0 and " "3.0 devices becomes available on FreeBSD." msgstr "" "В VirtualBox(TM) можно настроить передачу USB-устройств в гостевую " "операционную систему. Хост-контроллер версии OSE ограничен эмуляцией USB 1.1 " "устройств до тех пор, пока расширение, поддерживающее USB 2.0 и 3.0 " "устройства, не станет доступным в FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:463 msgid "" "For VirtualBox(TM) to be aware of USB devices attached to the machine, the " "user needs to be a member of the `operator` group." msgstr "" "Чтобы VirtualBox(TM) мог обнаруживать USB-устройства, подключённые к машине, " "пользователь должен быть членом группы `operator`." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:467 #, no-wrap msgid "# pw groupmod operator -m username\n" msgstr "# pw groupmod operator -m username\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:470 msgid "" "Then, add the following to [.filename]#/etc/devfs.rules#, or create this " "file if it does not exist yet:" msgstr "" "Затем добавьте следующее в [.filename]#/etc/devfs.rules# или создайте этот " "файл, если он ещё не существует:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:475 #, no-wrap msgid "" "[system=10]\n" "add path 'usb/*' mode 0660 group operator\n" msgstr "" "[system=10]\n" "add path 'usb/*' mode 0660 group operator\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:478 msgid "" "To load these new rules, add the following to [.filename]#/etc/rc.conf#:" msgstr "" "Чтобы загрузить эти новые правила, добавьте следующее в [.filename]#/etc/rc." "conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:482 #, no-wrap msgid "devfs_system_ruleset=\"system\"\n" msgstr "devfs_system_ruleset=\"system\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:485 msgid "Then, restart devfs:" msgstr "Затем перезапустите devfs:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:489 #: documentation/content/en/books/handbook/virtualization/_index.adoc:517 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1919 #, no-wrap msgid "# service devfs restart\n" msgstr "# service devfs restart\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:492 msgid "" "Restart the login session and VirtualBox(TM) for these changes to take " "effect, and create USB filters as necessary." msgstr "" "Перезапустите сеанс входа и VirtualBox(TM), чтобы изменения вступили в силу, " "и при необходимости создайте фильтры USB." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:494 #, no-wrap msgid "VirtualBox(TM) Host DVD/CD Access" msgstr "Виртуальный DVD/CD-доступ хоста VirtualBox(TM)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:502 msgid "" "Access to the host DVD/CD drives from guests is achieved through the sharing " "of the physical drives. Within VirtualBox(TM), this is set up from the " "Storage window in the Settings of the virtual machine. If needed, create an " "empty IDECD/DVD device first. Then choose the Host Drive from the popup " "menu for the virtual CD/DVD drive selection. A checkbox labeled " "`Passthrough` will appear. This allows the virtual machine to use the " "hardware directly. For example, audio CDs or the burner will only function " "if this option is selected." msgstr "" "Доступ к DVD/CD-приводам хоста из гостевых систем обеспечивается путем " "совместного использования физических приводов. В VirtualBox(TM) это " "настраивается в окне `Хранилище` (Storage) в настройках (Settings) " "виртуальной машины. При необходимости сначала создайте пустое устройство " "IDECD/DVD. Затем выберите `Привод хоста` (Host drive) из всплывающего меню " "для выбора виртуального привода CD/DVD. Появится флажок с меткой `Сквозной " "доступ` (Passthrough). Это позволяет виртуальной машине использовать " "оборудование напрямую. Например, аудио-CD или записывающее устройство будут " "работать только при выборе этой опции." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:506 msgid "" "In order for users to be able to use VirtualBox(TM)DVD/CD functions, they " "need access to [.filename]#/dev/xpt0#, [.filename]#/dev/cdN#, and [." "filename]#/dev/passN#. This is usually achieved by making the user a member " "of `operator`. Permissions to these devices have to be corrected by adding " "these lines to [.filename]#/etc/devfs.conf#:" msgstr "" "Для того чтобы пользователи могли использовать функции VirtualBox(TM) для " "работы с DVD/CD, им необходим доступ к [.filename]#/dev/xpt0#, [.filename]#/" "dev/cdN# и [.filename]#/dev/passN#. Обычно это достигается путем добавления " "пользователя в группу `operator`. Права доступа к этим устройствам можно " "настроить, добавив следующие строки в [.filename]#/etc/devfs.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:512 #, no-wrap msgid "" "perm cd* 0660\n" "perm xpt0 0660\n" "perm pass* 0660\n" msgstr "" "perm cd* 0660\n" "perm xpt0 0660\n" "perm pass* 0660\n" #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:520 #, no-wrap msgid "Virtualization with QEMU on FreeBSD" msgstr "Виртуализация с QEMU на FreeBSD" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:524 msgid "" "link:https://www.qemu.org[QEMU] is a generic machine emulator and " "virtualizer that is completely open source software. It is developed by a " "large, active community and provides support for FreeBSD, OpenBSD, and " "NetBSD as well as other operating systems." msgstr "" "link:https://www.qemu.org[QEMU] — это универсальный эмулятор и виртуализатор " "машин, представляющий собой полностью открытое программное обеспечение. Он " "разрабатывается большим активным сообществом и поддерживает FreeBSD, " "OpenBSD, NetBSD, а также другие операционные системы." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:526 msgid "From the link:https://www.qemu.org/docs/master/[QEMU documentation]:" msgstr "link:https://www.qemu.org/docs/master/[Документация QEMU]:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:530 msgid "" "QEMU can be used in several different ways. The most common is for System " "Emulation, where it provides a virtual model of an entire machine (CPU, " "memory, and emulated devices) to run a guest OS. In this mode the CPU may " "be fully emulated, or it may work with a hypervisor such as `KVM`, `Xen` or " "`Hypervisor.Framework` to allow the guest to run directly on the host CPU." msgstr "" "QEMU можно использовать несколькими способами. Наиболее распространённый — " "это эмуляция системы, при которой предоставляется виртуальная модель всей " "машины (процессор, память и эмулируемые устройства) для запуска гостевой ОС. " "В этом режиме процессор может быть полностью эмулирован или работать с " "гипервизором, таким как `KVM`, `Xen` или `Hypervisor.Framework`, что " "позволяет гостевой системе выполняться непосредственно на процессоре хоста." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:533 msgid "" "The second supported way to use QEMU is User Mode Emulation, where QEMU can " "launch processes compiled for one CPU on another CPU. In this mode the CPU " "is always emulated." msgstr "" "Второй поддерживаемый способ использования QEMU — это эмуляция " "пользовательского режима, при которой QEMU может запускать процессы, " "скомпилированные для одного ЦП, на другом ЦП. В этом режиме ЦП всегда " "эмулируется." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:535 msgid "" "QEMU also provides a number of standalone command line utilities, such as " "the man:qemu-img[1] disk image utility that allows one to create, convert, " "and modify disk images." msgstr "" "QEMU также предоставляет ряд автономных утилит командной строки, таких как " "утилита для работы с образами дисков man:qemu-img[1], которая позволяет " "создавать, преобразовывать и изменять образы дисков." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:538 msgid "" "QEMU can emulate a wide number of architectures including `Arm(TM)`, `i386`, " "`x86_64`, `MIPS(TM)`, `s390X`, `SPARC(TM)` (Sparc(TM) and Sparc64(TM)), and " "others. The list of link:https://www.qemu.org/docs/master/system/targets." "html#system-targets-ref[QEMU System Emulator Targets] is regularly kept up " "to date." msgstr "" "QEMU может эмулировать широкий спектр архитектур, включая `Arm(TM)`, `i386`, " "`x86_64`, `MIPS(TM)`, `s390X`, `SPARC(TM)` (Sparc(TM) и Sparc64(TM)), и " "другие. Список link:https://www.qemu.org/docs/master/system/targets." "html#system-targets-ref[целевых систем QEMU System Emulator] регулярно " "обновляется." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:540 msgid "" "This section describes how to use QEMU for both System Emulation and User " "Mode Emulation on FreeBSD, and provides examples of using QMEU commands and " "command line utilities." msgstr "" "Этот раздел описывает, как использовать QEMU для системной эмуляции и " "эмуляции пользовательского режима в FreeBSD, а также содержит примеры " "использования команд QEMU и утилит командной строки." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:542 #, no-wrap msgid "Installing QEMU Software" msgstr "Установка программы QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:545 msgid "" "QEMU is available as a FreeBSD package or as a port in package:emulators/" "qemu[]. The package build includes sane options and defaults for most users " "and is the recommended method of installation." msgstr "" "QEMU доступен в виде пакета FreeBSD или порта в package:emulators/qemu[]. " "Сборка пакета включает разумные опции и настройки по умолчанию для " "большинства пользователей и является рекомендуемым способом установки." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:549 #, no-wrap msgid "# pkg install qemu\n" msgstr "# pkg install qemu\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:554 msgid "" "The package installation includes several dependencies. Once the " "installation is complete, create a link to the host version of QEMU that " "will be used most often. If the host is an Intel(TM) or AMD(TM) 64 bit " "system that will be:" msgstr "" "Установка пакета включает несколько зависимостей. После завершения установки " "создайте ссылку на основную версию QEMU для хоста, которая будет " "использоваться чаще всего. Если хост — 64-битная система Intel(TM) или " "AMD(TM), это будет:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:558 #, no-wrap msgid "# ln -s /usr/local/bin/qemu-system-x86_64 /usr/local/bin/qemu\n" msgstr "# ln -s /usr/local/bin/qemu-system-x86_64 /usr/local/bin/qemu\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:561 msgid "" "Test the installation by running the following command as a non-root user:" msgstr "" "Протестируйте установку, выполнив следующую команду от имени " "непривилегированного пользователя:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:565 #, no-wrap msgid "% qemu\n" msgstr "% qemu\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:571 msgid "" "This brings up a window with QEMU actively trying to boot from hard disk, " "floppy disk, DVD/CD, and PXE. Nothing has been set up yet, so the command " "will produce several errors and end with \"No bootable device\" as shown in " "crossref:virtualization[qemu-nullboot,Figure {counter:figure}]. However, it " "does show that the QEMU software has been installed correctly." msgstr "" "Открывается окно, в котором QEMU активно пытается загрузиться с жёсткого " "диска, дискеты, DVD/CD и PXE. Пока ничего не настроено, поэтому команда " "выдаст несколько ошибок и завершится сообщением «No bootable device» (Нет " "загрузочного устройства), как показано на crossref:virtualization[qemu-" "nullboot,рисунке {counter:figure}]. Тем не менее, это подтверждает, что ПО " "QEMU установлено корректно." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:573 #: documentation/content/en/books/handbook/virtualization/_index.adoc:574 #, no-wrap msgid "QEMU with no bootable image" msgstr "QEMU без загрузочного образа" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:574 #, no-wrap msgid "qemu-freebsd01.png" msgstr "qemu-freebsd01.png" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:577 #, no-wrap msgid "Virtual Machine Install" msgstr "Установка виртуальной машины" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:585 msgid "" "QEMU is under very active development. Features and command options can " "change from one version to the next. This section provides examples " "developed with QEMU version 9.0.1 (Summer, 2024). When in doubt, always " "consult the link:https://www.qemu.org/docs/master/[QEMU Documentation] " "particularly the link:https://www.qemu.org/docs/master/about/index." "html[About QEMU] page which has links to supported build platforms, " "emulation, deprecated features, and removed features." msgstr "" "QEMU находится в стадии активной разработки. Возможности и параметры команд " "могут меняться от одной версии к другой. В этом разделе приведены примеры, " "разработанные с использованием QEMU версии 9.0.1 (лето 2024 года). В случае " "сомнений всегда обращайтесь к link:https://www.qemu.org/docs/master/" "[документации QEMU], особенно к странице link:https://www.qemu.org/docs/" "master/about/index.html[О QEMU], где содержатся ссылки на поддерживаемые " "платформы сборки, эмуляцию, устаревшие и удалённые возможности." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:589 msgid "" "Follow the steps below to create two virtual machines named \"*left*\", and " "\"*right*\". Most commands can be performed without root privileges." msgstr "" "Выполните следующие шаги, чтобы создать две виртуальные машины с именами " "`*left*` и `*right*`. Большинство команд можно выполнять без привилегий root." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:591 msgid "Create a test environment to work with QEMU:" msgstr "Создайте тестовую среду для работы с QEMU:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:595 #, no-wrap msgid "% mkdir -p ~/QEMU ~/QEMU/SCRIPTS ~/QEMU/ISO ~/QEMU/VM\n" msgstr "% mkdir -p ~/QEMU ~/QEMU/SCRIPTS ~/QEMU/ISO ~/QEMU/VM\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:600 msgid "" "The [.filename]#SCRIPTS# directory is for startup scripts and utilities. " "The [.filename]#ISO# directory is for the guest ISO boot images. The [." "filename]#VM# directory is where the virtual machine images (`VMs`) will " "reside." msgstr "" "Каталог [.filename]#SCRIPTS# предназначен для стартовых скриптов и утилит. " "Каталог [.filename]#ISO# содержит загрузочные ISO-образы для гостевых " "систем. В каталоге [.filename]#VM# хранятся образы виртуальных машин (`ВМ`)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:602 msgid "Download a recent copy of FreeBSD into [.filename]#~/QEMU/ISO#:" msgstr "Скачайте свежую копию FreeBSD в [.filename]#~/QEMU/ISO#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:607 #, no-wrap msgid "" "% cd ~/QEMU/ISO\n" "% fetch https://download.freebsd.org/releases/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-amd64-bootonly.iso\n" msgstr "" "% cd ~/QEMU/ISO\n" "% fetch https://download.freebsd.org/releases/ISO-IMAGES/14.1/FreeBSD-14.1-RELEASE-amd64-bootonly.iso\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:611 msgid "" "Once the download is complete create a shorthand link. This shorthand link " "is used in the startup scripts below." msgstr "" "После завершения загрузки создайте сокращенную ссылку. Эта сокращенная " "ссылка используется в скриптах запуска ниже." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:615 #, no-wrap msgid "% ln -s FreeBSD-14.1-RELEASE-amd64-bootonly.iso fbsd.iso\n" msgstr "% ln -s FreeBSD-14.1-RELEASE-amd64-bootonly.iso fbsd.iso\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:618 msgid "" "Change directory to the location for virtual machines ([.filename]#~/QEMU/" "VM#). Run man:qemu-img[1] to create the disk images for the “left” VM:" msgstr "" "Перейдите в каталог для виртуальных машин ([.filename]#~/QEMU/VM#). " "Запустите man:qemu-img[1] для создания образов дисков виртуальной машины " "\"left\":" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:623 #, no-wrap msgid "" "% cd ~/QEMU/VM\n" "% qemu-img create -f raw left.img 15G\n" msgstr "" "% cd ~/QEMU/VM\n" "% qemu-img create -f raw left.img 15G\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:629 msgid "" "The QEMU `raw` format is designed for performance. The format is " "straightforward and has no overhead which makes it faster, especially for " "high performance or high throughput scenarios. The use case is for maximum " "performance where no additional features, such as snapshots, are needed. " "This format is used in the script for the \"left\" VM below." msgstr "" "Формат `raw` в QEMU предназначен для обеспечения высокой производительности. " "Этот формат прост и не имеет накладных расходов, что делает его быстрее, " "особенно в сценариях с высокой производительностью или высокой пропускной " "способностью. Он используется в случаях, когда требуется максимальная " "производительность, а дополнительные функции, такие как снимки состояния, не " "нужны. Этот формат используется в скрипте для виртуальной машины \"left\", " "приведённой ниже." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:636 msgid "" "A separate format is `qcow2` which uses QEMU's \"copy on write\" technique " "for managing disk space. This technique does not require a complete 15G " "disk, just a stub version that is managed directly by the VM. The disk " "grows dynamically as the VM writes to it. This format supports snapshots, " "compression, and encryption. The use case for this format is for " "development, testing, and scenarios with the need of these advanced " "features. This format is used in the script for the \"right\" VM below." msgstr "" "Отдельным форматом является `qcow2`, который использует технологию QEMU " "\"копирования при записи\" для управления дисковым пространством. Эта " "технология не требует полного диска размером 15G, а лишь заготовку, которой " "напрямую управляет виртуальная машина. Диск растёт динамически по мере " "записи данных виртуальной машиной. Этот формат поддерживает снимки " "состояния, сжатие и шифрование. Его применение целесообразно в разработке, " "тестировании и сценариях, требующих этих расширенных возможностей. Данный " "формат используется в скрипте для виртуальной машины \"right\" ниже." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:638 msgid "" "Run man:qemu-img[1] again to create the disk image for the \"right\" VM " "using `qcow2`:" msgstr "" "Снова выполните man:qemu-img[1], чтобы создать образ диска для ВМ \"right\", " "используя `qcow2`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:642 #, no-wrap msgid "% qemu-img create -f qcow2 -o preallocation=full,cluster_size=512K,lazy_refcounts=on right.qcow2 20G\n" msgstr "% qemu-img create -f qcow2 -o preallocation=full,cluster_size=512K,lazy_refcounts=on right.qcow2 20G\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:645 msgid "To see the actual size of the file use:" msgstr "Чтобы увидеть фактический размер файла, используйте:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:649 #, no-wrap msgid "% du -Ah right.qcow2\n" msgstr "% du -Ah right.qcow2\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:655 msgid "" "Set up networking for both virtual machines with the following commands. In " "this example the host network interface is `em0`. If necessary, change it " "to fit the interface for the host system. This must be done after every " "host machine restart to enable the QEMU guest VMs to communicate." msgstr "" "Настройте сеть для обеих виртуальных машин с помощью следующих команд. В " "этом примере сетевой интерфейс хоста — `em0`. При необходимости измените его " "в соответствии с интерфейсом вашей системы. Это необходимо выполнять после " "каждой перезагрузки хоста, чтобы обеспечить возможность обмена данными для " "гостевых QEMU ВМ." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:667 #, no-wrap msgid "" "# ifconfig tap0 create\n" "# ifconfig tap1 create\n" "# sysctl net.link.tap.up_on_open=1\n" "net.link.tap.up_on_open: 0 -> 1\n" "# sysctl net.link.tap.user_open=1\n" "net.link.tap.user_open: 0 -> 1\n" "# ifconfig bridge0 create\n" "# ifconfig bridge0 addm tap0 addm tap1 addm em0\n" "# ifconfig bridge0 up\n" msgstr "" "# ifconfig tap0 create\n" "# ifconfig tap1 create\n" "# sysctl net.link.tap.up_on_open=1\n" "net.link.tap.up_on_open: 0 -> 1\n" "# sysctl net.link.tap.user_open=1\n" "net.link.tap.user_open: 0 -> 1\n" "# ifconfig bridge0 create\n" "# ifconfig bridge0 addm tap0 addm tap1 addm em0\n" "# ifconfig bridge0 up\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:672 msgid "" "The above commands create two man:tap[4] devices (`tap0`, `tap1`) and one " "man:if_bridge[4] device (`bridge0`). Then, they add the `tap` devices and " "the local host interface (`em0`) to the `bridge`, and set two man:sysctl[8] " "entries to allow for normal users to open the tap device. These commands " "will allow the virtual machines to talk to the network stack on the host." msgstr "" "Приведенные выше команды создают два устройства man:tap[4] (`tap0`, `tap1`) " "и одно устройство man:if_bridge[4] (`bridge0`). Затем они добавляют " "устройства `tap` и интерфейс локального хоста (`em0`) в `bridge`, а также " "устанавливают две записи man:sysctl[8], чтобы разрешить обычным " "пользователям открывать устройство tap. Эти команды позволят виртуальным " "машинам взаимодействовать с сетевым стеком на хосте." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:675 msgid "" "Change to [.filename]#~/QEMU/SCRIPTS#, use the following script to start the " "first virtual machine, \"left\". This script uses the QEMU raw disk format." msgstr "" "Перейдите в [.filename]#~/QEMU/SCRIPTS# и используйте следующий скрипт для " "запуска первой виртуальной машины — \"left\". Этот скрипт использует диск " "QEMU в формате raw." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:691 #, no-wrap msgid "" "/usr/local/bin/qemu-system-x86_64 -monitor none \\\n" " -cpu qemu64 \\\n" " -vga std \\\n" " -m 4096 \\\n" " -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -blockdev driver=file,aio=threads,node-name=imgleft,filename=../VM/left.img \\\n" " -blockdev driver=raw,node-name=drive0,file=imgleft \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:20:6c:65:66:74 \\\n" " -name \\\"left\\\"\n" msgstr "" "/usr/local/bin/qemu-system-x86_64 -monitor none \\\n" " -cpu qemu64 \\\n" " -vga std \\\n" " -m 4096 \\\n" " -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -blockdev driver=file,aio=threads,node-name=imgleft,filename=../VM/left.img \\\n" " -blockdev driver=raw,node-name=drive0,file=imgleft \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:20:6c:65:66:74 \\\n" " -name \\\"left\\\"\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:696 msgid "" "Save the above into a file (for example `left.sh`) and simply run: % `/bin/" "sh left.sh`" msgstr "" "Сохраните приведённый выше код в файл (например, `left.sh`) и просто " "выполните: `/bin/sh left.sh`" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:701 msgid "" "QEMU will start up a virtual machine in a separate window and boot the " "FreeBSD iso as shown in crossref:virtualization[qemu-newboot-loader-menu," "Figure {counter:figure}]. All command options such as `-cpu` and `-boot` " "are fully described in the QEMU man page man:qemu[1]." msgstr "" "QEMU запустит виртуальную машину в отдельном окне и загрузит FreeBSD iso, " "как показано на crossref:virtualization[qemu-newboot-loader-menu,рисунке " "{counter:figure}]. Все параметры команд, такие как `-cpu` и `-boot`, " "полностью описаны в man-странице QEMU man:qemu[1]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:703 #, no-wrap msgid "FreeBSD Boot Loader Menu" msgstr "Меню загрузчика FreeBSD" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:704 #, no-wrap msgid "The FreeBSD loader menu." msgstr "Меню загрузчика FreeBSD." #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:704 #, no-wrap msgid "qemu-freebsd02.png" msgstr "qemu-freebsd02.png" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:711 msgid "" "If the mouse is clicked in the QEMU console window, QEMU will “grab” the " "mouse as shown in crossref:virtualization[qemu-grab,Figure {counter:" "figure}]. Type kbd:[Ctl]+kbd:[Alt]+kbd:[G]” to release the mouse." msgstr "" "Если в окне консоли QEMU кликнуть мышкой , QEMU «захватит» мышь, как " "показано в crossref:virtualization[qemu-grab,Рисунок {counter:figure}]. " "Нажмите kbd:[Ctrl]+kbd:[Alt]+kbd:[G], чтобы освободить мышь." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:714 #, no-wrap msgid "When QEMU Has Grabbed the Mouse" msgstr "Когда QEMU захватил мышь" #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:715 #, no-wrap msgid "When QEMU has grabbed the mouse" msgstr "Когда QEMU захватит мышь" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:715 #, no-wrap msgid "qemu-freebsd03.png" msgstr "qemu-freebsd03.png" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:722 msgid "" "On FreeBSD, an initial QEMU installation can be somewhat slow. This is " "because the emulator writes filesystem formatting and metadata during the " "disk first use. Subsequent operations are generally much faster." msgstr "" "На FreeBSD первоначальная установка QEMU может быть несколько медленной. Это " "происходит потому, что эмулятор записывает форматирование файловой системы и " "метаданные при первом использовании диска. Последующие операции, как " "правило, выполняются значительно быстрее." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:725 msgid "During the installation there are several points to note:" msgstr "Во время установки следует обратить внимание на несколько моментов:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:728 msgid "" "Select to use UFS as the filesystem. ZFS does not perform well with small " "memory sizes." msgstr "" "Выберите использование UFS в качестве файловой системы. ZFS работает " "неэффективно при небольшом объёме памяти." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:730 msgid "" "For networking use DHCP. If desired, configure IPv6 if supported by the " "local LAN." msgstr "" "Для использования сети настройте DHCP. При необходимости настройте IPv6, " "если он поддерживается локальной сетью." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:731 msgid "" "When adding the default user, ensure they are a member of the *wheel* group." msgstr "" "При добавлении пользователя по умолчанию убедитесь, что он является членом " "группы *wheel*." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:733 msgid "" "Once the installation completes, the virtual machine reboots into the newly " "installed FreeBSD image." msgstr "" "После завершения установки виртуальная машина перезагружается в только что " "установленный образ FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:735 msgid "Login as `root` and update the system as follows:" msgstr "Войдите как `root` и обновите систему следующим образом:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:740 #, no-wrap msgid "" "# freebsd-update fetch install\n" "# reboot\n" msgstr "" "# freebsd-update fetch install\n" "# reboot\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:745 msgid "" "After a successful installation, QEMU will boot the operating system " "installed on the disk, and not the installation program." msgstr "" "После успешной установки QEMU загрузит операционную систему, установленную " "на диске, а не программу установки." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:752 msgid "" "QEMU supports a ```-runas``` option. For added security, include the option " "\"-runas user_name\" in the script listing above. See man:qemu[1] for " "details." msgstr "" "QEMU поддерживает параметр ```-runas```. Для повышения безопасности добавьте " "параметр \"-runas user_name\" в приведённый выше скрипт. Подробности см. в " "man:qemu[1]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:756 msgid "" "Login as `root` again and add any packages desired. To utilize the X Window " "system in the guest, see the section \"Using the X Window System\" below." msgstr "" "Войдите снова как `root` и добавьте любые необходимые пакеты. Чтобы " "использовать систему X Window в гостевой системе, см. раздел «Использование " "системы X Window» ниже." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:758 msgid "This completes the setup of the \"left\" VM." msgstr "Завершена настройка виртуальной машины \"left\"." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:762 msgid "" "To install the \"right\" VM, run the following script. This script has the " "modifications needed for tap1, format=qcow2, the image filename, the MAC " "address, and the terminal window name. If desired, include the \"-runas\" " "parameter as described in the above note." msgstr "" "Для установки виртуальной машины \"right\" выполните следующий скрипт. Этот " "скрипт содержит необходимые изменения для tap1, format=qcow2, имени файла " "образа, MAC-адреса и названия окна терминала. При желании можно добавить " "параметр \"-runas\", как описано в примечании выше." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:777 #, no-wrap msgid "" "/usr/local/bin/qemu-system-x86_64 -monitor none \\\n" " -cpu qemu64 \\\n" " -vga cirrus \\\n" " -m 4096 -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -drive if=none,id=drive0,cache=writeback,aio=threads,format=qcow2,discard=unmap,file=../VM/right.qcow2 \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap1,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:72:69:67:68:74 \\\n" " -name \\\"right\\\"\n" msgstr "" "/usr/local/bin/qemu-system-x86_64 -monitor none \\\n" " -cpu qemu64 \\\n" " -vga cirrus \\\n" " -m 4096 -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -drive if=none,id=drive0,cache=writeback,aio=threads,format=qcow2,discard=unmap,file=../VM/right.qcow2 \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap1,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:72:69:67:68:74 \\\n" " -name \\\"right\\\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:781 msgid "" "Once the installation is complete, the \"left\" and \"right\" machines can " "communicate with each other and with the host. If there are strict firewall " "rules on the host, consider adding or modifying rules to allow the bridge " "and tap devices to communicate with each other." msgstr "" "После завершения установки обе машины \"left\" и \"right\" могут " "взаимодействовать друг с другом и с хостом. Если на хосте действуют строгие " "правила брендмауэра, рассмотрите возможность добавления или изменения правил " "для разрешения взаимодействия между мостом (bridge) и устройствами tap." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:783 #, no-wrap msgid "Usage Tips" msgstr "Советы по использованию" #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:785 #, no-wrap msgid "Using the X Window System" msgstr "Использование системы X Window" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:789 msgid "" "crossref:x11[x-install,Installing Xorg] describes how to set up the `X " "Window` system. Refer to that guide for initial `X Window` setup then " "consult crossref:desktop[desktop,Desktop Environments] on how to set up a " "complete desktop." msgstr "" "crossref:x11[x-install,Установка Xorg] описывает, как настроить систему `X " "Window`. Обратитесь к этому руководству для первоначальной настройки `X " "Window`, затем ознакомьтесь с crossref:desktop[desktop,Среды рабочего " "стола], чтобы настроить полноценную рабочую среду." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:791 msgid "This section demonstrates use of the XFCE desktop." msgstr "Этот раздел демонстрирует использование рабочего стола XFCE." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:793 msgid "Once the installation is complete, login as a regular user, then type:" msgstr "" "После завершения установки войдите в систему как обычный пользователь, затем " "введите:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:797 #, no-wrap msgid "% startx\n" msgstr "% startx\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:803 msgid "" "The XFCE4 window manager should start up and present a functioning graphical " "desktop as in crossref:virtualization[qemu-two-qemu,Figure {counter:" "figure}]. On initial startup, it may take up to a minute to display the " "desktop. See the documentation at the link:https://www.xfce.org[XFCE " "website] for usage details." msgstr "" "Менеджер окон XFCE4 должен запуститься и предоставить рабочий графический " "рабочий стол, как на crossref:virtualization[qemu-two-qemu,рисунке {counter:" "figure}]. При первом запуске отображение рабочего стола может занять до " "минуты. Подробности использования см. в документации на link:https://www." "xfce.org[сайте XFCE]." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:804 #: documentation/content/en/books/handbook/virtualization/_index.adoc:805 #, no-wrap msgid "Both QEMU VMs" msgstr "Обе виртуальные машины QEMU" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:805 #, no-wrap msgid "qemu-freebsd04.png" msgstr "qemu-freebsd04.png" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:810 msgid "" "Adding more memory to the guest system may speed up the graphical user " "interface." msgstr "" "Добавление дополнительной памяти в гостевую систему может ускорить работу " "графического интерфейса пользователя." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:813 msgid "" "Here, the \"left\" VM has had the `X Window` system installed, while the " "\"right\" VM is still in text mode." msgstr "" "Здесь на виртуальной машине \"left\" установлена система `X Window`, а " "виртуальная машина \"right\" всё ещё находится в текстовом режиме." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:815 #, no-wrap msgid "Using the QEMU Window" msgstr "Использование окна QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:818 msgid "" "The QEMU window functions as a full FreeBSD console, and is capable of " "running multiple virtual terminals, just like a bare-metal system." msgstr "" "Окно QEMU функционирует как полноценная консоль FreeBSD и способно работать " "с несколькими виртуальными терминалами, как и система на реальном " "оборудовании." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:822 msgid "" "To switch to another virtual console, click into the QEMU window and type " "kbd:[Alt+F2] or kbd:[Alt+F3]. FreeBSD should switch to another virtual " "console. crossref:virtualization[qemu-console-ttyv3,Figure {counter:" "figure}] shows the \"left\" VM displaying the virtual console on `ttyv3`." msgstr "" "Для переключения на другую виртуальную консоль кликните в окно QEMU и " "нажмите kbd:[Alt+F2] или kbd:[Alt+F3]. FreeBSD должна переключиться на " "другую виртуальную консоль. crossref:virtualization[qemu-console-ttyv3," "Рисунок {counter:figure}] показывает ВМ \"left\" с виртуальной консолью на " "`ttyv3`." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:823 #: documentation/content/en/books/handbook/virtualization/_index.adoc:824 #, no-wrap msgid "Switching to Another Virtual Console in the QEMU Window" msgstr "Переключение на другую виртуальную консоль в окне QEMU" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:824 #, no-wrap msgid "qemu-freebsd05.png" msgstr "qemu-freebsd05.png" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:831 msgid "" "The host current desktop manager or window manager may be already setup for " "another function with the kbd:[Alt+F1], kbd:[Alt+F2] key sequences. If so, " "try typing kbd:[Ctl+Alt+F1], kbd:[Ctl+Alt+F2], or some other similar key " "combination. Check the window manager or desktop manager documentation for " "details." msgstr "" "Текущий менеджер рабочего стола или оконный менеджер на хосте может быть уже " "настроен на другое действие для комбинаций клавиш kbd:[Alt+F1], kbd:[Alt" "+F2]. В таком случае попробуйте нажать kbd:[Ctrl+Alt+F1], kbd:[Ctrl+Alt+F2] " "или другую подобную комбинацию. Подробности смотрите в документации вашего " "оконного менеджера или менеджера рабочего стола." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:834 #, no-wrap msgid "Using the QEMU Window Menus" msgstr "Использование меню окна QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:840 msgid "" "Another feature of the QEMU window is the `View` menu and the Zoom " "controls. The most useful is `Zoom to Fit`. When this menu selection is " "clicked, it is then possible to resize the QEMU window by clicking the " "window corner controls and resizing the window. crossref:" "virtualization[qemu-zoom-to-fit,Figure {counter:figure}] shows the effect of " "resizing the \"left\" window while in graphics mode." msgstr "" "Еще одна особенность окна QEMU — это меню `View` и элементы управления " "масштабом. Наиболее полезным является пункт `Zoom to Fit`. При выборе этого " "пункта меню появляется возможность изменить размер окна QEMU, перетаскивая " "его углы. На crossref:virtualization[qemu-zoom-to-fit,рисунке {counter:" "figure}] показан эффект изменения размера окна \"left\" в графическом режиме." #. type: Positional ($1) AttributeList argument for macro 'image' #: documentation/content/en/books/handbook/virtualization/_index.adoc:842 #: documentation/content/en/books/handbook/virtualization/_index.adoc:843 #, no-wrap msgid "Using the View Menu `Zoom to Fit` Option" msgstr "Использование опции `Zoom to Fit` в меню View" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:843 #, no-wrap msgid "qemu-freebsd06.png" msgstr "qemu-freebsd06.png" #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:846 #, no-wrap msgid "Other QEMU Window Menu Options" msgstr "Другие пункты меню окна QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:849 msgid "Also shown in the `View` menu are" msgstr "Также в меню `View` отображаются" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:852 msgid "" "`cirrus-vga`, `serial0`, and `parallel0` options. These allow for switching " "input/output to the selected device." msgstr "" "Опции `cirrus-vga`, `serial0` и `parallel0`. Они позволяют переключать ввод/" "вывод на выбранное устройство." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:854 msgid "" "The QEMU window `Machine` menu allows for four types of control over the " "guest VM:" msgstr "" "Окно QEMU в меню `Machine` предоставляет четыре типа управления гостевой " "виртуальной машиной:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:857 msgid "" "`Pause` allows for pausing the QEMU virtual machine. This may be helpful in " "freezing a fast scrolling window." msgstr "" "`Pause` позволяет приостановить виртуальную машину QEMU. Это может быть " "полезно для остановки быстро прокручивающегося окна." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:859 msgid "" "`Reset` immediately resets the virtual machine back at cold \"power on\" " "state. As with a real machine, it is not recommended unless absolutely " "necessary." msgstr "" "`Reset` немедленно возвращает виртуальную машину в исходное состояние, как " "\"при включении питания\". Как и с реальной машиной, это не рекомендуется, " "если в этом нет крайней необходимости." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:860 msgid "" "`Power Down` simulates an ACPI shutdown signal and the operating system goes " "through a graceful shutdown." msgstr "" "`Power Down` имитирует сигнал отключения ACPI, и операционная система " "выполняет аккуратное завершение работы." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:861 msgid "" "`Quit` powers off the virtual machine immediately - also not recommended " "unless necessary." msgstr "" "`Quit` немедленно выключает виртуальную машину — также не рекомендуется, " "если в этом нет необходимости." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:863 #, no-wrap msgid "Adding a Serial Port Interface to a Guest VM" msgstr "Добавление интерфейса последовательного порта к гостевой ВМ" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:866 msgid "" "To implement a serial console, a guest VM running FreeBSD needs to insert" msgstr "" "Для использования последовательной консоли гостевая ВМ под управлением " "FreeBSD должна добавить" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:869 #, no-wrap msgid "console=\"comconsole\"\n" msgstr "console=\"comconsole\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:871 msgid "" "in [.filename]#/boot/loader.conf# to allow the use of the FreeBSD serial " "console." msgstr "" "в [.filename]#/boot/loader.conf# для разрешения использования " "последовательной консоли FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:874 msgid "" "The updated configuration below shows how to implement the serial console on " "the guest VM. Run the script to start the VM." msgstr "" "Обновлённая конфигурация ниже показывает, как реализовать последовательную " "консоль на гостевой ВМ. Запустите скрипт для старта ВМ." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:881 #, no-wrap msgid "" "# left+serial.sh\n" "echo\n" "echo \"NOTE: telnet startup server running on guest VM!\"\n" "echo \"To start QEMU, start another session and telnet to localhost port 4410\"\n" "echo\n" msgstr "" "# left+serial.sh\n" "echo\n" "echo \"NOTE: telnet startup server running on guest VM!\"\n" "echo \"To start QEMU, start another session and telnet to localhost port 4410\"\n" "echo\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:896 #, no-wrap msgid "" "/usr/local/bin/qemu-system-x86_64 -monitor none \\\n" " -serial telnet:localhost:4410,server=on,wait=on\\\n" " -cpu qemu64 \\\n" " -vga std \\\n" " -m 4096 \\\n" " -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -blockdev driver=file,aio=threads,node-name=imgleft,filename=../VM/left.img \\\n" " -blockdev driver=raw,node-name=drive0,file=imgleft \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:20:6c:65:66:74 \\\n" " -name \\\"left\\\"\n" msgstr "" "/usr/local/bin/qemu-system-x86_64 -monitor none \\\n" " -serial telnet:localhost:4410,server=on,wait=on\\\n" " -cpu qemu64 \\\n" " -vga std \\\n" " -m 4096 \\\n" " -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -blockdev driver=file,aio=threads,node-name=imgleft,filename=../VM/left.img \\\n" " -blockdev driver=raw,node-name=drive0,file=imgleft \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:20:6c:65:66:74 \\\n" " -name \\\"left\\\"\n" #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:898 #, no-wrap msgid "Enabling a Serial Port over TCP" msgstr "Включение последовательного порта через TCP" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:899 #, no-wrap msgid "qemu-freebsd07.png" msgstr "qemu-freebsd07.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:906 msgid "" "In crossref:virtualization[qemu-notes-on-serial-console,Figure {counter:" "figure}], the serial port is redirected to a TCP port on the host system at " "VM startup and the QEMU monitor waits (`wait=on`) to activate the guest VM " "until a man:telnet[1] connection occurs on the indicated localhost port. " "After receiving a connection from a separate session, the FreeBSD system " "starts booting and looks for a console directive in [.filename]#/boot/loader." "conf#. With the directive \"console=comconsole\", FreeBSD starts up a " "console session on a serial port. The QEMU monitor detects this and directs " "the necessary character I/O on that serial port to the telnet session on the " "host. The system boots and once finished, login prompts are enabled on the " "serial port (`ttyu0`) and on the console (`ttyv0`)." msgstr "" "На crossref:virtualization[qemu-notes-on-serial-console,рисунке {counter:" "figure}] последовательный порт перенаправляется на TCP-порт хост-системы при " "запуске ВМ, а монитор QEMU ожидает (`wait=on`), активируя гостевую ВМ только " "после установления соединения man:telnet[1] с указанным портом localhost. " "После получения соединения из отдельного сеанса система FreeBSD начинает " "загрузку и ищет директиву консоли в [.filename]#/boot/loader.conf#. С " "директивой \"console=comconsole\" FreeBSD запускает консольный сеанс на " "последовательном порту. Монитор QEMU обнаруживает это и направляет " "необходимый символьный ввод-вывод с этого последовательного порта в telnet-" "сеанс на хосте. Система загружается, и после завершения загрузки приглашения " "для входа в систему становятся доступными на последовательном порту " "(`ttyu0`) и на консоли (`ttyv0`)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:910 msgid "" "It is important to note that the this serial redirect over TCP takes place " "outside the virtual machine. There is no interaction with any network on " "the virtual machine and therefore it is not subject to any firewall rules. " "Think of it like a dumb terminal sitting on an RS-232 or USB port on a real " "machine." msgstr "" "Важно отметить, что этот последовательный перенаправление через TCP " "происходит вне виртуальной машины. Нет взаимодействия с какой-либо сетью " "внутри виртуальной машины, и поэтому оно не подчиняется никаким правилам " "брандмауэра. Представьте это как простой терминал, подключенный к RS-232 или " "USB-порту на реальном компьютере." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:912 #, no-wrap msgid "Notes on Using the Serial Console" msgstr "Заметки об использовании последовательной консоли" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:915 msgid "" "On the serial console, if the window is resized, execute man:resizewin[1] to " "update the terminal size." msgstr "" "На последовательной консоли, если размер окна изменен, выполните man:" "resizewin[1], чтобы обновить размер терминала." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:918 msgid "" "It may be desirable (even necessary) to stop syslog message from being sent " "to the console (both the QEMU console and the serial port). Consult man:" "syslog.conf[5] for details on redirecting console messages." msgstr "" "Может быть желательно (или даже необходимо) остановить отправку сообщений " "syslog на консоль (как консоль QEMU, так и последовательный порт). " "Подробности о перенаправлении сообщений консоли можно найти в man:syslog." "conf[5]." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:924 msgid "" "Once the [.filename]#/boot.loader.conf# has been updated to permit a serial " "console, the guest VM will attempt to boot from the serial port every time. " "Ensure that the serial port is enabled as shown in the listing above, or " "update the [.filename]#/boot/loader.conf# file to not require a serial " "console." msgstr "" "После обновления файла [.filename]#/boot/loader.conf# для разрешения " "использования последовательной консоли гостевая ВМ будет пытаться " "загружаться с последовательного порта при каждом запуске. Убедитесь, что " "последовательный порт включен, как показано в приведённом выше листинге, или " "измените файл [.filename]#/boot/loader.conf#, чтобы не требовать " "использования последовательной консоли." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:927 #, no-wrap msgid "QEMU User Mode Emulation" msgstr "Эмуляция пользовательского режима QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:932 msgid "" "QEMU also supports running applications that are precompiled on an " "architecture different from the host CPU. For example, it is possible to " "run a Sparc64 architecture operating system on an x86_64 host. This is " "demonstrated in the next section." msgstr "" "QEMU также поддерживает выполнение приложений, скомпилированных для " "архитектуры, отличной от архитектуры основного процессора. Например, можно " "запустить операционную систему архитектуры Sparc64 на хосте с архитектурой " "x86_64. Это демонстрируется в следующем разделе." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:934 #, no-wrap msgid "Setting up a SPARC64 Guest VM on an x86_64 Host" msgstr "Настройка гостевой ВМ SPARC64 на хосте x86_64" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:937 msgid "" "Setting up a new VM with an architecture different from the host involves " "several steps:" msgstr "" "Настройка новой виртуальной машины с архитектурой, отличной от архитектуры " "хоста, включает несколько шагов:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:939 msgid "Getting the software that will run on the guest VM" msgstr "" "Получение программного обеспечения, которое будет работать на гостевой ВМ" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:940 msgid "Creating a new disk image for the guest VM" msgstr "Создание нового образа диска для гостевой ВМ" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:941 msgid "Setting up a new QEMU script with the new architecture" msgstr "Настройка нового скрипта QEMU с новой архитектурой" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:942 msgid "Performing the install" msgstr "Выполнение установки" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:944 msgid "" "In the following procedure a copy of OpenBSD 6.8 SPARC64 software is used " "for this QEMU User Mode Emulation exercise." msgstr "" "В следующей процедуре используется копия программного обеспечения OpenBSD " "6.8 SPARC64 для этого упражнения по эмуляции пользовательского режима QEMU." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:949 msgid "" "Not all versions of OpenBSD Sparc64 work on QEMU. OpenBSD version 6.8 is " "known to work and was selected as the example for this section." msgstr "" "Не все версии OpenBSD Sparc64 работают в QEMU. Известно, что OpenBSD версии " "6.8 работает, и она была выбрана в качестве примера для этого раздела." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:952 msgid "Download OpenBSD 6.8 Sparc64 from an OpenBSD archive." msgstr "Скачать OpenBSD 6.8 Sparc64 из архива OpenBSD." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:955 msgid "" "On the OpenBSD download sites, only the most current versions are " "maintained. It is necessary to search an archive to obtain past releases." msgstr "" "На сайтах загрузки OpenBSD поддерживаются только самые последние версии. Для " "получения предыдущих выпусков необходимо искать в архиве." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:960 #, no-wrap msgid "" "% cd ~/QEMU/ISO\n" "% fetch https://mirror.planetunix.net/pub/OpenBSD-archive/6.8/sparc64/install68.iso\n" msgstr "" "% cd ~/QEMU/ISO\n" "% fetch https://mirror.planetunix.net/pub/OpenBSD-archive/6.8/sparc64/install68.iso\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:964 msgid "" "Creating a new disk image for the Sparc64 VM is similar to the \"right\" VM " "above. This case uses the QEMU qcow2 format for the disk:" msgstr "" "Создание нового образа диска для виртуальной машины Sparc64 аналогично " "описанному выше для \"правильной\" виртуальной машины. В данном случае " "используется формат диска QEMU qcow2:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:969 #, no-wrap msgid "" "% cd ~/QEMU/VM\n" "qemu-img create -f qcow2 -o preallocation=full,lazy_refcounts=on sparc64.qcow2 16G\n" msgstr "" "% cd ~/QEMU/VM\n" "qemu-img create -f qcow2 -o preallocation=full,lazy_refcounts=on sparc64.qcow2 16G\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:973 msgid "" "Use the script below for the new Sparc64 architecture. As with the above " "example, run the script, then start a new session and `telnet` to localhost " "on the port indicated:" msgstr "" "Используйте приведённый ниже скрипт для новой архитектуры Sparc64. Как и в " "предыдущем примере, запустите скрипт, затем начните новую сессию и " "подключитесь через `telnet` к localhost на указанном порту:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:980 #, no-wrap msgid "" "echo\n" "echo \"NOTE: telnet startup server running on guest VM!\"\n" "echo \"To start QEMU, start another session and telnet to localhost port 4410\"\n" "echo\n" msgstr "" "echo\n" "echo \"NOTE: telnet startup server running on guest VM!\"\n" "echo \"To start QEMU, start another session and telnet to localhost port 4410\"\n" "echo\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:995 #, no-wrap msgid "" "/usr/local/bin/qemu-system-sparc64 \\\n" " -serial telnet:localhost:4410,server=on,wait=on \\\n" " -machine sun4u,usb=off \\\n" " -smp 1,sockets=1,cores=1,threads=1 \\\n" " -rtc base=utc \\\n" " -m 1024 \\\n" " -boot d \\\n" " -drive file=../VM/sparc64.qcow2,if=none,id=drive-ide0-0-1,format=qcow2,cache=none \\\n" " -cdrom ../ISO/install68.iso \\\n" " -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-1,id=ide0-0-1 \\\n" " -msg timestamp=on \\\n" " -net nic,model=sunhme -net user \\\n" " -nographic \\\n" " -name \\\"sparc64\\\"\n" msgstr "" "/usr/local/bin/qemu-system-sparc64 \\\n" " -serial telnet:localhost:4410,server=on,wait=on \\\n" " -machine sun4u,usb=off \\\n" " -smp 1,sockets=1,cores=1,threads=1 \\\n" " -rtc base=utc \\\n" " -m 1024 \\\n" " -boot d \\\n" " -drive file=../VM/sparc64.qcow2,if=none,id=drive-ide0-0-1,format=qcow2,cache=none \\\n" " -cdrom ../ISO/install68.iso \\\n" " -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-1,id=ide0-0-1 \\\n" " -msg timestamp=on \\\n" " -net nic,model=sunhme -net user \\\n" " -nographic \\\n" " -name \\\"sparc64\\\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:998 msgid "Note the following:" msgstr "Обратите внимание на следующее:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1000 msgid "" "The `-boot d` option boots from the QEMU CDROM device which is set as `-" "cdrom ../ISO/install68.iso`." msgstr "" "Опция `-boot d` загружает систему с устройства CDROM QEMU, которое указано " "как `-cdrom ../ISO/install68.iso`." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1002 msgid "" "As before, the `telnet` server option is set to wait for a separate " "connection on port 4410. Start up another session and use man:telnet[1] to " "connect to localhost on port 4410." msgstr "" "Как и ранее, параметр сервера `telnet` настроен на ожидание отдельного " "подключения на порту 4410. Запустите ещё один сеанс и используйте " "man:telnet[1] для подключения к localhost на порту 4410." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1004 msgid "" "The script sets the `-nographic` option meaning there is only serial port I/" "O. There is no graphical interface." msgstr "" "Скрипт устанавливает опцию `-nographic`, что означает использование только " "ввода/вывода через последовательный порт. Графический интерфейс отсутствует." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1007 msgid "" "Networking is not set up through the man:tap[4] / man:if_bridge[4] " "combination. This example uses a separate method of QEMU networking known " "as \"Serial Line Internet Protocol\" (SLIRP), sometimes referred to as " "\"User Mode Networking\". Documentation on this and other QEMU networking " "methods is here: link:https://wiki.qemu.org/Documentation/Networking[QEMU " "Networking Documentation]" msgstr "" "Сетевое взаимодействие не настраивается через комбинацию man:tap[4] / man:" "if_bridge[4]. В этом примере используется отдельный метод сетевого " "взаимодействия QEMU, известный как \"Serial Line Internet Protocol" "\" (SLIRP), иногда называемый \"User Mode Networking\". Документация по " "этому и другим методам сетевого взаимодействия QEMU находится здесь: link:" "https://wiki.qemu.org/Documentation/Networking[Документация по сетевому " "взаимодействию QEMU]" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1010 msgid "" "If everything is set correctly, the system will boot as shown in crossref:" "virtualization[qemu-sparc64-boot-cdrom-installation,Figure {counter:figure}]." msgstr "" "Если все настроено правильно, система загрузится, как показано на crossref:" "virtualization[qemu-sparc64-boot-cdrom-installation,рисунке {counter:" "figure}]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1011 #, no-wrap msgid "QEMU Booting OpenBSD 6.8 Sparc64 from CDROM During User Mode Emulation" msgstr "QEMU Загрузка OpenBSD 6.8 Sparc64 с CDROM с эмуляцией пользовательского режима" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1012 #, no-wrap msgid "qemu-freebsd08.png" msgstr "qemu-freebsd08.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1016 msgid "" "Once the system is installed, modify the script and change the boot " "parameter to `-boot c`. This will indicate to QEMU to boot from the " "supplied hard disk, not the CDROM." msgstr "" "После установки системы измените скрипт и замените параметр загрузки на `-" "boot c`. Это укажет QEMU загружаться с предоставленного жёсткого диска, а не " "с CDROM." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1019 msgid "" "The installed system can be used just like any other guest virtual machine. " "However, the underlying architecture of the guest is Sparc64, not x86_64." msgstr "" "Установленная система может использоваться как любая другая гостевая " "виртуальная машина. Однако, базовая архитектура гостевой системы — Sparc64, " "а не x86_64." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1023 msgid "" "If the system is halted at the OpenBios console prompt `0 >`, enter `power-" "off` to exit the system." msgstr "" "Если система остановлена на приглашении консоли OpenBios `0 >`, введите " "`power-off`, чтобы завершить работу системы." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1025 msgid "" "crossref:virtualization[qemu-sparc64-login-to-installed-system,Figure " "{counter:figure}] shows a root login to the installed system and running man:" "uname[1]." msgstr "" "На crossref:virtualization[qemu-sparc64-login-to-installed-system,рисунке " "{counter:figure}] показан вход в систему от имени root в установленной " "системе и выполнение man:uname[1]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1027 #, no-wrap msgid "QEMU Booting from CDROM During User Mode Emulation" msgstr "QEMU Загрузка с CDROM с эмуляцией пользовательского режима" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1028 #, no-wrap msgid "qemu-freebsd09.png" msgstr "qemu-freebsd09.png" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1031 #, no-wrap msgid "Using the QEMU Monitor" msgstr "Использование монитора QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1034 msgid "" "The link:https://www.qemu.org/docs/master/system/monitor.html[QEMU monitor] " "controls a running QEMU emulator (guest VM)." msgstr "" "link:https://www.qemu.org/docs/master/system/monitor.html[Монитор QEMU] " "управляет работающим эмулятором QEMU (гостевой виртуальной машиной)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1036 msgid "Using the monitor, it is possible to:" msgstr "Используя монитор, можно:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1038 msgid "" "Dynamically remove or insert devices, including disks, network interfaces, " "CD-ROMs, or floppies" msgstr "" "Динамически удалять или добавлять устройства, включая диски, сетевые " "интерфейсы, CD-ROM или дисководы гибких дисков" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1039 msgid "" "Freeze/unfreeze the guest VM, and save or restore its state from a disk file" msgstr "" "Заморозить/разморозить гостевую ВМ и сохранить или восстановить её состояние " "из файла на диске" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1040 msgid "Gather information about the state of the VM and devices" msgstr "Собрать информацию о состоянии ВМ и устройств" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1041 msgid "Change device settings on the fly" msgstr "Изменить настройки устройств на лету" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1043 msgid "As well as many other operations." msgstr "А также сделать множество других операций." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1046 msgid "" "The most common uses of the monitor are to examine the state of the VM, and " "to add, delete, or change devices. Some operations such as migrations are " "only available under hypervisor accelerators such as KVM, Xen, etc. and are " "not supported on FreeBSD hosts." msgstr "" "Наиболее распространённые способы использования монитора — это проверка " "состояния виртуальной машины, а также добавление, удаление или изменение " "устройств. Некоторые операции, такие как миграция, доступны только при " "использовании гипервизоров с ускорением, например KVM, Xen и т.д., и не " "поддерживаются на хостах FreeBSD." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1048 msgid "" "When using a graphical desktop environment, the simplest way to use the QEMU " "monitor is the `-monitor stdio` option when launching QEMU from a terminal " "session." msgstr "" "При использовании графической среды рабочего стола самый простой способ " "доступа к монитору QEMU — это опция `-monitor stdio` при запуске QEMU из " "терминала." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1056 #, no-wrap msgid "" "# /usr/local/bin/qemu-system-x86_64 -monitor stdio \\\n" " -cpu qemu64 \\\n" " -vga cirrus \\\n" " -m 4096 -smp 4 \\\n" " ...\n" msgstr "" "# /usr/local/bin/qemu-system-x86_64 -monitor stdio \\\n" " -cpu qemu64 \\\n" " -vga cirrus \\\n" " -m 4096 -smp 4 \\\n" " ...\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1060 msgid "" "This results in a new prompt `(qemu)` in the terminal window as shown in " "crossref:virtualization[qemu-monitor-operation,Figure {counter:figure}]." msgstr "" "Это приводит к появлению новой строки приглашения `(qemu)` в окне терминала, " "как показано на crossref:virtualization[qemu-monitor-operation,рисунке " "{counter:figure}]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1062 #, no-wrap msgid "QEMU Monitor Prompt and \"stop\" Command" msgstr "Приглашение монитора QEMU и команда \"stop\"" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1063 #, no-wrap msgid "qemu-freebsd13.png" msgstr "qemu-freebsd13.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1067 msgid "" "The image also shows the `stop` command freezing the system during the " "FreeBSD boot sequence. The system will remain frozen until the `cont` " "command is entered in the monitor." msgstr "" "На изображении также показано, что команда `stop` замораживает систему во " "время последовательности загрузки FreeBSD. Система останется замороженной до " "тех пор, пока в мониторе не будет введена команда `cont`." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:1069 #, no-wrap msgid "Adding a New Disk to the VM" msgstr "Добавление нового диска в виртуальную машину" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1072 msgid "" "To add a new disk to a running VM, the disk needs to be prepared as above:" msgstr "" "Чтобы добавить новый диск к работающей виртуальной машине, его необходимо " "подготовить, как описано выше:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1077 #, no-wrap msgid "" "% cd ~/QEMU/VM\n" "% qemu-img create -f raw new10G.img 10G\n" msgstr "" "% cd ~/QEMU/VM\n" "% qemu-img create -f raw new10G.img 10G\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1082 msgid "" "crossref:virtualization[qemu-add-new-disk-figure,Figure {counter:figure}] " "shows the monitor command sequence needed to add a new disk in the VM. Once " "the device has been added with the `device_add` command in the monitor it " "shows up on the FreeBSD system console shown in the lower part of the " "figure. The disk can be configured as needed." msgstr "" "crossref:virtualization[qemu-add-new-disk-figure,Рисунок {counter:figure}] " "показывает последовательность команд в мониторе, необходимую для добавления " "нового диска в виртуальную машину. После добавления устройства с помощью " "команды `device_add` в мониторе оно появляется на консоли системы FreeBSD, " "как показано в нижней части рисунка. Диск можно настроить по необходимости." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1084 msgid "" "Note that the new disk must be added to the startup script if it is to be " "used after a VM reboot." msgstr "" "Обратите внимание, что новый диск должен быть добавлен в стартовый скрипт, " "если он будет использоваться после перезагрузки виртуальной машины." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1086 #, no-wrap msgid "QEMU Monitor Commands to Add a New Disk" msgstr "Команды монитора QEMU для добавления нового диска" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1087 #, no-wrap msgid "qemu-freebsd14.png" msgstr "qemu-freebsd14.png" #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:1090 #, no-wrap msgid "Using the QEMU Monitor to Manage Snapshots" msgstr "Использование монитора QEMU для управления снимками" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1097 msgid "" "QEMU's documentation describes several similar concepts when using the term " "*snapshot*. There is the `-snapshot` option on the command line which " "refers to using a drive or portion of a drive to contain a copy of a " "device. Then there are the monitor commands `snapshot_blkdev` and " "`snapshot_blkdev_internal` which describe the actual act of copying the " "blockdev device. Finally, there are the monitor commands `savevm`, " "`loadvm`, and `delvm` commands which refer to creating and saving, loading, " "or deleting a copy of an entire virtual machine. Along with the latter, the " "monitor `info snapshots` command lists out details of recent snapshots." msgstr "" "Документация QEMU описывает несколько схожих концепций, используя термин " "*снимок (snapshot)*. Существует опция `-snapshot` в командной строке, " "которая означает использование диска или его части для хранения копии " "устройства. Также есть команды монитора `snapshot_blkdev` и " "`snapshot_blkdev_internal`, описывающие сам процесс копирования блочного " "устройства. Наконец, команды монитора `savevm`, `loadvm` и `delvm` относятся " "к созданию, сохранению, загрузке или удалению копии всей виртуальной машины. " "Вместе с последними, команда монитора `info snapshots` выводит детали " "недавних снимков состояния." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1099 msgid "" "This section will focus on creating, saving, and loading a complete VM image " "and will use the term *snapshot* for this purpose." msgstr "" "Этот раздел посвящён созданию, сохранению и загрузке полного образа ВМ и " "использует термин *снимок* для этой цели." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1101 msgid "" "To start, recreate the \"left\" VM from scratch, this time using the `qcow2` " "format." msgstr "" "Для начала заново создайте виртуальную машину \"left\", на этот раз " "используя формат `qcow2`." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1109 #, no-wrap msgid "" "% cd ~/QEMU/VM\n" "% rm left.img\n" "% qemu-img create -f qcow2 left.qcow2 16G # Clean file for a new FreeBSD installation.\n" "% cd ../SCRIPTS\n" "# /bin/sh left.sh # See the below program listing.\n" msgstr "" "% cd ~/QEMU/VM\n" "% rm left.img\n" "% qemu-img create -f qcow2 left.qcow2 16G # Clean file for a new FreeBSD installation.\n" "% cd ../SCRIPTS\n" "# /bin/sh left.sh # See the below program listing.\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1112 msgid "" "Once the installation is complete, reboot, this time using the `-monitor " "stdio` option to allow use of the monitor." msgstr "" "После завершения установки перезагрузите систему, на этот раз с " "использованием опции `-monitor stdio`, чтобы обеспечить доступ к монитору." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1129 #, no-wrap msgid "" "# left VM script.\n" "/usr/local/bin/qemu-system-x86_64 -monitor stdio \\\n" " -cpu qemu64 \\\n" " -vga std \\\n" " -m 4096 \\\n" " -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -blockdev driver=file,aio=threads,node-name=imgleft,filename=../VM/left.qcow2 \\\n" " -blockdev driver=qcow2,node-name=drive0,file=imgleft \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:20:6c:65:66:74 \\\n" " -name \\\"left\\\"\n" msgstr "" "# left VM script.\n" "/usr/local/bin/qemu-system-x86_64 -monitor stdio \\\n" " -cpu qemu64 \\\n" " -vga std \\\n" " -m 4096 \\\n" " -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -blockdev driver=file,aio=threads,node-name=imgleft,filename=../VM/left.qcow2 \\\n" " -blockdev driver=qcow2,node-name=drive0,file=imgleft \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:20:6c:65:66:74 \\\n" " -name \\\"left\\\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1132 msgid "To demonstrate snapshots, the following procedure can be used:" msgstr "" "Для демонстрации работы снимков можно использовать следующую процедуру:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1134 msgid "Install FreeBSD from scratch" msgstr "Установите FreeBSD с нуля" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1135 msgid "" "Prepare the environment and take a snapshot with the `savevm` monitor command" msgstr "" "Подготовьте окружение и создайте снимок состояния с помощью команды монитора " "`savevm`" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1136 msgid "Install several packages" msgstr "Установите несколько пакетов" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1137 msgid "Shut down the system" msgstr "Выключите систему" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1138 msgid "" "Restart a bare QEMU instance and utilize the monitor command `loadvm` to " "restore the VM" msgstr "" "Перезапустите экземпляр QEMU без оболочки и используйте команду монитора " "`loadvm` для восстановления ВМ" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1139 msgid "Observe that the restored VM does not have any packages" msgstr "" "Обратите внимание, что восстановленная ВМ не имеет установленных пакетов" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1143 msgid "" "During the \"Prepare the environment\" step, in a separate virtual console " "(ttyv1), an editing session with man:vi[1] is initiated simulating user " "activity. Additional programs may be started if desired. The snapshot " "should account for the state of all applications running at the time the " "snapshot is taken." msgstr "" "На этапе «Подготовка окружения» в отдельной виртуальной консоли (ttyv1) " "запускается сеанс редактирования в man:vi[1], имитирующий активность " "пользователя. При желании можно запустить дополнительные программы. Снимок " "должен учитывать состояние всех приложений, работающих на момент его " "создания." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1146 msgid "" "crossref:virtualization[qemu-using-monitor-snapshots,Figure {counter:" "figure}] shows the newly installed FreeBSD system with no packages, and " "separately, the editing session on ttyv1. The man:vi[1] editor is currently " "in `insert` mode with the typist typing the word \"broadcast\"." msgstr "" "crossref:virtualization[qemu-using-monitor-snapshots,Рисунок {counter:" "figure}] показывает новую установленную систему FreeBSD без пакетов, а также " "отдельно сеанс редактирования на ttyv1. Редактор man:vi[1] в данный момент " "находится в режиме `insert`, и пользователь набирает слово \"broadcast\"." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1148 #, no-wrap msgid "QEMU VM Before First Snapshot" msgstr "Виртуальная машина QEMU перед первым снимком состояния" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1149 #, no-wrap msgid "qemu-freebsd15.png" msgstr "qemu-freebsd15.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1153 msgid "" "To generate the snapshot, enter `savevm` in the monitor. Be sure to give it " "a tag (such as `original_install`)." msgstr "" "Чтобы создать снимок состояния, введите `savevm` в мониторе. Убедитесь, что " "указали метку (например, `original_install`)." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1159 #, no-wrap msgid "" "QEMU 9.0.1 monitor - type 'help' for more information\n" "(qemu)\n" "(qemu) savevm original_install\n" msgstr "" "QEMU 9.0.1 monitor - type 'help' for more information\n" "(qemu)\n" "(qemu) savevm original_install\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1163 msgid "" "Next, in the main console window, install a package, such as man:zip[1] " "which has no dependencies. Once that completes, renter the monitor and " "create another snapshot (`snap1_pkg+zip`)." msgstr "" "Далее, в главном окне консоли, установите пакет, например man:zip[1], " "который не имеет зависимостей. После завершения установки вернитесь в " "монитор и создайте ещё один снимок состояния (`snap1_pkg+zip`)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1165 msgid "" "crossref:virtualization[qemu-after-monitor-snapshots,Figure {counter:" "figure}] shows the results of the above commands and the output of the `info " "shapshots` command." msgstr "" "crossref:virtualization[qemu-after-monitor-snapshots,Рисунок {counter:" "figure}] показывает результаты выполненных выше команд и вывод команды `info " "shapshots`." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1167 #, no-wrap msgid "QEMU Using Monitor Commands for Snapshots" msgstr "QEMU — Использование команд монитора для создания снимков состояния" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1168 #, no-wrap msgid "qemu-freebsd16.png" msgstr "qemu-freebsd16.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1172 msgid "" "Reboot the system, and before FreeBSD starts up, switch to the monitor and " "enter `stop`. The VM will stop." msgstr "" "Перезагрузите систему, и до запуска FreeBSD переключитесь на монитор и " "введите `stop`. Виртуальная машина остановится." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1174 msgid "Enter `loadvm` with the tag used above (here `original_install`)." msgstr "" "Введите `loadvm` с тегом, который вы использовали ранее (здесь " "`original_install`)." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1181 #, no-wrap msgid "" "QEMU 9.0.1 monitor - type 'help' for more information\n" "(qemu) stop\n" "(qemu) loadvm original_install\n" "(qemu) cont\n" msgstr "" "QEMU 9.0.1 monitor - type 'help' for more information\n" "(qemu) stop\n" "(qemu) loadvm original_install\n" "(qemu) cont\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1185 msgid "" "Immediately, the VM screen will switch to the exact moment the `savevm` " "command was entered above. Note that the VM is still stopped." msgstr "" "Сразу же экран виртуальной машины переключится на тот момент, когда была " "введена команда `savevm`, как указано выше. Обратите внимание, что " "виртуальная машина всё ещё остановлена." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1189 msgid "" "Enter `cont` to start the VM, switch to the editing session on `ttyv1`, and " "type one letter on the keyboard. The editor, still in insert mode, should " "respond accordingly. Any other programs running at the time the snapshot " "was taken should be unaffected." msgstr "" "Введите `cont`, чтобы запустить ВМ, переключитесь на сеанс редактирования на " "`ttyv1` и наберите одну букву на клавиатуре. Редактор, всё ещё находящийся в " "режиме вставки, должен отреагировать соответствующим образом. Любые другие " "программы, работавшие в момент создания снимка, не должны быть затронуты." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1191 msgid "" "The above steps show how a snapshot can be taken, the system modified, and " "then \"rolled back\" by restoring the previous snapshot." msgstr "" "Приведенные выше шаги показывают, как можно создать снимок состояния, " "изменить систему, а затем «откатить» изменения, восстановив предыдущий " "снимок." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1195 msgid "" "By default QEMU stores snapshot data in the same file as the image. View " "the list of snapshots with man:qemu-img[1] as shown below in crossref:" "virtualization[qemu-examine-monitor-snapshots,Figure {counter:figure}]." msgstr "" "По умолчанию QEMU хранит данные снимков в том же файле, что и образ. " "Просмотреть список снимков можно с помощью man:qemu-img[1], как показано " "ниже в crossref:virtualization[qemu-examine-monitor-snapshots,Рисунок " "{counter:figure}]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1197 #, no-wrap msgid "QEMU Using man:qemu-img[1] to Examine Snapshots" msgstr "QEMU Использование man:qemu-img[1] для проверки снимков" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1198 #, no-wrap msgid "qemu-freebsd17.png" msgstr "qemu-freebsd17.png" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1201 #, no-wrap msgid "Using QEMU USB Devices" msgstr "Использование USB-устройств в QEMU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1205 msgid "" "QEMU supports the creation of virtual USB devices that are backed by an " "image file. These are virtual USB devices that can be partitioned, " "formatted, mounted, and used just like a real USB device." msgstr "" "QEMU поддерживает создание виртуальных USB-устройств, которые используют " "файл образа. Это виртуальные USB-устройства, которые можно разбивать на " "разделы, форматировать, монтировать и использовать, как реальное USB-" "устройство." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1225 #, no-wrap msgid "" "/usr/local/bin/qemu-system-x86_64 -monitor stdio \\\n" " -cpu qemu64 \\\n" " -vga cirrus \\\n" " -m 4096 -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -drive if=none,id=usbstick,format=raw,file=../VM/foo.img \\\n" " -usb \\\n" " -device usb-ehci,id=ehci \\\n" " -device usb-storage,bus=ehci.0,drive=usbstick \\\n" " -device usb-mouse \\\n" " -blockdev driver=file,node-name=img1,filename=../VM/right.qcow2 \\\n" " -blockdev driver=qcow2,node-name=drive0,file=img1 \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap1,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:72:69:67:68:74 \\\n" " -name \\\"right\\\"\n" msgstr "" "/usr/local/bin/qemu-system-x86_64 -monitor stdio \\\n" " -cpu qemu64 \\\n" " -vga cirrus \\\n" " -m 4096 -smp 4 \\\n" " -cdrom ../ISO/fbsd.iso \\\n" " -boot order=cd,menu=on \\\n" " -drive if=none,id=usbstick,format=raw,file=../VM/foo.img \\\n" " -usb \\\n" " -device usb-ehci,id=ehci \\\n" " -device usb-storage,bus=ehci.0,drive=usbstick \\\n" " -device usb-mouse \\\n" " -blockdev driver=file,node-name=img1,filename=../VM/right.qcow2 \\\n" " -blockdev driver=qcow2,node-name=drive0,file=img1 \\\n" " -device virtio-blk-pci,drive=drive0,bootindex=1 \\\n" " -netdev tap,id=nd0,ifname=tap1,script=no,downscript=no,br=bridge0 \\\n" " -device e1000,netdev=nd0,mac=02:72:69:67:68:74 \\\n" " -name \\\"right\\\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1230 msgid "" "This configuration includes a `-drive` specification with the `id=usbstick`, " "raw format, and an image file (must be created by man:qemu-img[1]). The " "next line contains the `-device usb-ehci` specification for a USB EHCI " "controller, with `id=ehci`. Finally, a `-device usb-storage` specification " "ties the above drive to the EHCI USB bus." msgstr "" "Эта конфигурация включает спецификацию `-drive` с `id=usbstick`, формат raw " "и файл образ (который должен быть создан с помощью man:qemu-img[1]). " "Следующая строка содержит спецификацию `-device usb-ehci` для контроллера " "USB EHCI с `id=ehci`. Наконец, спецификация `-device usb-storage` связывает " "указанный накопитель с шиной USB EHCI." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1234 msgid "" "When the system is booted, FreeBSD will recognize a USB hub, add the " "attached USB device, and assign it to `da0` as shown in crossref:" "virtualization[qemu-usb-internal-storage,Figure {counter:figure}]." msgstr "" "При загрузке системы FreeBSD распознает USB-концентратор, добавит " "подключенное USB-устройство и назначит его на `da0`, как показано на " "crossref:virtualization[qemu-usb-internal-storage,рисунке {counter:figure}]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1236 #, no-wrap msgid "QEMU Created USB Hub and Mass Storage Device" msgstr "QEMU Созданные USB-концентратор и устройство хранения данных" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1237 #, no-wrap msgid "qemu-freebsd12.png" msgstr "qemu-freebsd12.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1241 msgid "" "The device is ready to be partitioned with man:gpart[8], and formatted with " "man:newfs[8]. Because the USB device is backed by a man:qemu-img[1] created " "file, data written to the device will persist across reboots." msgstr "" "Устройство готово к разделению с помощью man:gpart[8] и форматированию с " "помощью man:newfs[8]. Поскольку USB-устройство использует файл, созданный " "man:qemu-img[1], записанные на него данные сохранятся после перезагрузки." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1243 #, no-wrap msgid "Using Host USB Devices via Passthrough" msgstr "Использование USB-устройств хоста через проброс (passthrough)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1247 msgid "" "QEMU USB passthrough support is listed as experimental in version 9.0.1 " "(Summer, 2024). However, the following steps show how a USB stick mounted " "on the host can be used by the guest VM." msgstr "" "Поддержка проброса USB в QEMU указана как экспериментальная в версии 9.0.1 " "(лето 2024 года). Тем не менее, следующие шаги показывают, как USB-" "накопитель, подключённый к хосту, может быть использован в гостевой ВМ." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1249 msgid "For more information and examples, see:" msgstr "Для получения дополнительной информации и примеров см.:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1251 msgid "link:https://www.qemu.org/docs/master/system/devices/usb.html[]" msgstr "link:https://www.qemu.org/docs/master/system/devices/usb.html[]" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1253 msgid "" "The upper part of crossref:virtualization[qemu-usb-passthrough,Figure " "{counter:figure}] shows the QEMU monitor commands:" msgstr "" "Верхняя часть crossref:virtualization[qemu-usb-passthrough,рисунка {counter:" "figure}] показывает команды монитора QEMU:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1258 msgid "" "`info usbhost` shows information about all USB devices on the host system. " "Find the desired USB device on the host system and note the two hexadecimal " "values on that line. (In the example below the host USB device is a Memorex " "Mini, with vendorid 0718, and productid 0619.) Use the two values shown by " "the `info usbhost` command in the `device_add` step below." msgstr "" "`info usbhost` отображает информацию обо всех USB-устройствах в хост-" "системе. Найдите нужное USB-устройство в хост-системе и запишите два " "шестнадцатеричных значения в соответствующей строке. (В примере ниже хост-" "устройство — это Memorex Mini с vendorid 0718 и productid 0619.) Используйте " "эти два значения, показанные командой `info usbhost`, на этапе `device_add` " "ниже." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1259 msgid "`device_add` adds a USB device to the guest VM." msgstr "`device_add` добавляет USB-устройство в гостевую ВМ." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1261 #, no-wrap msgid "QEMU Monitor Commands to Access a USB Device on the Host" msgstr "Команды монитора QEMU для доступа к USB-устройству на хосте" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1262 #, no-wrap msgid "qemu-freebsd18.png" msgstr "qemu-freebsd18.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1265 msgid "" "As before, once `device_add` completes, the FreeBSD kernel recognizes a new " "USB device, as shown in the lower half of the ." msgstr "" "Как и ранее, после завершения `device_add` ядро FreeBSD распознает новое USB-" "устройство, как показано в нижней части экрана." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1268 msgid "" "Using the new device is shown in crossref:virtualization[qemu-usb-" "passthrough2,Figure {counter:figure}]." msgstr "" "Использование нового устройства показано на crossref:virtualization[qemu-usb-" "passthrough2,рисунке {counter:figure}]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1270 #, no-wrap msgid "Using the Host USB Device via Passthrough" msgstr "Использование USB-устройства хоста через проброс (passthrough)" #. type: Target for macro image #: documentation/content/en/books/handbook/virtualization/_index.adoc:1271 #, no-wrap msgid "qemu-freebsd19.png" msgstr "qemu-freebsd19.png" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1276 msgid "" "If the USB device is formatted as a FAT16 or FAT32 filesystem it can be " "mounted as an MS-DOS(TM) filesystem with man:mount_msdosfs[8] as in the " "example shown. The `/etc/hosts` file is copied to the newly mounted drive " "and checksums are taken to verify the integrity of the file on the USB " "device. The device is then unmounted with man:umount[8]." msgstr "" "Если USB-устройство отформатировано как файловая система FAT16 или FAT32, " "его можно подключить как файловую систему MS-DOS(TM) с помощью man:" "mount_msdosfs[8], как показано в примере. Файл `/etc/hosts` копируется на " "только что подключённый диск, и для проверки целостности файла на USB-" "устройстве вычисляются контрольные суммы. Затем устройство отключается с " "помощью man:umount[8]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1278 msgid "" "If the USB device is formatted with NTFS it is necessary to install the " "`fusefs-ntfs` package and use man:ntfs-3g[8] to access the device:" msgstr "" "Если USB-устройство отформатировано в NTFS, необходимо установить пакет " "`fusefs-ntfs` и использовать man:ntfs-3g[8] для доступа к устройству:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1285 #, no-wrap msgid "" "# pkg install fusefs-ntfs\n" "# kldload fusefs\n" "# gpart show da1\n" "# ntfs-3g /dev/da1s1 /mnt\n" msgstr "" "# pkg install fusefs-ntfs\n" "# kldload fusefs\n" "# gpart show da1\n" "# ntfs-3g /dev/da1s1 /mnt\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1287 #, no-wrap msgid "Access the drive as needed. When finished:\n" msgstr "Access the drive as needed. When finished:\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1289 #, no-wrap msgid "# umount /mnt\n" msgstr "# umount /mnt\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1293 msgid "" "Change the above device identifiers to match the installed hardware. " "Consult man:ntfs-3g[8] for additional information on working with NTFS " "filesystems." msgstr "" "Замените приведённые выше идентификаторы устройств в соответствии с " "установленным оборудованием. Дополнительную информацию о работе с файловыми " "системами NTFS см. в man:ntfs-3g[8]." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1295 #, no-wrap msgid "QEMU on FreeBSD Summary" msgstr "Краткое описание QEMU на FreeBSD" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1298 msgid "" "As noted above, QEMU works with several different hypervisor accelerators." msgstr "" "Как упоминалось выше, QEMU работает с несколькими различными гипервизорными " "ускорителями." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1300 msgid "" "The list of link:https://www.qemu.org/docs/master/system/introduction." "html#virtualisation-accelerators[Virtualization Accelerators] supported by " "QEMU includes:" msgstr "" "Список поддерживаемых QEMU link:https://www.qemu.org/docs/master/system/" "introduction.html#virtualisation-accelerators[ускорителей виртуализации] " "включает:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1302 msgid "`KVM` on Linux supporting 64 bit Arm, MIPS, PPC, RISC-V, s390x, and x86" msgstr "" "`KVM` в Linux с поддержкой 64-битных архитектур Arm, MIPS, PPC, RISC-V, " "s390x и x86" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1303 msgid "`Xen` on Linux as dom0 supporting Arm, x86" msgstr "`Xen` на Linux в качестве dom0 с поддержкой Arm и x86" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1304 msgid "" "`Hypervisor Framework (hvf)` on MacOS supporting x86 and Arm (both 64 bit " "only)" msgstr "" "`Hypervisor Framework (hvf)` в macOS с поддержкой x86 и Arm (только 64-" "битные)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1305 msgid "`Windows Hypervisor Platform (whpx)` on Windows supporting x86" msgstr "`Windows Hypervisor Platform (whpx)` в Windows с поддержкой x86" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1306 msgid "`NetBSD Virtual Machine Monitor (nvmm)` on NetBSD supporting x86" msgstr "`Диспетчер виртуальных машин NetBSD (nvmm)` на NetBSD с поддержкой x86" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1307 msgid "" "`Tiny Code Generator (tcg)` on Linux and other POSIX, Windows, MacOS " "supporting Arm, x86, Loongarch64, MIPS, PPC, s390x, and Sparc64." msgstr "" "`Tiny Code Generator (tcg)` на Linux и других POSIX-совместимых системах, " "Windows, macOS с поддержкой Arm, x86, Loongarch64, MIPS, PPC, s390x и " "Sparc64." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1309 msgid "" "All the examples in this section used the `Tiny Code Generator (tcg)` " "accelerator as that is the only supported accelerator on FreeBSD at present." msgstr "" "Все примеры в этом разделе использовали ускоритель `Tiny Code Generator " "(tcg)`, так как это единственный поддерживаемый ускоритель в FreeBSD на " "данный момент." #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:1311 #, no-wrap msgid "FreeBSD as a Host with bhyve" msgstr "FreeBSD в качестве хоста с bhyve" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1317 msgid "" "The bhyve BSD-licensed hypervisor became part of the base system with " "FreeBSD 10.0-RELEASE. This hypervisor supports several guests, including " "FreeBSD, OpenBSD, many Linux(R) distributions, and Microsoft Windows(R). By " "default, bhyve provides access to a serial console and does not emulate a " "graphical console. Virtualization offload features of newer CPUs are used " "to avoid the legacy methods of translating instructions and manually " "managing memory mappings." msgstr "" "Гипервизор bhyve с лицензией BSD стал частью базовой системы начиная с " "FreeBSD 10.0-RELEASE. Этот гипервизор поддерживает несколько гостевых " "систем, включая FreeBSD, OpenBSD, многие дистрибутивы Linux(R) и Microsoft " "Windows(R). По умолчанию bhyve предоставляет доступ к последовательной " "консоли и не эмулирует графическую консоль. Функции оффлоадинга " "виртуализации современных процессоров используются для избежания устаревших " "методов трансляции инструкций и ручного управления отображением памяти." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1319 msgid "The bhyve design requires" msgstr "Дизайн bhyve требует" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1321 msgid "an Intel(R) processor that supports Intel Extended Page Tables (EPT)," msgstr "процессор Intel(R), поддерживающий Intel Extended Page Tables (EPT)," #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1322 msgid "" "or an AMD(R) processor that supports AMD Rapid Virtualization Indexing " "(RVI), or Nested Page Tables (NPT)," msgstr "" "или процессор AMD(R), поддерживающий AMD Rapid Virtualization Indexing (RVI) " "или Nested Page Tables (NPT)," #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1323 msgid "or an ARM(R) aarch64 CPU." msgstr "или процессор ARM(R) aarch64." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1326 msgid "" "Only pure ARMv8.0 virtualization is supported on ARM, the Virtualization " "Host Extensions are not currently used. Hosting Linux(R) guests or FreeBSD " "guests with more than one vCPU requires VMX unrestricted mode support (UG)." msgstr "" "На ARM поддерживается только чистая виртуализация ARMv8.0, расширения " "Virtualization Host Extensions в настоящее время не используются. Для " "запуска гостевых систем Linux(R) или FreeBSD с более чем одним vCPU " "требуется поддержка неограниченного режима VMX (UG)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1328 msgid "" "The easiest way to tell if an Intel or AMD processor supports bhyve is to " "run `dmesg` or look in [.filename]#/var/run/dmesg.boot# for the `POPCNT` " "processor feature flag on the `Features2` line for AMD(R) processors or " "`EPT` and `UG` on the `VT-x` line for Intel(R) processors." msgstr "" "Самый простой способ проверить, поддерживает ли процессор Intel или AMD " "технологию bhyve, — выполнить команду `dmesg` или посмотреть в файле [." "filename]#/var/run/dmesg.boot# флаг `POPCNT` в строке `Features2` для " "процессоров AMD(R) или флаги `EPT` и `UG` в строке `VT-x` для процессоров " "Intel(R)." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1330 #, no-wrap msgid "Preparing the Host" msgstr "Подготовка хоста" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1334 msgid "" "The first step to creating a virtual machine in bhyve is configuring the " "host system. First, load the bhyve kernel module:" msgstr "" "Первым шагом к созданию виртуальной машины в bhyve является настройка " "хостовой системы. Сначала загрузите модуль ядра bhyve:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1338 #, no-wrap msgid "# kldload vmm\n" msgstr "# kldload vmm\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1343 msgid "" "There are several ways to connect a virtual machine guest to a host's " "network; one straightforward way to accomplish this is to create a [." "filename]#tap# interface for the network device in the virtual machine to " "attach to. For the network device to participate in the network, also " "create a bridge interface containing the [.filename]#tap# interface and the " "physical interface as members. In this example, the physical interface is " "_igb0_:" msgstr "" "Существует несколько способов подключения гостевой виртуальной машины к сети " "хоста; один из простых способов — создать интерфейс [.filename]#tap#, к " "которому подключится сетевое устройство виртуальной машины. Чтобы сетевое " "устройство могло участвовать в сети, также необходимо создать мостовой " "интерфейс, включающий интерфейс [.filename]#tap# и физический интерфейс в " "качестве членов. В данном примере физический интерфейс — это _igb0_:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1352 #, no-wrap msgid "" "# ifconfig tap0 create\n" "# sysctl net.link.tap.up_on_open=1\n" "net.link.tap.up_on_open: 0 -> 1\n" "# ifconfig bridge0 create\n" "# ifconfig bridge0 addm igb0 addm tap0\n" "# ifconfig bridge0 up\n" msgstr "" "# ifconfig tap0 create\n" "# sysctl net.link.tap.up_on_open=1\n" "net.link.tap.up_on_open: 0 -> 1\n" "# ifconfig bridge0 create\n" "# ifconfig bridge0 addm igb0 addm tap0\n" "# ifconfig bridge0 up\n" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1355 #, no-wrap msgid "Creating a FreeBSD Guest" msgstr "Создание гостевой системы FreeBSD" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1359 msgid "" "Create a file to use as the virtual disk for the guest machine. Specify the " "size and name of the virtual disk:" msgstr "" "Создайте файл, который будет использоваться как виртуальный диск для " "гостевой машины. Укажите размер и имя виртуального диска:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1363 #, no-wrap msgid "# truncate -s 16G guest.img\n" msgstr "# truncate -s 16G guest.img\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1366 msgid "Download an installation image of FreeBSD to install:" msgstr "Скачать образ установки FreeBSD для установки:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1371 #, no-wrap msgid "" "# fetch https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso\n" "FreeBSD-14.0-RELEASE-amd64-bootonly.iso 426 MB 16 MBps 22s\n" msgstr "" "# fetch https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso\n" "FreeBSD-14.0-RELEASE-amd64-bootonly.iso 426 MB 16 MBps 22s\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1376 msgid "" "FreeBSD comes with an example script `vmrun.sh` for running a virtual " "machine in bhyve. It will start the virtual machine and run it in a loop, " "so it will automatically restart if it crashes. `vmrun.sh` takes several " "options to control the configuration of the machine, including:" msgstr "" "FreeBSD включает пример скрипта `vmrun.sh` для запуска виртуальной машины в " "bhyve. Он запускает виртуальную машину и выполняет её в цикле, поэтому она " "автоматически перезапустится в случае сбоя. `vmrun.sh` принимает несколько " "опций для управления конфигурацией машины, включая:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1378 msgid "`-c` controls the number of virtual CPUs," msgstr "`-c` управляет количеством виртуальных процессоров," #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1379 msgid "`-m` limits the amount of memory available to the guest," msgstr "`-m` ограничивает объём памяти, доступной гостевой системе," #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1380 msgid "`-t` defines which [.filename]#tap# device to use," msgstr "`-t` указывает, какой [.filename]#tap#-устройство использовать," #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1381 msgid "`-d` indicates which disk image to use," msgstr "`-d` указывает, какой образ диска использовать," #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1382 msgid "`-i` tells bhyve to boot from the CD image instead of the disk, and" msgstr "`-i` указывает bhyve загружаться с образа CD вместо диска, и" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1383 msgid "`-I` defines which CD image to use." msgstr "`-I` определяет, какой образ CD использовать." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1386 msgid "" "The last parameter is the name of the virtual machine and is used to track " "the running machines. The following command lists all available program " "argument options:" msgstr "" "Последний параметр — это имя виртуальной машины, которое используется для " "отслеживания работающих машин. Следующая команда выводит список всех " "доступных аргументов программы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1390 #, no-wrap msgid "# sh /usr/share/examples/bhyve/vmrun.sh -h\n" msgstr "# sh /usr/share/examples/bhyve/vmrun.sh -h\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1393 msgid "This example starts the virtual machine in installation mode:" msgstr "Этот пример запускает виртуальную машину в режиме установки:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1398 #, no-wrap msgid "" "# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M -t tap0 -d guest.img \\\n" " -i -I FreeBSD-14.0-RELEASE-amd64-bootonly.iso guestname\n" msgstr "" "# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M -t tap0 -d guest.img \\\n" " -i -I FreeBSD-14.0-RELEASE-amd64-bootonly.iso guestname\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1402 msgid "" "The virtual machine will boot and start the installer. After installing a " "system in the virtual machine, when the system asks about dropping into a " "shell at the end of the installation, choose btn:[Yes]." msgstr "" "Виртуальная машина загрузится и запустит установщик. После установки системы " "в виртуальной машине, когда система предложит перейти в оболочку в конце " "установки, выберите btn:[Да]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1407 msgid "" "Reboot the virtual machine. While rebooting the virtual machine causes " "bhyve to exit, the [.filename]#vmrun.sh# script runs `bhyve` in a loop and " "will automatically restart it. When this happens, choose the reboot option " "from the boot loader menu to escape the loop. Now the guest can be started " "from the virtual disk:" msgstr "" "Перезагрузите виртуальную машину. Хотя перезагрузка виртуальной машины " "приводит к выходу из bhyve, скрипт [.filename]#vmrun.sh# запускает `bhyve` в " "цикле и автоматически перезапустит его. Когда это произойдет, выберите опцию " "перезагрузки в меню загрузчика, чтобы выйти из цикла. Теперь гостевую " "систему можно запустить с виртуального диска:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1411 #, no-wrap msgid "# sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img guestname\n" msgstr "# sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d guest.img guestname\n" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1414 #, no-wrap msgid "Creating a Linux(R) Guest" msgstr "Создание гостевой системы Linux(R)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1417 msgid "" "Linux guests can be booted either like any other regular crossref:" "virtualization[virtualization-bhyve-uefi,\"UEFI-based guest\"] virtual " "machine, or alternatively, use the package:sysutils/grub2-bhyve[] port." msgstr "" "Гостевые системы Linux можно загружать как любую другую обычную виртуальную " "машину на основе crossref:virtualization[virtualization-bhyve-uefi,\"UEFI\"]" ", либо, в качестве альтернативы, можно использовать порт package:sysutils/" "grub2-bhyve[]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1419 msgid "" "To do this, first ensure that the port is installed, then create a file to " "use as the virtual disk for the guest machine:" msgstr "" "Для этого сначала убедитесь, что порт установлен, затем создайте файл, " "который будет использоваться как виртуальный диск для гостевой машины:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1423 #, no-wrap msgid "# truncate -s 16G linux.img\n" msgstr "# truncate -s 16G linux.img\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1426 msgid "" "Starting a Linux virtual machine with `grub2-bhyve` is a two-step process." msgstr "" "Запуск виртуальной машины Linux с `grub2-bhyve` — это двухэтапный процесс." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1428 msgid "First a kernel must be loaded, then the guest can be started." msgstr "" "Сначала необходимо загрузить ядро, затем можно запустить гостевую систему." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1429 msgid "The Linux(R) kernel is loaded with package:sysutils/grub2-bhyve[]." msgstr "" "Ядро Linux(R) загружается с помощью пакета package:sysutils/grub2-bhyve[]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1431 msgid "" "Create a [.filename]#device.map# that grub will use to map the virtual " "devices to the files on the host system:" msgstr "" "Создайте файл [.filename]#device.map#, который grub будет использовать для " "сопоставления виртуальных устройств с файлами в хостовой системе:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1436 #, no-wrap msgid "" "(hd0) ./linux.img\n" "(cd0) ./somelinux.iso\n" msgstr "" "(hd0) ./linux.img\n" "(cd0) ./somelinux.iso\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1439 msgid "" "Use package:sysutils/grub2-bhyve[] to load the Linux(R) kernel from the ISO " "image:" msgstr "" "Используйте package:sysutils/grub2-bhyve[] для загрузки ядра Linux(R) из " "образа ISO:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1443 #, no-wrap msgid "# grub-bhyve -m device.map -r cd0 -M 1024M linuxguest\n" msgstr "# grub-bhyve -m device.map -r cd0 -M 1024M linuxguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1448 msgid "" "This will start grub. If the installation CD contains a [.filename]#grub." "cfg#, a menu will be displayed. If not, the `vmlinuz` and `initrd` files " "must be located and loaded manually:" msgstr "" "Это запустит grub. Если на установочном CD содержится файл [.filename]#grub." "cfg#, будет отображено меню. Если нет, файлы `vmlinuz` и `initrd` необходимо " "найти и загрузить вручную:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1459 #, no-wrap msgid "" "grub> ls\n" "(hd0) (cd0) (cd0,msdos1) (host)\n" "grub> ls (cd0)/isolinux\n" "boot.cat boot.msg grub.conf initrd.img isolinux.bin isolinux.cfg memtest\n" "splash.jpg TRANS.TBL vesamenu.c32 vmlinuz\n" "grub> linux (cd0)/isolinux/vmlinuz\n" "grub> initrd (cd0)/isolinux/initrd.img\n" "grub> boot\n" msgstr "" "grub> ls\n" "(hd0) (cd0) (cd0,msdos1) (host)\n" "grub> ls (cd0)/isolinux\n" "boot.cat boot.msg grub.conf initrd.img isolinux.bin isolinux.cfg memtest\n" "splash.jpg TRANS.TBL vesamenu.c32 vmlinuz\n" "grub> linux (cd0)/isolinux/vmlinuz\n" "grub> initrd (cd0)/isolinux/initrd.img\n" "grub> boot\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1462 msgid "Now that the Linux(R) kernel is loaded, the guest can be started:" msgstr "" "Теперь, когда ядро Linux(R) загружено, можно запустить гостевую систему:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1468 #, no-wrap msgid "" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \\\n" " -s 3:0,virtio-blk,./linux.img -s 4:0,ahci-cd,./somelinux.iso \\\n" " -l com1,stdio -c 4 -m 1024M linuxguest\n" msgstr "" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \\\n" " -s 3:0,virtio-blk,./linux.img -s 4:0,ahci-cd,./somelinux.iso \\\n" " -l com1,stdio -c 4 -m 1024M linuxguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1474 msgid "" "The system will boot and start the installer. After installing a system in " "the virtual machine, reboot the virtual machine. This will cause bhyve to " "exit. The instance of the virtual machine needs to be destroyed before it " "can be started again:" msgstr "" "Система загрузится и запустит установщик. После установки системы в " "виртуальной машине перезагрузите виртуальную машину. Это приведёт к " "завершению работы bhyve. Экземпляр виртуальной машины необходимо уничтожить " "перед тем, как его можно будет запустить снова:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1478 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1514 #, no-wrap msgid "# bhyvectl --destroy --vm=linuxguest\n" msgstr "# bhyvectl --destroy --vm=linuxguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1482 msgid "" "Now the guest can be started directly from the virtual disk. Load the " "kernel:" msgstr "" "Теперь гостевую систему можно запустить напрямую с виртуального диска. " "Загрузите ядро:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1496 #, no-wrap msgid "" "# grub-bhyve -m device.map -r hd0,msdos1 -M 1024M linuxguest\n" "grub> ls\n" "(hd0) (hd0,msdos2) (hd0,msdos1) (cd0) (cd0,msdos1) (host)\n" "(lvm/VolGroup-lv_swap) (lvm/VolGroup-lv_root)\n" "grub> ls (hd0,msdos1)/\n" "lost+found/ grub/ efi/ System.map-2.6.32-431.el6.x86_64 config-2.6.32-431.el6.x\n" "86_64 symvers-2.6.32-431.el6.x86_64.gz vmlinuz-2.6.32-431.el6.x86_64\n" "initramfs-2.6.32-431.el6.x86_64.img\n" "grub> linux (hd0,msdos1)/vmlinuz-2.6.32-431.el6.x86_64 root=/dev/mapper/VolGroup-lv_root\n" "grub> initrd (hd0,msdos1)/initramfs-2.6.32-431.el6.x86_64.img\n" "grub> boot\n" msgstr "" "# grub-bhyve -m device.map -r hd0,msdos1 -M 1024M linuxguest\n" "grub> ls\n" "(hd0) (hd0,msdos2) (hd0,msdos1) (cd0) (cd0,msdos1) (host)\n" "(lvm/VolGroup-lv_swap) (lvm/VolGroup-lv_root)\n" "grub> ls (hd0,msdos1)/\n" "lost+found/ grub/ efi/ System.map-2.6.32-431.el6.x86_64 config-2.6.32-431.el6.x\n" "86_64 symvers-2.6.32-431.el6.x86_64.gz vmlinuz-2.6.32-431.el6.x86_64\n" "initramfs-2.6.32-431.el6.x86_64.img\n" "grub> linux (hd0,msdos1)/vmlinuz-2.6.32-431.el6.x86_64 root=/dev/mapper/VolGroup-lv_root\n" "grub> initrd (hd0,msdos1)/initramfs-2.6.32-431.el6.x86_64.img\n" "grub> boot\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1499 msgid "Boot the virtual machine:" msgstr "Запустите виртуальную машину:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1504 #, no-wrap msgid "" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \\\n" " -s 3:0,virtio-blk,./linux.img -l com1,stdio -c 4 -m 1024M linuxguest\n" msgstr "" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \\\n" " -s 3:0,virtio-blk,./linux.img -l com1,stdio -c 4 -m 1024M linuxguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1510 msgid "" "Linux(R) will now boot in the virtual machine and eventually presents the " "login prompt. Login and use the virtual machine. When finished, reboot the " "virtual machine to exit bhyve. Destroy the virtual machine instance:" msgstr "" "Linux(R) теперь загрузится в виртуальной машине и в конечном итоге покажет " "приглашение для входа. Войдите в систему и используйте виртуальную машину. " "Когда вы закончите, перезагрузите виртуальную машину для выхода из bhyve. " "Уничтожьте экземпляр виртуальной машины:" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1517 #, no-wrap msgid "Booting bhyve Virtual Machines with UEFI Firmware" msgstr "Загрузка виртуальных машин bhyve с прошивкой UEFI" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1521 msgid "" "In addition to `bhyveload` and `grub-bhyve`, the bhyve hypervisor can also " "boot virtual machines using the UEFI firmware. This option may support " "guest operating systems that are not supported by the other loaders." msgstr "" "В дополнение к `bhyveload` и `grub-bhyve`, гипервизор bhyve также может " "загружать виртуальные машины с использованием прошивки UEFI. Этот вариант " "может поддерживать гостевые операционные системы, которые не поддерживаются " "другими загрузчиками." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1524 msgid "" "To make use of the UEFI support in bhyve, first obtain the UEFI firmware " "images. This can be done by installing package:sysutils/bhyve-firmware[] " "port or package." msgstr "" "Чтобы использовать поддержку UEFI в bhyve, сначала получите образы прошивки " "UEFI. Это можно сделать, установив порт package:sysutils/bhyve-firmware[] " "или пакет." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1527 msgid "" "With the firmware in place, add the flags `-l bootrom,_/path/to/firmware_` " "to the bhyve command line. The actual bhyve command may look like this:" msgstr "" "Имея микропрограмму, добавьте флаги `-l bootrom,_/путь/к/микропрограмме_` в " "командную строку bhyve. Фактическая команда bhyve может выглядеть так:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1535 #, no-wrap msgid "" "# bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" "\tguest\n" msgstr "" "# bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" "\tguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1540 msgid "" "To allow a guest to store UEFI variables, use a variables file appended to " "the `-l` flag. Note that bhyve will write guest modifications to the given " "variables file. Therefore, be sure to first create a per-guest-copy of the " "variables template file:" msgstr "" "Чтобы разрешить гостевой системе сохранять переменные UEFI, вы можете " "использовать файл переменных, указанный с флагом `-l`. Обратите внимание, " "что bhyve будет записывать изменения, внесённые гостевой системой, в " "указанный файл переменных. Поэтому убедитесь, что вы предварительно создали " "отдельную копию шаблонного файла переменных для каждой гостевой системы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1544 #, no-wrap msgid "# cp /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd /path/to/vm-image/BHYVE_UEFI_VARS.fd\n" msgstr "# cp /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd /path/to/vm-image/BHYVE_UEFI_VARS.fd\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1547 msgid "Then, add that variables file to the bhyve arguments:" msgstr "Затем добавьте этот файл переменных в аргументы bhyve:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1555 #, no-wrap msgid "" "# bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd,/path/to/vm-image/BHYVE_UEFI_VARS.fd \\\n" "\tguest\n" msgstr "" "# bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd,/path/to/vm-image/BHYVE_UEFI_VARS.fd \\\n" "\tguest\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1561 msgid "" "Some Linux distributions require the use of UEFI variables to store the path " "for their UEFI boot file (using `linux64.efi` or `grubx64.efi` instead of " "`bootx64.efi`, for example). It is therefore recommended to use a variables " "file for Linux virtual machines to avoid having to manually alter the boot " "partition files." msgstr "" "Некоторые дистрибутивы Linux требуют использования переменных UEFI для " "хранения пути к их загрузочному файлу UEFI (например, используют `linux64." "efi` или `grubx64.efi` вместо `bootx64.efi`). Поэтому рекомендуется " "использовать файл переменных для виртуальных машин Linux, чтобы избежать " "необходимости вручную изменять файлы загрузочного раздела." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1564 msgid "" "To view or modify the variables file contents, use man:efivar[8] from the " "host." msgstr "" "Для просмотра или изменения содержимого файла переменных используйте man:" "efivar[8] с хоста." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1566 msgid "" "package:sysutils/bhyve-firmware[] also contains a CSM-enabled firmware, to " "boot guests with no UEFI support in legacy BIOS mode:" msgstr "" "package:sysutils/bhyve-firmware[] также содержит прошивку с поддержкой CSM " "для загрузки гостевых систем без поддержки UEFI в режиме устаревшего BIOS:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1574 #, no-wrap msgid "" "# bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CSM.fd \\\n" "\tguest\n" msgstr "" "# bhyve -AHP -s 0:0,hostbridge -s 1:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CSM.fd \\\n" "\tguest\n" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1577 #, no-wrap msgid "Graphical UEFI Framebuffer for bhyve Guests" msgstr "Графический UEFI фреймбуфер для гостевых систем bhyve" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1580 msgid "" "The UEFI firmware support is particularly useful with predominantly " "graphical guest operating systems such as Microsoft Windows(R)." msgstr "" "Поддержка микропрограммы UEFI особенно полезна для преимущественно " "графических гостевых операционных систем, таких как Microsoft Windows(R)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1585 msgid "" "Support for the UEFI-GOP framebuffer may also be enabled with the `-s 29," "fbuf,tcp=_0.0.0.0:5900_` flags. The framebuffer resolution may be " "configured with `w=_800_` and `h=_600_`, and bhyve can be instructed to wait " "for a VNC connection before booting the guest by adding `wait`. The " "framebuffer may be accessed from the host or over the network via the VNC " "protocol. Additionally, `-s 30,xhci,tablet` can be added to achieve precise " "mouse cursor synchronization with the host." msgstr "" "Поддержка фреймбуфера UEFI-GOP также может быть включена с помощью флагов `-" "s 29,fbuf,tcp=_0.0.0.0:5900_`. Разрешение фреймбуфера можно настроить с " "помощью параметров `w=_800_` и `h=_600_`, а также можно указать bhyve " "ожидать подключения VNC перед загрузкой гостевой системы, добавив `wait`. " "Доступ к фреймбуферу возможен с хоста или по сети через протокол VNC. " "Дополнительно можно добавить `-s 30,xhci,tablet` для точной синхронизации " "курсора мыши с хостом." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1587 msgid "The resulting bhyve command would look like this:" msgstr "Результирующая команда bhyve будет выглядеть так:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1597 #, no-wrap msgid "" "# bhyve -AHP -s 0:0,hostbridge -s 31:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\\n" "\t-s 30,xhci,tablet \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" "\tguest\n" msgstr "" "# bhyve -AHP -s 0:0,hostbridge -s 31:0,lpc \\\n" " \t-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,./disk.img \\\n" "\t-s 4:0,ahci-cd,./install.iso -c 4 -m 1024M \\\n" "\t-s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \\\n" "\t-s 30,xhci,tablet \\\n" "\t-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" "\tguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1600 msgid "" "Note, in BIOS emulation mode, the framebuffer will cease receiving updates " "once control is passed from firmware to guest operating system." msgstr "" "Заметим, что в режиме эмуляции BIOS обновление кадрового буфера прекращается " "после передачи управления от микропрограммы гостевой операционной системе." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1602 #, no-wrap msgid "Creating a Microsoft Windows(R) Guest" msgstr "Создание гостевой системы Microsoft Windows(R)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1606 msgid "" "Setting up a guest for Windows versions 10 or earlier can be done directly " "from the original installation media and is a relatively straightforward " "process. Aside from minimum resource requirements, running Windows as guest " "requires" msgstr "" "Настройка гостевой системы для Windows версий 10 или более ранних может быть " "выполнена непосредственно с оригинального установочного носителя и является " "относительно простым процессом. Помимо минимальных требований к ресурсам, " "для работы Windows в качестве гостевой системы требуется" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1608 msgid "wiring virtual machine memory (flag `-w`) and" msgstr "привязка памяти виртуальной машины (флаг `-w`) и" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1609 msgid "booting with an UEFI bootrom." msgstr "загрузка с загрузочной памяти (bootrom) UEFI." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1611 msgid "" "An example for booting a virtual machine guest with a Windows installation " "ISO:" msgstr "" "Пример загрузки гостевой виртуальной машины с установочным ISO-образом " "Windows:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1625 #, no-wrap msgid "" "bhyve \\\n" " -c 2 \\\n" " -s 0,hostbridge \\\n" " -s 3,nvme,windows2016.img \\\n" " -s 4,ahci-cd,install.iso \\\n" " -s 10,virtio-net,tap0 \\\n" " -s 31,lpc \\\n" " -s 30,xhci,tablet \\\n" " -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" " -m 8G -H -w \\\n" " windows2016\n" msgstr "" "bhyve \\\n" " -c 2 \\\n" " -s 0,hostbridge \\\n" " -s 3,nvme,windows2016.img \\\n" " -s 4,ahci-cd,install.iso \\\n" " -s 10,virtio-net,tap0 \\\n" " -s 31,lpc \\\n" " -s 30,xhci,tablet \\\n" " -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" " -m 8G -H -w \\\n" " windows2016\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1628 msgid "" "Only one or two VCPUs should be used during installation but this number can " "be increased once Windows is installed." msgstr "" "Только один или два виртуальных процессора (VCPU) следует использовать во " "время установки, но их количество можно увеличить после установки Windows." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1632 msgid "" "link:https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README." "md[VirtIO drivers] must be installed to use the defined `virtio-net` network " "interface. An alternative is to switch to E1000 (Intel E82545) emulation by " "changing `virtio-net` to `e1000` in the above command line. However, " "performance will be impacted." msgstr "" "Для использования определённого сетевого интерфейса `virtio-net` необходимо " "установить link:https://github.com/virtio-win/virtio-win-pkg-scripts/blob/" "master/README.md[драйверы VirtIO]. Альтернативой является переключение на " "эмуляцию E1000 (Intel E82545) путем замены `virtio-net` на `e1000` в " "приведённой выше командной строке. Однако это повлияет на производительность." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:1634 #, no-wrap msgid "Creating a Windows 11 Guest" msgstr "Создание гостевой системы Windows 11" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1640 msgid "" "Beginning with Windows 11, Microsoft introduced a hardware requirement for a " "TPM 2 module. bhyve supports passing a hardware TPM through to a guest. " "The installation media can be modified to disable the relevant hardware " "checks. A detailed description for this process can be found on the link:" "https://wiki.freebsd.org/bhyve/Windows#iso-remaster[FreeBSD Wiki]." msgstr "" "Начиная с Windows 11, Microsoft ввела требование к оборудованию в виде " "модуля TPM 2. bhyve поддерживает передачу аппаратного TPM гостевой системе. " "Установочный носитель можно модифицировать для отключения соответствующих " "проверок оборудования. Подробное описание этого процесса доступно по ссылке " "link:https://wiki.freebsd.org/bhyve/Windows#iso-remaster[FreeBSD Wiki]." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1645 msgid "" "Modifying Windows installation media and running Windows guests without a " "TPM module are unsupported by the manufacturer. Consider the application " "and use case before implementing such approaches." msgstr "" "Изменение установочных носителей Windows и запуск гостевых систем Windows " "без модуля TPM не поддерживаются производителем. Учитывайте свои задачи и " "сценарии использования перед применением подобных методов." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1648 #, no-wrap msgid "Using ZFS with bhyve Guests" msgstr "Использование ZFS с гостевыми ВМ в bhyve" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1652 msgid "" "If ZFS is available on the host machine, using ZFS volumes instead of disk " "image files can provide significant performance benefits for the guest VMs. " "A ZFS volume can be created by:" msgstr "" "Если на хост-машине доступен ZFS, использование томов ZFS вместо файлов " "образов дисков может обеспечить значительное повышение производительности " "для гостевых ВМ. Том ZFS можно создать следующим образом:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1656 #, no-wrap msgid "# zfs create -V16G -o volmode=dev zroot/linuxdisk0\n" msgstr "# zfs create -V16G -o volmode=dev zroot/linuxdisk0\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1659 msgid "When starting the VM, specify the ZFS volume as the disk drive:" msgstr "При запуске ВМ укажите том ZFS в качестве диска:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1665 #, no-wrap msgid "" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \\\n" " \t-s3:0,virtio-blk,/dev/zvol/zroot/linuxdisk0 \\\n" "\t-l com1,stdio -c 4 -m 1024M linuxguest\n" msgstr "" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 \\\n" " \t-s3:0,virtio-blk,/dev/zvol/zroot/linuxdisk0 \\\n" "\t-l com1,stdio -c 4 -m 1024M linuxguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1670 msgid "" "When using ZFS for the host as well as inside a guest, keep in mind the " "competing memory pressure of both systems caching the virtual machine's " "contents. To alleviate this, consider setting the host's ZFS filesystems to " "use metadata-only cache. To do this, apply the following settings to ZFS " "filesystems on the host, replacing `` with the name of the specific " "zvol dataset name of the virtual machine." msgstr "" "Если вы используете ZFS как на хосте, так и внутри гостевой системы, " "учитывайте конкуренцию за память из-за кэширования содержимого виртуальной " "машины обеими системами. Чтобы уменьшить эту нагрузку, рассмотрите " "возможность настройки файловых систем ZFS на хосте для использования " "кэширования только метаданных. Для этого примените следующие параметры к " "файловым системам ZFS на хосте, заменив `` на имя конкретного zvol-" "набора данных виртуальной машины." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1674 #, no-wrap msgid "# zfs set primarycache=metadata \n" msgstr "# zfs set primarycache=metadata \n" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1677 #, no-wrap msgid "Creating a Virtual Machine Snapshot" msgstr "Создание снимка виртуальной машины" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1683 msgid "" "Modern hypervisors allow their users to create \"snapshots\" of their state; " "such a snapshot includes a guest's disk, CPU, and memory contents. A " "snapshot can usually be taken independent of whether the guest is running or " "shut down. One can then reset and return the virtual machine to the precise " "state when the snapshot was taken." msgstr "" "Современные гипервизоры позволяют своим пользователям создавать \"снимки\" " "состояния; такой снимок включает в себя диск гостевой системы, содержимое " "процессора и памяти. Снимок обычно можно сделать независимо от того, " "работает гостевая система или выключена. Затем можно сбросить и вернуть " "виртуальную машину в точное состояние на момент создания снимка." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:1685 #, no-wrap msgid "ZFS Snapshots" msgstr "Снимки ZFS" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1688 msgid "" "Using ZFS volumes as the backing storage for a virtual machine enables the " "snapshotting of the guest's disk. For example:" msgstr "" "Использование томов ZFS в качестве основного хранилища для виртуальной " "машины позволяет создавать снимки диска гостевой системы. Например:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1692 #, no-wrap msgid "zfs snapshot zroot/path/to/zvol@snapshot_name\n" msgstr "zfs snapshot zroot/path/to/zvol@snapshot_name\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1697 msgid "" "Though it is possible to snapshot a ZFS volume this way while the guest is " "running, keep in mind that the contents of the virtual disk may be in an " "inconsistent state while the guest is active. It is therefore recommended " "to first shutdown or pause the guest before executing this command. Pausing " "a guest is not supported by default and needs to be enabled first (see " "crossref:virtualization[virtualization-bhyve-snapshot-builtin,Memory and CPU " "Snapshots])" msgstr "" "Хотя можно создать снимок ZFS тома таким образом, пока гостевая система " "работает, следует учитывать, что содержимое виртуального диска может " "находиться в несогласованном состоянии, пока гость активен. Поэтому " "рекомендуется сначала завершить работу или приостановить гостевую систему " "перед выполнением этой команды. Функция приостановки гостевой системы не " "поддерживается по умолчанию и должна быть сначала включена (см. crossref:" "virtualization[virtualization-bhyve-snapshot-builtin,Снимки памяти и " "процессора])" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1702 msgid "" "Rolling back a ZFS zvol to a snapshot while a virtual machine is using it " "may corrupt the file system contents and crash the guest. All unsaved data " "in the guest will be lost and modifications since the last snapshot may get " "destroyed." msgstr "" "Откат ZFS zvol к снимку во время использования виртуальной машиной может " "повредить содержимое файловой системы и вызвать сбой гостевой ОС. Все " "несохранённые данные в гостевой системе будут потеряны, а изменения, " "сделанные после последнего снимка, могут быть уничтожены." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1705 msgid "" "A second rollback may be required once the virtual machine is shut down to " "restore the file system to a useable state. This in turn will ultimately " "destroy any changes made after the snapshot." msgstr "" "Повторный откат может потребоваться после выключения виртуальной машины, " "чтобы вернуть файловую систему в работоспособное состояние. Это, в свою " "очередь, окончательно уничтожит все изменения, сделанные после создания " "снимка." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:1708 #, no-wrap msgid "Memory and CPU Snapshots (Experimental Feature)" msgstr "Снимки памяти и процессора (экспериментальная функция)" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1712 msgid "" "As of FreeBSD 13, bhyve has an experimental \"snapshot\" feature for dumping " "a guest's memory and CPU state to a file and then halting the virtual " "machine. The guest can be resumed from the snapshot file contents later." msgstr "" "Начиная с FreeBSD 13, bhyve имеет экспериментальную функцию \"snapshot\" для " "сохранения состояния памяти и процессора гостевой системы в файл с " "последующей остановкой виртуальной машины. Гостевая система может быть " "возобновлена из содержимого файла снимка позже." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1715 msgid "" "However, this feature is not enabled by default and requires the system to " "be rebuilt from source. See crossref:cutting-edge[updating-src-building, " "Building from Source] for an in-depth description on the process of " "compiling the kernel with custom options." msgstr "" "Однако эта функция не включена по умолчанию и требует пересборки системы из " "исходного кода. Подробное описание процесса компиляции ядра с " "пользовательскими настройками приведено в crossref:cutting-edge[updating-src-" "building, Сборка из исходного кода]." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1720 msgid "" "The functionality is not ready for production use and limited to work for " "specific virtual machine configurations. There are multiple limitations:" msgstr "" "Функциональность не готова для промышленного использования и ограничена " "работой с определёнными конфигурациями виртуальных машин. Существует " "несколько ограничений:" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1722 msgid "`nvme` and `virtio-blk` storage backends do not work yet" msgstr "`nvme` и `virtio-blk` бэкенды хранения пока не работают" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1723 msgid "" "snapshots are only supported when the guest uses a single kind of each " "device, i.e. if there is more than one `ahci-hd` disk attached, snapshot " "creation will fail" msgstr "" "Снимки поддерживаются только в случае, если гостевая система использует один " "тип каждого устройства. То есть, если подключено более одного диска `ahci-" "hd`, создание снимка завершится ошибкой" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1724 msgid "" "additionally, the feature may be reasonably stable on Intel, but it probably " "won't work on AMD CPUs." msgstr "" "дополнительно, функция может быть достаточно стабильной на процессорах " "Intel, но, скорее всего, не будет работать на процессорах AMD." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1729 msgid "" "Make sure the [.filename]#/usr/src# directory is up-to date before taking " "the following steps. See crossref:cutting-edge[updating-src-obtaining-src, " "Updating the Source] for the detailed procedure how to do this." msgstr "" "Убедитесь, что каталог [.filename]#/usr/src# актуален, прежде чем выполнять " "следующие шаги. Подробная процедура обновления описана в разделе crossref" ":cutting-edge[updating-src-obtaining-src, Обновление исходного кода]." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1732 msgid "First, add the following to [.filename]#/etc/src.conf#:" msgstr "Добавьте следующее в [.filename]#/etc/src.conf#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1738 #, no-wrap msgid "" "WITH_BHYVE_SNAPHOT=yes\n" "BHYVE_SNAPSHOT=1\n" "MK_BHYVE_SNAPSHOT=yes\n" msgstr "" "WITH_BHYVE_SNAPHOT=yes\n" "BHYVE_SNAPSHOT=1\n" "MK_BHYVE_SNAPSHOT=yes\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1743 msgid "If the system was partially or wholly rebuilt, it is recommended to run" msgstr "" "Если система была частично или полностью пересобрана, рекомендуется выполнить" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1748 #, no-wrap msgid "" "# cd /usr/src\n" "# make cleanworld\n" msgstr "" "# cd /usr/src\n" "# make cleanworld\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1751 msgid "before proceeding." msgstr "прежде чем продолжить." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1754 msgid "" "Then follow the steps outlined in the crossref:cutting-edge[updating-src-" "quick-start,\"Quick Start section of the Updating FreeBSD from Source\"] " "chapter to build and install world and kernel." msgstr "" "Затем выполните шаги, описанные в подразделе crossref:cutting-edge[updating-" "src-quick-start,\"Быстрый старт\"] раздела Обновление FreeBSD из исходного " "кода , чтобы собрать и установить систему и ядро." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1756 msgid "To verify successful activation of the snapshot feature, enter" msgstr "Чтобы проверить успешную активацию функции снимков, введите" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1760 #, no-wrap msgid "# bhyvectl --usage\n" msgstr "# bhyvectl --usage\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1764 msgid "" "and check if the output lists a `--suspend` flag. If the flag is missing, " "the feature did not activate correctly." msgstr "" "и проверить, есть ли в выводе флаг `--suspend`. Если флаг отсутствует, " "значит функция не активировалась корректно." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1766 msgid "Then, snapshot and suspend a running virtual machine of choice:" msgstr "" "Затем вы можете создать снимок состояния и приостановить работающую " "виртуальную машину по вашему выбору:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1770 #, no-wrap msgid "# bhyvectl --vm=vmname --suspend=/path/to/snapshot/filename\n" msgstr "# bhyvectl --vm=vmname --suspend=/path/to/snapshot/filename\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1776 msgid "" "Provide an absolute path and filename to `--suspend`. Otherwise, bhyve will " "write snapshot data to whichever directory bhyve was started from." msgstr "" "Укажите абсолютный путь и имя файла для `--suspend`. В противном случае " "bhyve запишет данные снимка в тот каталог, из которого был запущен bhyve." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1779 msgid "" "Make sure to write the snapshot data to a secure directory. The generated " "output contains a full memory dump of the guest and may thus contain " "sensitive data (i.e. passwords)!" msgstr "" "Убедитесь, что записываете данные снимка в защищённый каталог. " "Сформированный вывод содержит полный дамп памяти гостевой системы и, " "следовательно, может включать конфиденциальные данные (например, пароли)!" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1782 msgid "This creates three files:" msgstr "Это создает три файла:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1784 msgid "memory snapshot - named like the input to `--suspend`" msgstr "моментальный снимок памяти — назван аналогично параметру `--suspend`" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1785 msgid "" "kernel file - name like the input to `--suspend` with the suffix [." "filename]#.kern#" msgstr "" "файл ядра — имя, аналогичное входному параметру `--suspend`, с суффиксом [." "filename]#.kern#" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1786 msgid "" "metadata - contains meta data about the system state, named with the suffix " "[.filename]#.meta#" msgstr "" "метаданные — содержит метаданные о состоянии системы, с именем, " "оканчивающимся на суффикс [.filename]#.meta#" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1788 msgid "To restore a guest from a snapshot, use the `-r` flag with `bhyve`:" msgstr "" "Для восстановления гостевой системы из снимка используйте флаг `-r` с " "`bhyve`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1792 #, no-wrap msgid "# bhyve -r /path/to/snapshot/filename\n" msgstr "# bhyve -r /path/to/snapshot/filename\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1796 msgid "" "Restoring a guest snapshot on a different CPU architecture will not work. " "Generally, attempting to restore on a system not identical to the snapshot " "creator will likely fail." msgstr "" "Восстановление снимка гостевой системы на архитектуре процессора, отличной " "от исходной, невозможно. Как правило, попытка восстановления на системе, не " "идентичной той, на которой был создан снимок, скорее всего, завершится " "неудачей." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:1798 #, no-wrap msgid "Jailing bhyve" msgstr "bhyve в клетке" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1802 msgid "" "For improved security and separation of virtual machines from the host " "operating system, it is possible to run bhyve in a jail. See crossref:" "jails[,Jails] for an in-depth description of jails and their security " "benefits." msgstr "" "Для повышения безопасности и изоляции виртуальных машин от основной " "операционной системы можно запускать bhyve в клетке. См. crossref:jails[," "Клетки] для подробного описания клеток и их преимуществ в плане безопасности." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:1804 #, no-wrap msgid "Creating a Jail for bhyve" msgstr "Создание клетки для bhyve" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1807 msgid "" "First, create a jail environment. If using a UFS file system, simply run:" msgstr "" "Сначала создайте окружение клетки. Если используется файловая система UFS, " "просто выполните:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1811 #, no-wrap msgid "# mkdir -p /jails/bhyve\n" msgstr "# mkdir -p /jails/bhyve\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1814 msgid "If using a crossref:zfs[,ZFS filesystem], use the following commands:" msgstr "" "Если используется crossref:zfs[,файловая система ZFS], выполните следующие " "команды:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1819 #, no-wrap msgid "" "# zfs create zroot/jails\n" "# zfs create zroot/jails/bhyve\n" msgstr "" "# zfs create zroot/jails\n" "# zfs create zroot/jails/bhyve\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1822 msgid "Then create a ZFS zvol for the virtual machine `bhyvevm0`:" msgstr "Затем создайте ZFS zvol для виртуальной машины `bhyvevm0`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1827 #, no-wrap msgid "" "# zfs create zroot/vms\n" "# zfs create -V 20G zroot/vms/bhyvevm0\n" msgstr "" "# zfs create zroot/vms\n" "# zfs create -V 20G zroot/vms/bhyvevm0\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1830 msgid "" "If not using ZFS, use the following commands to create a disk image file " "directly in the jail directory structure:" msgstr "" "Если ZFS не используется, для создания файла образа диска непосредственно в " "структуре каталогов клетки применяйте следующие команды:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1835 #, no-wrap msgid "" "# mkdir /jails/bhyve/vms\n" "# truncate -s 20G /jails/bhyve/vms/bhyvevm0\n" msgstr "" "# mkdir /jails/bhyve/vms\n" "# truncate -s 20G /jails/bhyve/vms/bhyvevm0\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1838 msgid "" "Download a FreeBSD image, preferably a version equal to or older than the " "host and extract it into the jail directory:" msgstr "" "Загрузите образ FreeBSD, предпочтительно версии, равной или более старой, " "чем на хосте, и извлеките его в каталог клетки:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1844 #, no-wrap msgid "" "# cd /jails\n" "# fetch -o base.txz http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.2-RELEASE/base.txz\n" "# tar -C /jails/bhyve -xvf base.txz\n" msgstr "" "# cd /jails\n" "# fetch -o base.txz http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.2-RELEASE/base.txz\n" "# tar -C /jails/bhyve -xvf base.txz\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1849 msgid "" "Running a higher FreeBSD version in a jail than the host is unsupported (i." "e. running 14.0-RELEASE in a jail, embedded in a 13.2-RELEASE host)." msgstr "" "Запуск более высокой версии FreeBSD в клетке, чем на хосте, не " "поддерживается (например, запуск 14.0-RELEASE в jail на хосте с 13.2-" "RELEASE)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1852 msgid "Next, add a devfs ruleset to [.filename]#/etc/devfs.rules#:" msgstr "Далее добавьте набор правил devfs в [.filename]#/etc/devfs.rules#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1876 #, no-wrap msgid "" "[devfsrules_jail_bhyve=100]\n" "add include $devfsrules_hide_all\n" "add include $devfsrules_unhide_login\n" "add path 'urandom' unhide\n" "add path 'random' unhide\n" "add path 'crypto' unhide\n" "add path 'shm' unhide\n" "add path 'zero' unhide\n" "add path 'null' unhide\n" "add path 'mem' unhide\n" "add path 'vmm' unhide\n" "add path 'vmm/*' unhide\n" "add path 'vmm.io' unhide\n" "add path 'vmm.io/*' unhide\n" "add path 'nmdmbhyve*' unhide\n" "add path 'zvol' unhide\n" "add path 'zvol/zroot' unhide\n" "add path 'zvol/zroot/vms' unhide\n" "add path 'zvol/zroot/vms/bhyvevm0' unhide\n" "add path 'zvol/zroot/vms/bhyvevm1' unhide\n" "add path 'tap10*' unhide\n" msgstr "" "[devfsrules_jail_bhyve=100]\n" "add include $devfsrules_hide_all\n" "add include $devfsrules_unhide_login\n" "add path 'urandom' unhide\n" "add path 'random' unhide\n" "add path 'crypto' unhide\n" "add path 'shm' unhide\n" "add path 'zero' unhide\n" "add path 'null' unhide\n" "add path 'mem' unhide\n" "add path 'vmm' unhide\n" "add path 'vmm/*' unhide\n" "add path 'vmm.io' unhide\n" "add path 'vmm.io/*' unhide\n" "add path 'nmdmbhyve*' unhide\n" "add path 'zvol' unhide\n" "add path 'zvol/zroot' unhide\n" "add path 'zvol/zroot/vms' unhide\n" "add path 'zvol/zroot/vms/bhyvevm0' unhide\n" "add path 'zvol/zroot/vms/bhyvevm1' unhide\n" "add path 'tap10*' unhide\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1881 msgid "" "If there's another devfs rule with the numeric ID 100 in the [.filename]#/" "etc/devfs.rules# file, replace the one in the listing with another yet " "unused ID number." msgstr "" "Если в вашем файле [.filename]#/etc/devfs.rules# уже есть другое правило " "devfs с числовым идентификатором 100, замените указанный в примере " "идентификатор на другой, ещё не использованный." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1886 msgid "" "If not using a ZFS filesystem, skip the related zvol rules in [.filename]#/" "etc/devfs.rules#:" msgstr "" "Если не используется файловая система ZFS, пропустите связанные с zvol " "правила в [.filename]#/etc/devfs.rules#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1894 #, no-wrap msgid "" "add path 'zvol' unhide\n" "add path 'zvol/zroot' unhide\n" "add path 'zvol/zroot/vms' unhide\n" "add path 'zvol/zroot/vms/bhyvevm0' unhide\n" "add path 'zvol/zroot/vms/bhyvevm1' unhide\n" msgstr "" "add path 'zvol' unhide\n" "add path 'zvol/zroot' unhide\n" "add path 'zvol/zroot/vms' unhide\n" "add path 'zvol/zroot/vms/bhyvevm0' unhide\n" "add path 'zvol/zroot/vms/bhyvevm1' unhide\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1898 msgid "These rules will cause bhyve to" msgstr "Эти правила приведут к тому, что bhyve" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1900 msgid "" "create a virtual machine with disk volumes called `bhyvevm0` and `bhyvevm1`," msgstr "создаст виртуальную машину с дисковыми томами `bhyvevm0` и `bhyvevm1`," #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1902 msgid "" "use [.filename]#tap# network interfaces with the name prefix `tap10`. That " "means, valid interface names will be `tap10`, `tap100`, `tap101`, ... " "`tap109`, `tap1000` and so on." msgstr "" "будет использовать сетевые интерфейсы [.filename]#tap# с префиксом имени " "`tap10`. Это означает, что допустимыми именами интерфейсов будут `tap10`, " "`tap100`, `tap101`, ... `tap109`, `tap1000` и так далее." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1904 msgid "" "Limiting the access to a subset of possible [.filename]#tap# interface names " "will prevent the jail (and thus bhyve) from seeing [.filename]#tap# " "interfaces of the host and other jails." msgstr "" "Ограничение доступа к подмножеству возможных имён интерфейсов [." "filename]#tap# предотвратит доступ клетки (и, следовательно, bhyve) к " "интерфейсам [.filename]#tap# хоста и других клеток." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1905 msgid "" "use [.filename]#nmdm# devices prefixed with \"bhyve\", i.e. [.filename]#/dev/" "nmdmbhyve0#." msgstr "" "используйте устройства [.filename]#nmdm# с префиксом \"bhyve\", например [." "filename]#/dev/nmdmbhyve0#." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1907 msgid "" "Those rules can be expanded and varied with different guest and interface " "names as desired." msgstr "" "Эти правила можно расширять и изменять, используя различные имена гостевых " "систем и интерфейсов по необходимости." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1912 msgid "" "When intending to use bhyve on the host as well as in a one or more jails, " "remember that [.filename]#tap# and [.filename]#nmdm# interface names will " "operate in a shared environment. For example, use [.filename]#/dev/" "nmdmbhyve0# only either for bhyve on the host or in a jail." msgstr "" "Если вы планируете использовать bhyve как на хосте, так и в одной или " "нескольких клеток, помните, что имена интерфейсов [.filename]#tap# и [." "filename]#nmdm# будут работать в общей среде. Например, [.filename]#/dev/" "nmdmbhyve0# можно использовать либо для bhyve на хосте, либо в клетке." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1915 msgid "Restart devfs for the changes to be loaded:" msgstr "Перезапустите devfs для применения изменений:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1923 msgid "" "Then add a definition for the new jail into [.filename]#/etc/jail.conf# or [." "filename]#/etc/jail.conf.d#. Replace the interface number [.filename]#$if# " "and IP address with personal variations." msgstr "" "Затем добавьте определение для вашей новой клетке в [.filename]#/etc/jail." "conf# или [.filename]#/etc/jail.conf.d#. Замените номер интерфейса [." "filename]#$if# и IP-адрес на свои значения." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1924 #, no-wrap msgid "Using NAT or routed traffic with a firewall" msgstr "Использование NAT или маршрутизируемого трафика с межсетевым экраном" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1937 #, no-wrap msgid "" "bhyve {\n" " $if = 0;\n" " exec.prestart = \"/sbin/ifconfig epair${if} create up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a name ${name}0\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}b name jail${if}\";\n" " exec.prestart += \"/sbin/ifconfig ${name}0 inet 192.168.168.1/27\";\n" " exec.prestart += \"/sbin/sysctl net.inet.ip.forwarding=1\";\n" msgstr "" "bhyve {\n" " $if = 0;\n" " exec.prestart = \"/sbin/ifconfig epair${if} create up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a name ${name}0\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}b name jail${if}\";\n" " exec.prestart += \"/sbin/ifconfig ${name}0 inet 192.168.168.1/27\";\n" " exec.prestart += \"/sbin/sysctl net.inet.ip.forwarding=1\";\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1939 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1976 #, no-wrap msgid " exec.clean;\n" msgstr " exec.clean;\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1948 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1985 #, no-wrap msgid "" " host.hostname = \"the-hostname-here\";\n" " vnet;\n" " vnet.interface = \"jail${if}\";\n" " path = \"/jails/${name}\";\n" " persist;\n" " securelevel = 3;\n" " devfs_ruleset = 100;\n" " mount.devfs;\n" msgstr "" " host.hostname = \"the-hostname-here\";\n" " vnet;\n" " vnet.interface = \"jail${if}\";\n" " path = \"/jails/${name}\";\n" " persist;\n" " securelevel = 3;\n" " devfs_ruleset = 100;\n" " mount.devfs;\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1950 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1987 #, no-wrap msgid " allow.vmm;\n" msgstr " allow.vmm;\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1953 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1990 #, no-wrap msgid "" " exec.start += \"/bin/sh /etc/rc\";\n" " exec.stop = \"/bin/sh /etc/rc.shutdown\";\n" msgstr "" " exec.start += \"/bin/sh /etc/rc\";\n" " exec.stop = \"/bin/sh /etc/rc.shutdown\";\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1956 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1993 #, no-wrap msgid "" " exec.poststop += \"/sbin/ifconfig ${name}0 destroy\";\n" "}\n" msgstr "" " exec.poststop += \"/sbin/ifconfig ${name}0 destroy\";\n" "}\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1960 msgid "" "This example assumes use of a firewall like `pf` or `ipfw` to NAT the jail " "traffic. See the crossref:firewalls[,Firewalls] chapter for more details on " "the available options to implement this." msgstr "" "Этот пример предполагает использование межсетевого экрана, такого как `pf` " "или `ipfw`, для трансляции сетевых адресов (NAT) трафика вашей jail. " "Подробнее о доступных вариантах реализации этого смотрите в главе " "crossref:firewalls[,Межсетевые экраны]." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:1961 #, no-wrap msgid "Using a bridged network connection" msgstr "Использование мостового сетевого подключения" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:1974 #, no-wrap msgid "" "bhyve {\n" " $if = 0;\n" " exec.prestart = \"/sbin/ifconfig epair${if} create up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a name ${name}0\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}b name jail${if}\";\n" " exec.prestart += \"/sbin/ifconfig bridge0 addm ${name}0\";\n" " exec.prestart += \"/sbin/sysctl net.inet.ip.forwarding=1\";\n" msgstr "" "bhyve {\n" " $if = 0;\n" " exec.prestart = \"/sbin/ifconfig epair${if} create up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a up\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}a name ${name}0\";\n" " exec.prestart += \"/sbin/ifconfig epair${if}b name jail${if}\";\n" " exec.prestart += \"/sbin/ifconfig bridge0 addm ${name}0\";\n" " exec.prestart += \"/sbin/sysctl net.inet.ip.forwarding=1\";\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:1999 msgid "" "Having previously replaced the devfs ruleset ID 100 in [.filename]#/etc/" "devfs.rules# with a custom unique number, remember to replace the numeric ID " "also in the [.filename]#jails.conf# too." msgstr "" "Если вы ранее заменили идентификатор набора правил devfs 100 в [.filename]#/" "etc/devfs.rules# на свой уникальный номер, не забудьте также заменить " "числовой идентификатор в вашем [.filename]#jails.conf#." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:2002 #, no-wrap msgid "Configuring the Jail" msgstr "Настройка клетки" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2005 msgid "" "To start the jail for the first time and do some additional configuration " "work, enter:" msgstr "" "Для первого запуска клетки и выполнения дополнительных настроек введите:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2016 #, no-wrap msgid "" "# cp /etc/resolv.conf /jails/bhyve/etc\n" "# service jail onestart bhyve\n" "# jexec bhyve\n" "# sysrc ifconfig_jail0=\"inet 192.168.168.2/27\"\n" "# sysrc defaultrouter=\"192.168.168.1\"\n" "# sysrc sendmail_enable=NONE\n" "# sysrc cloned_interfaces=\"tap100\"\n" "# exit\n" msgstr "" "# cp /etc/resolv.conf /jails/bhyve/etc\n" "# service jail onestart bhyve\n" "# jexec bhyve\n" "# sysrc ifconfig_jail0=\"inet 192.168.168.2/27\"\n" "# sysrc defaultrouter=\"192.168.168.1\"\n" "# sysrc sendmail_enable=NONE\n" "# sysrc cloned_interfaces=\"tap100\"\n" "# exit\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2019 msgid "Restart and enable the jail:" msgstr "Перезапустите и включите клетку:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2024 #, no-wrap msgid "" "# sysrc jail_enable=YES\n" "# service jail restart bhyve\n" msgstr "" "# sysrc jail_enable=YES\n" "# service jail restart bhyve\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2028 msgid "" "Afterwards, create a virtual machine within the jail. For a FreeBSD guest, " "download an installation ISO first:" msgstr "" "После этого вы можете создать виртуальную машину внутри клетки. Для гостевой " "системы FreeBSD сначала загрузите установочный ISO-образ:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2034 #, no-wrap msgid "" "# jexec bhyve\n" "# cd /vms\n" "# fetch -o freebsd.iso https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso\n" msgstr "" "# jexec bhyve\n" "# cd /vms\n" "# fetch -o freebsd.iso https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso\n" #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:2037 #, no-wrap msgid "Creating a Virtual Machine Inside the Jail" msgstr "Создание виртуальной машины внутри клетки" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2040 msgid "To create a virtual machine, use `bhyvectl` to initialize it first:" msgstr "" "Чтобы создать виртуальную машину, сначала инициализируйте её с помощью " "`bhyvectl`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2045 #, no-wrap msgid "" "# jexec bhyve\n" "# bhyvectl --create --vm=bhyvevm0\n" msgstr "" "# jexec bhyve\n" "# bhyvectl --create --vm=bhyvevm0\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2051 msgid "" "Creating the guest with `bhyvectl` may be required when initiating the " "virtual machine from a jail. Skipping this step may cause the following " "error message when starting `bhyve`:" msgstr "" "Создание гостевой системы с помощью `bhyvectl` может потребоваться при " "запуске виртуальной машины из клетки. Пропуск этого шага может привести к " "следующему сообщению об ошибке при запуске `bhyve`:" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2053 msgid "`vm_open: vm-name could not be opened. No such file or directory`" msgstr "`vm_open: vm-name could not be opened. No such file or directory`" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2056 msgid "Finally, use the preferred way of starting the guest." msgstr "Наконец, используйте предпочитаемый способ запуска гостевой системы." #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:2057 #, no-wrap msgid "Starting with `vmrun.sh` and ZFS" msgstr "Запуск с `vmrun.sh` и ZFS" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2061 msgid "Using `vmrun.sh` on a ZFS filesystems:" msgstr "Используя `vmrun.sh` на файловых системах ZFS:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2067 #, no-wrap msgid "" "# jexec bhyve\n" "# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M \\\n" " -t tap100 -d /dev/zvol/zroot/vms/bhyvevm0 -i -I /vms/FreeBSD-14.0-RELEASE-amd64-bootonly.iso bhyvevm0\n" msgstr "" "# jexec bhyve\n" "# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M \\\n" " -t tap100 -d /dev/zvol/zroot/vms/bhyvevm0 -i -I /vms/FreeBSD-14.0-RELEASE-amd64-bootonly.iso bhyvevm0\n" #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:2070 #, no-wrap msgid "Starting with `vmrun.sh` and UFS" msgstr "Запуск с `vmrun.sh` и UFS" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2074 msgid "Using `vmrun.sh` on a UFS filesystem:" msgstr "Используя `vmrun.sh` на файловой системе UFS:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2080 #, no-wrap msgid "" "# jexec bhyve\n" "# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M \\\n" " -t tap100 -d /vms/bhyvevm0 -i -I /vms/FreeBSD-14.0-RELEASE-amd64-bootonly.iso bhyvevm0\n" msgstr "" "# jexec bhyve\n" "# sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M \\\n" " -t tap100 -d /vms/bhyvevm0 -i -I /vms/FreeBSD-14.0-RELEASE-amd64-bootonly.iso bhyvevm0\n" #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:2083 #, no-wrap msgid "Starting bhyve for an UEFI guest with ZFS" msgstr "Запуск bhyve для гостевой системы UEFI с ZFS" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2087 msgid "" "When wanting to use an UEFI guest, remember to first install the required " "firmware package package:sysutils/bhyve-firmware[] in the jail:" msgstr "" "Если же вы хотите использовать гостевую систему с UEFI, не забудьте сначала " "установить необходимый пакет с микропрограммой package:sysutils/bhyve-" "firmware[] в клетку:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2091 #, no-wrap msgid "# pkg -j bhyve install bhyve-firmware\n" msgstr "# pkg -j bhyve install bhyve-firmware\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2094 msgid "Then use `bhyve` directly:" msgstr "Затем используйте `bhyve` напрямую:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2107 #, no-wrap msgid "" "# bhyve -A -c 4 -D -H -m 2G \\\n" " -s 0,hostbridge \\\n" " -s 1,lpc \\\n" " -s 2,virtio-net,tap100 \\\n" " -s 3,virtio-blk,/dev/zvol/zroot/vms/bhyvevm0 \\\n" "\t-s 4,ahci-cd,/vms/FreeBSD-14.0-RELEASE-amd64-bootonly.iso \\\n" " -s 31,fbuf,tcp=127.0.0.1:5900,w=1024,h=800,tablet \\\n" " -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" " -l com1,/dev/nmdbbhyve0A \\\n" " bhyvevm0\n" msgstr "" "# bhyve -A -c 4 -D -H -m 2G \\\n" " -s 0,hostbridge \\\n" " -s 1,lpc \\\n" " -s 2,virtio-net,tap100 \\\n" " -s 3,virtio-blk,/dev/zvol/zroot/vms/bhyvevm0 \\\n" "\t-s 4,ahci-cd,/vms/FreeBSD-14.0-RELEASE-amd64-bootonly.iso \\\n" " -s 31,fbuf,tcp=127.0.0.1:5900,w=1024,h=800,tablet \\\n" " -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\\n" " -l com1,/dev/nmdbbhyve0A \\\n" " bhyvevm0\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2110 msgid "" "This allows connecting to the virtual machine `bhyvevm0` through VNC as well " "as a serial console at [.filename]#/dev/nmdbbhyve0B#." msgstr "" "Это позволит вам подключиться к вашей виртуальной машине `bhyvevm0` через " "VNC, а также через последовательную консоль по адресу [.filename]#/dev/" "nmdbbhyve0B#." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2113 #, no-wrap msgid "Virtual Machine Consoles" msgstr "Консоли виртуальной машины" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2120 msgid "" "It is advantageous to wrap the bhyve console in a session management tool " "such as package:sysutils/tmux[] or package:sysutils/screen[] in order to " "detach and reattach to the console. It is also possible to have the console " "of bhyve be a null modem device that can be accessed with `cu`. To do this, " "load the [.filename]#nmdm# kernel module and replace `-l com1,stdio` with `-" "l com1,/dev/nmdm0A`. The [.filename]#/dev/nmdm# devices are created " "automatically as needed, where each is a pair, corresponding to the two ends " "of the null modem cable ([.filename]#/dev/nmdm0A# and [.filename]#/dev/" "nmdm0B#). See man:nmdm[4] for more information." msgstr "" "Преимуществом является обёртывание консоли bhyve в инструмент управления " "сеансами, например package:sysutils/tmux[] или package:sysutils/screen[], " "чтобы иметь возможность отключаться и подключаться к консоли. Также можно " "сделать консоль bhyve нуль-модемным устройством, доступным через `cu`. Для " "этого загрузите модуль ядра [.filename]#nmdm# и замените `-l com1,stdio` на " "`-l com1,/dev/nmdm0A`. Устройства [.filename]#/dev/nmdm# создаются " "автоматически по мере необходимости, где каждое представляет собой пару, " "соответствующую двум концам нуль-модемного кабеля ([.filename]#/dev/nmdm0A# " "и [.filename]#/dev/nmdm0B#). Подробнее см. в man:nmdm[4]." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2128 #, no-wrap msgid "" "# kldload nmdm\n" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./linux.img \\\n" " -l com1,/dev/nmdm0A -c 4 -m 1024M linuxguest\n" "# cu -l /dev/nmdm0B\n" "Connected\n" msgstr "" "# kldload nmdm\n" "# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./linux.img \\\n" " -l com1,/dev/nmdm0A -c 4 -m 1024M linuxguest\n" "# cu -l /dev/nmdm0B\n" "Connected\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2130 #, no-wrap msgid "Ubuntu 13.10 handbook ttyS0\n" msgstr "Ubuntu 13.10 handbook ttyS0\n" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2132 #, no-wrap msgid "handbook login:\n" msgstr "handbook login:\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2138 msgid "" "To disconnect from a console, enter a newline (i.e. press `RETURN`) followed " "by tilde (`~`), and finally dot (`.`). Keep in mind that only the " "connection is dropped while the login session remains active. Another user " "connecting to the same console could therefore make use of any active " "sessions without having to first authenticate. For security reasons, it's " "therefore recommended to logout before disconnecting." msgstr "" "Чтобы отключиться от консоли, введите перевод строки (т.е. нажмите " "`RETURN`), затем тильду (`~`) и точку (`.`). Учтите, что разрывается только " "соединение, а сеанс входа в систему остаётся активным. Таким образом, другой " "пользователь, подключившись к той же консоли, может воспользоваться " "активными сеансами без необходимости аутентификации. По соображениям " "безопасности рекомендуется выйти из системы перед отключением." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2143 msgid "" "The number in the [.filename]#nmdm# device path must be unique for each " "virtual machine and must not be used by any other processes before bhyve " "starts. The number can be chosen arbitrarily and does not need to be taken " "from a consecutive sequence of numbers. The device node pair (i.e. [." "filename]#/dev/nmdm0a# and [.filename]#/dev/nmdm0b#) are created dynamically " "when bhyve connects its console and destroyed when it shuts down. Keep this " "in mind when creating scripts to start the virtual machines: make sure that " "all virtual machines are assigned unique [.filename]#nmdm# devices." msgstr "" "Число в пути устройства [.filename]#nmdm# должно быть уникальным для каждой " "виртуальной машины и не должно использоваться другими процессами до запуска " "bhyve. Это число можно выбирать произвольно, оно не обязательно должно быть " "взято из последовательного ряда чисел. Пара узлов устройств (например, [." "filename]#/dev/nmdm0a# и [.filename]#/dev/nmdm0b#) создаётся динамически при " "подключении консоли bhyve и уничтожается при её завершении. Учитывайте это " "при создании скриптов для запуска виртуальных машин: необходимо убедиться, " "что всем виртуальным машинам назначены уникальные устройства [." "filename]#nmdm#." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2145 #, no-wrap msgid "Managing Virtual Machines" msgstr "Управление виртуальными машинами" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2149 msgid "" "A device node is created in [.filename]#/dev/vmm# for each virtual machine. " "This allows the administrator to easily see a list of the running virtual " "machines:" msgstr "" "Для каждой виртуальной машины создается узел устройства в [.filename]#/dev/" "vmm#. Это позволяет администратору легко просматривать список работающих " "виртуальных машин:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2159 #, no-wrap msgid "" "# ls -al /dev/vmm\n" "total 1\n" "dr-xr-xr-x 2 root wheel 512 Mar 17 12:19 ./\n" "dr-xr-xr-x 14 root wheel 512 Mar 17 06:38 ../\n" "crw------- 1 root wheel 0x1a2 Mar 17 12:20 guestname\n" "crw------- 1 root wheel 0x19f Mar 17 12:19 linuxguest\n" "crw------- 1 root wheel 0x1a1 Mar 17 12:19 otherguest\n" msgstr "" "# ls -al /dev/vmm\n" "total 1\n" "dr-xr-xr-x 2 root wheel 512 Mar 17 12:19 ./\n" "dr-xr-xr-x 14 root wheel 512 Mar 17 06:38 ../\n" "crw------- 1 root wheel 0x1a2 Mar 17 12:20 guestname\n" "crw------- 1 root wheel 0x19f Mar 17 12:19 linuxguest\n" "crw------- 1 root wheel 0x1a1 Mar 17 12:19 otherguest\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2162 msgid "A specified virtual machine can be destroyed using `bhyvectl`:" msgstr "Указанную виртуальную машину можно уничтожить с помощью `bhyvectl`:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2166 #, no-wrap msgid "# bhyvectl --destroy --vm=guestname\n" msgstr "# bhyvectl --destroy --vm=guestname\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2170 msgid "" "Destroying a virtual machine this way means killing it immediately. Any " "unsaved data will be lost, open files and filesystems may get corrupted. To " "gracefully shut down a virtual machine, send a `TERM` signal to its bhyve " "process instead. This triggers an ACPI shutdown event for the guest:" msgstr "" "Уничтожение виртуальной машины таким способом означает её немедленное " "завершение. Все несохранённые данные будут потеряны, открытые файлы и " "файловые системы могут быть повреждены. Для корректного завершения работы " "виртуальной машины отправьте сигнал `TERM` её процессу bhyve. Это инициирует " "событие ACPI завершения работы для гостевой системы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2176 #, no-wrap msgid "" "# ps ax | grep bhyve\n" "17424 - SC 56:48.27 bhyve: guestvm (bhyve)\n" "# kill 17424\n" msgstr "" "# ps ax | grep bhyve\n" "17424 - SC 56:48.27 bhyve: guestvm (bhyve)\n" "# kill 17424\n" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2179 #, no-wrap msgid "Tools and Utilities" msgstr "Инструменты и утилиты" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2182 msgid "" "There are numerous utilities and applications available in ports to help " "simplify setting up and managing bhyve virtual machines:" msgstr "" "В портах доступно множество утилит и приложений, которые помогают упростить " "настройку и управление виртуальными машинами bhyve:" #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:2183 #, no-wrap msgid "bhyve Managers" msgstr "Менеджеры bhyve" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2186 #, no-wrap msgid "Name" msgstr "Имя" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2186 #, no-wrap msgid "License" msgstr "Лицензия" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2186 #, no-wrap msgid "Package" msgstr "Пакет" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2188 #, no-wrap msgid "Documentation" msgstr "Documentation" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2189 #, no-wrap msgid "vm-bhyve" msgstr "vm-bhyve" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2190 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2195 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2210 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2215 #, no-wrap msgid "BSD-2" msgstr "BSD-2" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2191 #, no-wrap msgid "package:sysutils/vm-bhyve[]" msgstr "package:sysutils/vm-bhyve[]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2193 #, no-wrap msgid "link:https://github.com/churchers/vm-bhyve[Documentation]" msgstr "link:https://github.com/churchers/vm-bhyve[Документация]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2194 #, no-wrap msgid "CBSD" msgstr "CBSD" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2196 #, no-wrap msgid "package:sysutils/cbsd[]" msgstr "package:sysutils/cbsd[]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2198 #, no-wrap msgid "link:https://github.com/cbsd/cbsd/tree/develop/share/docs[Documentation]" msgstr "link:https://github.com/cbsd/cbsd/tree/develop/share/docs[Документация]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2199 #, no-wrap msgid "Virt-Manager" msgstr "Virt-Manager" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2200 #, no-wrap msgid "LGPL-3" msgstr "LGPL-3" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2201 #, no-wrap msgid "package:deskutils/virt-manager[]" msgstr "package:deskutils/virt-manager[]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2203 #, no-wrap msgid "link:https://virt-manager.org/[Documentation]" msgstr "link:https://virt-manager.org/[Документация]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2204 #, no-wrap msgid "Bhyve RC Script" msgstr "Bhyve RC Script" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2205 #, no-wrap msgid "Unknown" msgstr "Неизвестно" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2206 #, no-wrap msgid "package:sysutils/bhyve-rc[]" msgstr "package:sysutils/bhyve-rc[]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2208 #, no-wrap msgid "link:https://www.freshports.org/sysutils/bhyve-rc/[Documentation]" msgstr "link:https://www.freshports.org/sysutils/bhyve-rc/[Документация]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2209 #, no-wrap msgid "bmd" msgstr "bmd" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2211 #, no-wrap msgid "package:sysutils/bmd[]" msgstr "package:sysutils/bmd[]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2213 #, no-wrap msgid "link:https://github.com/yuichiro-naito/bmd[Documentation]" msgstr "link:https://github.com/yuichiro-naito/bmd[Документация]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2214 #, no-wrap msgid "vmstated" msgstr "vmstated" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2216 #, no-wrap msgid "package:sysutils/vmstated[]" msgstr "package:sysutils/vmstated[]" #. type: Table #: documentation/content/en/books/handbook/virtualization/_index.adoc:2218 #, no-wrap msgid "link:https://github.com/christian-moerz/vmstated[Documentation]" msgstr "link:https://github.com/christian-moerz/vmstated[Документация]" #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2221 #, no-wrap msgid "Persistent Configuration" msgstr "Постоянная конфигурация" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2224 msgid "" "In order to configure the system to start bhyve guests at boot time, some " "configuration file changes are required." msgstr "" "Для настройки системы на автоматический запуск гостевых систем bhyve при " "загрузке необходимо внести изменения в некоторые конфигурационные файлы." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2227 msgid "[.filename]#/etc/sysctl.conf#" msgstr "[.filename]#/etc/sysctl.conf#" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2229 msgid "" "When using [.filename]#tap# interfaces as network backend, either manually " "set each used [.filename]#tap# interface to UP or simply set the following " "sysctl:" msgstr "" "При использовании интерфейсов [.filename]#tap# в качестве сетевого бэкенда " "необходимо либо вручную переводить каждый используемый интерфейс [." "filename]#tap# в состояние UP, либо просто установить следующий параметр " "sysctl:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2233 #, no-wrap msgid "net.link.tap.up_on_open=1\n" msgstr "net.link.tap.up_on_open=1\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2236 msgid "[.filename]#/etc/rc.conf#" msgstr "[.filename]#/etc/rc.conf#" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2240 msgid "" "To connect the virtual machine's [.filename]#tap# device to the network via " "a [.filename]#bridge#, persisting the device settings in [.filename]#/etc/rc." "conf# is needed. Additionally, load the necessary kernel modules `vmm` for " "bhyve and `nmdm` for [.filename]#nmdm# devices through the `kld_list` " "configuration variable. When configuring `ifconfig_bridge0`, make sure to " "replace `/` with the actual IP address of the physical " "interface ([.filename]#igb0# in this example) and remove IP settings from " "the physical device." msgstr "" "Чтобы подключить устройство [.filename]#tap# вашей виртуальной машины к сети " "через [.filename]#bridge#, необходимо сохранить настройки устройства в [." "filename]#/etc/rc.conf#. Дополнительно можно загрузить необходимые модули " "ядра `vmm` для bhyve и `nmdm` для устройств [.filename]#nmdm# через " "переменную конфигурации `kld_list`. При настройке `ifconfig_bridge0` " "убедитесь, что заменили `/` на реальный IP-адрес вашего " "физического интерфейса ([.filename]#igb0# в данном примере) и удалите IP-" "настройки с вашего физического устройства." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2247 #, no-wrap msgid "" "# sysrc cloned_interfaces+=\"bridge0 tap0\"\n" "# sysrc ifconfig_bridge0=\"inet / addm igb0 addm tap0\"\n" "# sysrc kld_list+=\"nmdm vmm\"\n" "# sysrc ifconfig_igb0=\"up\"\n" msgstr "" "# sysrc cloned_interfaces+=\"bridge0 tap0\"\n" "# sysrc ifconfig_bridge0=\"inet / addm igb0 addm tap0\"\n" "# sysrc kld_list+=\"nmdm vmm\"\n" "# sysrc ifconfig_igb0=\"up\"\n" #. type: Block title #: documentation/content/en/books/handbook/virtualization/_index.adoc:2250 #, no-wrap msgid "Setting the IP for a bridge device" msgstr "Установка IP для устройства bridge" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2254 msgid "" "For a host with an _igb0_ interface connected to the network with IP " "`10.10.10.1` and netmask `255.255.255.0`, use the following commands:" msgstr "" "Для хоста с интерфейсом _igb0_, подключенным к сети с IP `10.10.10.1` и " "маской подсети `255.255.255.0`, используйте следующие команды:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2261 #, no-wrap msgid "" "# sysrc ifconfig_igb0=\"up\"\n" "# sysrc ifconfig_bridge0=\"inet 10.10.10.1/24 addm igb0 addm tap0\"\n" "# sysrc kld_list+=\"nmdm vmm\"\n" "# sysrc cloned_interfaces+=\"bridge0 tap0\"\n" msgstr "" "# sysrc ifconfig_igb0=\"up\"\n" "# sysrc ifconfig_bridge0=\"inet 10.10.10.1/24 addm igb0 addm tap0\"\n" "# sysrc kld_list+=\"nmdm vmm\"\n" "# sysrc cloned_interfaces+=\"bridge0 tap0\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2268 msgid "" "Modifying the IP address configuration of a system may terminate the current " "remote connection (e.g., via SSH), causing a lock out. Take precautions to " "maintain system access or make those modifications while logged in on a " "local terminal session." msgstr "" "Изменение конфигурации IP-адреса системы может заблокировать ваш доступ, " "если вы выполняете эти команды, подключившись удаленно (например, через SSH)" "! Примите меры предосторожности, чтобы сохранить доступ к системе, или " "вносите эти изменения, работая в локальной терминальной сессии." #. type: Title == #: documentation/content/en/books/handbook/virtualization/_index.adoc:2271 #, no-wrap msgid "FreeBSD as a Xen(TM)-Host" msgstr "FreeBSD в качестве хоста Xen(TM)" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2276 msgid "" "Xen is a GPLv2-licensed https://en.wikipedia.org/wiki/" "Hypervisor#Classification[type 1 hypervisor] for Intel(R) and ARM(R) " "architectures. FreeBSD has included i386(TM) and AMD(R) 64-Bit https://wiki." "xenproject.org/wiki/DomU[DomU] and https://en.wikipedia.org/wiki/" "Amazon_Elastic_Compute_Cloud[Amazon EC2] unprivileged domain (virtual " "machine) support since FreeBSD 8.0 and includes Dom0 control domain (host) " "support in FreeBSD 11.0. Support for para-virtualized (PV) domains has been " "removed from FreeBSD 11 in favor of hardware virtualized (HVM) domains, " "which provides better performance." msgstr "" "Xen — это гипервизор класса 1 с лицензией GPLv2 для архитектур Intel(R) и " "ARM(R). Начиная с FreeBSD 8.0, система включает поддержку " "непривилегированных доменов (виртуальных машин) https://wiki.xenproject.org/" "wiki/DomU[DomU] и https://en.wikipedia.org/wiki/" "Amazon_Elastic_Compute_Cloud[Amazon EC2] для i386(TM) и AMD(R) 64-битных " "процессоров, а также поддержку управляющего домена (хоста) Dom0 в FreeBSD " "11.0. Поддержка паравиртуализованных (PV) доменов была удалена в FreeBSD 11 " "в пользу аппаратно-виртуализованных (HVM) доменов, которые обеспечивают " "лучшую производительность." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2284 msgid "" "Xen(TM) is a bare-metal hypervisor, which means that it is the first program " "loaded after the BIOS. A special privileged guest called the Domain-0 " "(`Dom0` for short) is then started. The Dom0 uses its special privileges to " "directly access the underlying physical hardware, making it a high-" "performance solution. It is able to access the disk controllers and network " "adapters directly. The Xen(TM) management tools to manage and control the " "Xen(TM) hypervisor are also used by the Dom0 to create, list, and destroy " "VMs. Dom0 provides virtual disks and networking for unprivileged domains, " "often called `DomU`. Xen(TM) Dom0 can be compared to the service console of " "other hypervisor solutions, while the DomU is where individual guest VMs are " "run." msgstr "" "Xen(TM) — это гипервизор первого типа (bare-metal), что означает, что он " "загружается первым после BIOS. Затем запускается специальная " "привилегированная гостевая система, называемая Domain-0 (сокращенно `Dom0`). " "Dom0 использует свои особые привилегии для прямого доступа к физическому " "оборудованию, что делает его высокопроизводительным решением. Она может " "напрямую обращаться к контроллерам дисков и сетевым адаптерам. Инструменты " "управления Xen(TM) для управления гипервизором Xen(TM) также используются " "Dom0 для создания, перечисления и удаления виртуальных машин. Dom0 " "предоставляет виртуальные диски и сетевые ресурсы для непривилегированных " "доменов, часто называемых `DomU`. Xen(TM) Dom0 можно сравнить с сервисной " "консолью других гипервизоров, в то время как DomU — это среда, в которой " "запускаются отдельные гостевые виртуальные машины." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2291 msgid "" "Xen(TM) can migrate VMs between different Xen(TM) servers. When the two xen " "hosts share the same underlying storage, the migration can be done without " "having to shut the VM down first. Instead, the migration is performed live " "while the DomU is running and there is no need to restart it or plan a " "downtime. This is useful in maintenance scenarios or upgrade windows to " "ensure that the services provided by the DomU are still provided. Many more " "features of Xen(TM) are listed on the https://wiki.xenproject.org/wiki/" "Category:Overview[Xen Wiki Overview page]. Note that not all features are " "supported on FreeBSD yet." msgstr "" "Xen(TM) может переносить виртуальные машины между разными серверами Xen(TM). " "Если два хоста Xen используют общее хранилище данных, миграцию можно " "выполнить без предварительного выключения виртуальной машины. Вместо этого " "миграция выполняется в реальном времени, пока DomU работает, и нет " "необходимости перезапускать его или планировать простой. Это полезно в " "сценариях обслуживания или обновления, чтобы гарантировать непрерывность " "предоставления услуг DomU. Множество других возможностей Xen(TM) перечислены " "на https://wiki.xenproject.org/wiki/Category:Overview[странице обзора Xen " "Wiki]. Обратите внимание, что не все функции пока поддерживаются в FreeBSD." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2293 #, no-wrap msgid "Hardware Requirements for Xen(TM) Dom0" msgstr "Требования к оборудованию для Xen(TM) Dom0" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2297 msgid "" "To run the Xen(TM) hypervisor on a host, certain hardware functionality is " "required. Running FreeBSD as a Xen host (Dom0) require Intel Extended Page " "Tables (https://en.wikipedia.org/wiki/Extended_Page_Table[EPT]) or AMD " "Nested Page Tables (https://en.wikipedia.org/wiki/" "Rapid_Virtualization_Indexing[NPT]) and Input/Output Memory Management Unit " "(https://en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardware[IOMMU]) " "support in the host processor." msgstr "" "Для запуска гипервизора Xen(TM) на хосте требуется определённая аппаратная " "функциональность. Для работы FreeBSD в качестве хоста Xen (Dom0) необходимы " "поддержка Intel Extended Page Tables (https://en.wikipedia.org/wiki/" "Extended_Page_Table[EPT]) или AMD Nested Page Tables (https://en.wikipedia." "org/wiki/Rapid_Virtualization_Indexing[NPT]), а также поддержка Input/Output " "Memory Management Unit (https://en.wikipedia.org/wiki/List_of_IOMMU-" "supporting_hardware[IOMMU]) в процессоре хоста." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2302 msgid "" "In order to run a FreeBSD 13 Xen(TM) Dom0 the box must be booted using " "legacy boot (BIOS). FreeBSD 14 and newer supports booting as a Xen(TM) Dom0 " "in both BIOS and UEFI modes." msgstr "" "Для запуска FreeBSD 13 в качестве Xen(TM) Dom0 система должна быть загружена " "в режиме legacy boot (BIOS). FreeBSD 14 и новее поддерживают загрузку в " "качестве Xen(TM) Dom0 как в режиме BIOS, так и в режиме UEFI." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2305 #, no-wrap msgid "Xen(TM) Dom0 Control Domain Setup" msgstr "Настройка управляющего домена Xen(TM) Dom0" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2308 msgid "" "Users should install the package:emulators/xen-kernel[] and package:sysutils/" "xen-tools[] packages, based on Xen(TM) 4.18." msgstr "" "Пользователям следует установить пакеты package:emulators/xen-kernel[] и " "package:sysutils/xen-tools[], основанные на Xen(TM) 4.18." #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2312 msgid "" "Configuration files must be edited to prepare the host for the Dom0 " "integration after the Xen packages are installed. An entry to [.filename]#/" "etc/sysctl.conf# disables the limit on how many pages of memory are allowed " "to be wired. Otherwise, DomU VMs with higher memory requirements will not " "run." msgstr "" "После установки пакетов Xen необходимо отредактировать конфигурационные " "файлы, чтобы подготовить хост для интеграции с Dom0. В файл [.filename]#/etc/" "sysctl.conf# следует добавить запись, отключающую ограничение на количество " "страниц памяти, которые могут быть закреплены. В противном случае " "виртуальные машины DomU с повышенными требованиями к памяти не смогут " "запуститься." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2316 #, no-wrap msgid "# echo 'vm.max_wired=-1' >> /etc/sysctl.conf\n" msgstr "# echo 'vm.max_wired=-1' >> /etc/sysctl.conf\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2322 msgid "" "Another memory-related setting involves changing [.filename]#/etc/login." "conf#, setting the `memorylocked` option to `unlimited`. Otherwise, " "creating DomU domains may fail with `Cannot allocate memory` errors. After " "making the change to [.filename]#/etc/login.conf#, run `cap_mkdb` to update " "the capability database. See crossref:security[security-resourcelimits," "\"Resource Limits\"] for details." msgstr "" "Ещё одна настройка, связанная с памятью, включает изменение файла [." "filename]#/etc/login.conf#, где необходимо установить параметр " "`memorylocked` в значение `unlimited`. В противном случае создание доменов " "DomU может завершиться ошибкой `Cannot allocate memory`. После внесения " "изменений в [.filename]#/etc/login.conf# выполните команду `cap_mkdb` для " "обновления базы данных capability. Подробности см. в разделе crossref:" "security[security-resourcelimits,\"Ограничения ресурсов\"]." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2327 #, no-wrap msgid "" "# sed -i '' -e 's/memorylocked=64K/memorylocked=unlimited/' /etc/login.conf\n" "# cap_mkdb /etc/login.conf\n" msgstr "" "# sed -i '' -e 's/memorylocked=64K/memorylocked=unlimited/' /etc/login.conf\n" "# cap_mkdb /etc/login.conf\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2330 msgid "Add an entry for the Xen(TM) console to [.filename]#/etc/ttys#:" msgstr "Добавьте запись для консоли Xen(TM) в [.filename]#/etc/ttys#:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2334 #, no-wrap msgid "# echo 'xc0 \"/usr/libexec/getty Pc\" xterm onifconsole secure' >> /etc/ttys\n" msgstr "# echo 'xc0 \"/usr/libexec/getty Pc\" xterm onifconsole secure' >> /etc/ttys\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2341 msgid "" "Selecting a Xen(TM) kernel in [.filename]#/boot/loader.conf# activates the " "Dom0. Xen(TM) also requires resources like CPU and memory from the host " "machine for itself and other DomU domains. How much CPU and memory depends " "on the individual requirements and hardware capabilities. In this example, " "8 GB of memory and 4 virtual CPUs are made available for the Dom0. The " "serial console is also activated, and logging options are defined." msgstr "" "Выбор ядра Xen(TM) в [.filename]#/boot/loader.conf# активирует Dom0. Xen(TM) " "также требует ресурсы, такие как процессор и память, от основной машины для " "себя и других доменов DomU. Количество процессоров и памяти зависит от " "индивидуальных требований и возможностей оборудования. В этом примере для " "Dom0 доступно 8 ГБ памяти и 4 виртуальных процессора. Также активирована " "последовательная консоль и определены параметры журналирования." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2343 msgid "The following command is used for Xen 4.7 packages:" msgstr "Следующая команда используется для пакетов Xen 4.7:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2350 #, no-wrap msgid "" "# echo 'hw.pci.mcfg=0' >> /boot/loader.conf\n" "# echo 'if_tap_load=\"YES\"' >> /boot/loader.conf\n" "# echo 'xen_kernel=\"/boot/xen\"' >> /boot/loader.conf\n" "# echo 'xen_cmdline=\"dom0_mem=8192M dom0_max_vcpus=4 dom0pvh=1 console=com1,vga com1=115200,8n1 guest_loglvl=all loglvl=all\"' >> /boot/loader.conf\n" msgstr "" "# echo 'hw.pci.mcfg=0' >> /boot/loader.conf\n" "# echo 'if_tap_load=\"YES\"' >> /boot/loader.conf\n" "# echo 'xen_kernel=\"/boot/xen\"' >> /boot/loader.conf\n" "# echo 'xen_cmdline=\"dom0_mem=8192M dom0_max_vcpus=4 dom0pvh=1 console=com1,vga com1=115200,8n1 guest_loglvl=all loglvl=all\"' >> /boot/loader.conf\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2353 msgid "" "For Xen versions 4.11 and higher, the following command should be used " "instead:" msgstr "" "Для версий Xen 4.11 и выше вместо этого следует использовать следующую " "команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2359 #, no-wrap msgid "" "# echo 'if_tap_load=\"YES\"' >> /boot/loader.conf\n" "# echo 'xen_kernel=\"/boot/xen\"' >> /boot/loader.conf\n" "# echo 'xen_cmdline=\"dom0_mem=8192M dom0_max_vcpus=4 dom0=pvh console=com1,vga com1=115200,8n1 guest_loglvl=all loglvl=all\"' >> /boot/loader.conf\n" msgstr "" "# echo 'if_tap_load=\"YES\"' >> /boot/loader.conf\n" "# echo 'xen_kernel=\"/boot/xen\"' >> /boot/loader.conf\n" "# echo 'xen_cmdline=\"dom0_mem=8192M dom0_max_vcpus=4 dom0=pvh console=com1,vga com1=115200,8n1 guest_loglvl=all loglvl=all\"' >> /boot/loader.conf\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2366 msgid "" "Log files that Xen(TM) creates for the DomU VMs are stored in [.filename]#/" "var/log/xen#. Please be sure to check the contents of that directory if " "experiencing issues." msgstr "" "Файлы журналов, создаваемые Xen(TM) для DomU ВМ, хранятся в [.filename]#/var/" "log/xen#. В случае возникновения проблем обязательно проверьте содержимое " "этого каталога." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2369 msgid "Activate the xencommons service during system startup:" msgstr "Активируйте сервис xencommons при загрузке системы:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2373 #, no-wrap msgid "# sysrc xencommons_enable=yes\n" msgstr "# sysrc xencommons_enable=yes\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2379 msgid "" "These settings are enough to start a Dom0-enabled system. However, it lacks " "network functionality for the DomU machines. To fix that, define a bridged " "interface with the main NIC of the system which the DomU VMs can use to " "connect to the network. Replace _em0_ with the host network interface name." msgstr "" "Этих настроек достаточно для запуска системы с поддержкой Dom0. Однако в ней " "отсутствует сетевая функциональность для машин DomU. Чтобы это исправить, " "определите мостовой интерфейс с основной сетевой картой системы, который " "DomU-виртуальные машины смогут использовать для подключения к сети. Замените " "_em0_ на имя сетевого интерфейса хоста." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2385 #, no-wrap msgid "" "# sysrc cloned_interfaces=\"bridge0\"\n" "# sysrc ifconfig_bridge0=\"addm em0 SYNCDHCP\"\n" "# sysrc ifconfig_em0=\"up\"\n" msgstr "" "# sysrc cloned_interfaces=\"bridge0\"\n" "# sysrc ifconfig_bridge0=\"addm em0 SYNCDHCP\"\n" "# sysrc ifconfig_em0=\"up\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2388 msgid "Restart the host to load the Xen(TM) kernel and start the Dom0." msgstr "Перезагрузите хост для загрузки ядра Xen(TM) и запуска Dom0." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2392 #, no-wrap msgid "# reboot\n" msgstr "# reboot\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2395 msgid "" "After successfully booting the Xen(TM) kernel and logging into the system " "again, the Xen(TM) management tool `xl` is used to show information about " "the domains." msgstr "" "После успешной загрузки ядра Xen(TM) и повторного входа в систему, " "инструмент управления Xen(TM) `xl` используется для отображения информации о " "доменах." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2401 #, no-wrap msgid "" "# xl list\n" "Name ID Mem VCPUs State Time(s)\n" "Domain-0 0 8192 4 r----- 962.0\n" msgstr "" "# xl list\n" "Name ID Mem VCPUs State Time(s)\n" "Domain-0 0 8192 4 r----- 962.0\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2407 msgid "" "The output confirms that the Dom0 (called `Domain-0`) has the ID `0` and is " "running. It also has the memory and virtual CPUs that were defined in [." "filename]#/boot/loader.conf# earlier. More information can be found in the " "https://www.xenproject.org/help/documentation.html[Xen(TM) Documentation]. " "DomU guest VMs can now be created." msgstr "" "Вывод подтверждает, что Dom0 (называемый `Domain-0`) имеет идентификатор `0` " "и работает. Также у него есть память и виртуальные CPU, которые были " "определены ранее в [.filename]#/boot/loader.conf#. Дополнительную информацию " "можно найти в https://www.xenproject.org/help/documentation." "html[документации Xen(TM)]. Теперь можно создавать гостевые ВМ DomU." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2409 #, no-wrap msgid "Xen(TM) DomU Guest VM Configuration" msgstr "Конфигурация гостевой виртуальной машины Xen(TM) DomU" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2416 msgid "" "Unprivileged domains consist of a configuration file and virtual or physical " "hard disks. Virtual disk storage for the DomU can be files created by man:" "truncate[1] or ZFS volumes as described in crossref:zfs[zfs-zfs-" "volume,“Creating and Destroying Volumes”]. In this example, a 20 GB volume " "is used. A VM is created with the ZFS volume, a FreeBSD ISO image, 1 GB of " "RAM and two virtual CPUs. The ISO installation file is retrieved with man:" "fetch[1] and saved locally in a file called [.filename]#freebsd.iso#." msgstr "" "Непривилегированные домены состоят из конфигурационного файла и виртуальных " "или физических жёстких дисков. Виртуальное дисковое хранилище для DomU может " "быть файлами, созданными с помощью man:truncate[1], или томами ZFS, как " "описано в crossref:zfs[zfs-zfs-volume,“Создание и уничтожение томов”]. В " "этом примере используется том объёмом 20 ГБ. Виртуальная машина создается с " "томом ZFS, образом ISO FreeBSD, 1 ГБ оперативной памяти и двумя виртуальными " "процессорами. Файл установки ISO извлекается с помощью man:fetch[1] и " "сохраняется локально в файле с именем [.filename]#freebsd.iso#." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2420 #, no-wrap msgid "# fetch https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso -o freebsd.iso\n" msgstr "# fetch https://download.freebsd.org/releases/ISO-IMAGES/14.0/FreeBSD-14.0-RELEASE-amd64-bootonly.iso -o freebsd.iso\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2423 msgid "" "A ZFS volume of 20 GB called [.filename]#xendisk0# is created to serve as " "the disk space for the VM." msgstr "" "Создается том ZFS объёмом 20 ГБ с именем [.filename]#xendisk0#, который " "будет использоваться в качестве дискового пространства для виртуальной " "машины." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2427 #, no-wrap msgid "# zfs create -V20G -o volmode=dev zroot/xendisk0\n" msgstr "# zfs create -V20G -o volmode=dev zroot/xendisk0\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2432 msgid "" "The new DomU guest VM is defined in a file. Some specific definitions like " "name, keymap, and VNC connection details are also defined. The following [." "filename]#freebsd.cfg# contains a minimum DomU configuration for this " "example:" msgstr "" "Новый гостевая ВМ DomU определяется в файле. Некоторые конкретные " "определения, такие как имя, раскладка клавиатуры и детали подключения VNC, " "также задаются. Следующий файл [.filename]#freebsd.cfg# содержит минимальную " "конфигурацию DomU для этого примера:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2449 #, no-wrap msgid "" "# cat freebsd.cfg\n" "builder = \"hvm\" <.>\n" "name = \"freebsd\" <.>\n" "memory = 1024 <.>\n" "vcpus = 2 <.>\n" "vif = [ 'mac=00:16:3E:74:34:32,bridge=bridge0' ] <.>\n" "disk = [\n" "'/dev/zvol/tank/xendisk0,raw,hda,rw', <.>\n" "'/root/freebsd.iso,raw,hdc:cdrom,r' <.>\n" " ]\n" "vnc = 1 <.>\n" "vnclisten = \"0.0.0.0\"\n" "serial = \"pty\"\n" "usbdevice = \"tablet\"\n" msgstr "" "# cat freebsd.cfg\n" "builder = \"hvm\" <.>\n" "name = \"freebsd\" <.>\n" "memory = 1024 <.>\n" "vcpus = 2 <.>\n" "vif = [ 'mac=00:16:3E:74:34:32,bridge=bridge0' ] <.>\n" "disk = [\n" "'/dev/zvol/tank/xendisk0,raw,hda,rw', <.>\n" "'/root/freebsd.iso,raw,hdc:cdrom,r' <.>\n" " ]\n" "vnc = 1 <.>\n" "vnclisten = \"0.0.0.0\"\n" "serial = \"pty\"\n" "usbdevice = \"tablet\"\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2452 msgid "These lines are explained in more detail:" msgstr "Эти строки объясняются более подробно:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2454 msgid "" "This defines what kind of virtualization to use. `hvm` refers to hardware-" "assisted virtualization or hardware virtual machine. Guest operating systems " "can run unmodified on CPUs with virtualization extensions, providing nearly " "the same performance as running on physical hardware. `generic` is the " "default value and creates a PV domain." msgstr "" "Это определяет, какой тип виртуализации использовать. `hvm` означает " "аппаратную виртуализацию или аппаратную виртуальную машину. Гостевые " "операционные системы могут работать без изменений на процессорах с " "расширениями виртуализации, обеспечивая производительность, почти такую же, " "как и на физическом оборудовании. `generic` — значение по умолчанию, которое " "создает PV-домен." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2455 msgid "" "Name of this virtual machine to distinguish it from others running on the " "same Dom0. Required." msgstr "" "Имя этой виртуальной машины для отличия от других, работающих на том же " "Dom0. Обязательно." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2456 msgid "" "Quantity of RAM in megabytes to make available to the VM. This amount is " "subtracted from the hypervisor's total available memory, not the memory of " "the Dom0." msgstr "" "Количество оперативной памяти в мегабайтах, которое будет доступно " "виртуальной машине. Этот объём вычитается из общего объёма доступной памяти " "гипервизора, а не из памяти Dom0." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2457 msgid "" "Number of virtual CPUs available to the guest VM. For best performance, do " "not create guests with more virtual CPUs than the number of physical CPUs on " "the host." msgstr "" "Количество виртуальных CPU, доступных гостевой ВМ. Для наилучшей " "производительности не следует создавать гостевые системы с количеством " "виртуальных CPU, превышающим число физических CPU на хосте." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2458 msgid "" "Virtual network adapter. This is the bridge connected to the network " "interface of the host. The `mac` parameter is the MAC address set on the " "virtual network interface. This parameter is optional, if no MAC is provided " "Xen(TM) will generate a random one." msgstr "" "Виртуальный сетевой адаптер. Это мост, подключенный к сетевому интерфейсу " "хоста. Параметр `mac` — это MAC-адрес, установленный на виртуальном сетевом " "интерфейсе. Этот параметр необязателен: если MAC-адрес не указан, Xen(TM) " "сгенерирует случайный." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2459 msgid "" "Full path to the disk, file, or ZFS volume of the disk storage for this VM. " "Options and multiple disk definitions are separated by commas." msgstr "" "Полный путь к диску, файлу или тому ZFS для дискового хранилища этой ВМ. " "Параметры и определения нескольких дисков разделяются запятыми." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2460 msgid "" "Defines the Boot medium from which the initial operating system is " "installed. In this example, it is the ISO image downloaded earlier. Consult " "the Xen(TM) documentation for other kinds of devices and options to set." msgstr "" "Определяет загрузочный носитель, с которого устанавливается исходная " "операционная система. В данном примере это загруженный ранее образ ISO. О " "других типах устройств и настраиваемых параметрах см. документацию Xen(TM)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2461 msgid "" "Options controlling VNC connectivity to the serial console of the DomU. In " "order, these are: active VNC support, define IP address on which to listen, " "device node for the serial console, and the input method for precise " "positioning of the mouse and other input methods. `keymap` defines which " "keymap to use, and is `english` by default." msgstr "" "Параметры, управляющие подключением VNC к последовательной консоли DomU. В " "порядке перечисления: поддержка VNC, определение IP-адреса для " "прослушивания, файл устройства последовательной консоли и метод ввода для " "точного позиционирования мыши и других методов ввода. `keymap` определяет, " "какую раскладку клавиатуры использовать, по умолчанию установлено значение " "`english`." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2463 msgid "" "After the file has been created with all the necessary options, the DomU is " "created by passing it to `xl create` as a parameter." msgstr "" "После создания файла со всеми необходимыми параметрами DomU создаётся путём " "передачи его в `xl create` в качестве аргумента." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2467 #, no-wrap msgid "# xl create freebsd.cfg\n" msgstr "# xl create freebsd.cfg\n" #. type: delimited block = 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2476 msgid "" "Each time the Dom0 is restarted, the configuration file must be passed to " "`xl create` again to re-create the DomU. By default, only the Dom0 is " "created after a reboot, not the individual VMs. The VMs can continue where " "they left off as they stored the operating system on the virtual disk. The " "virtual machine configuration can change over time (for example, when adding " "more memory). The virtual machine configuration files must be properly " "backed up and kept available to be able to re-create the guest VM when " "needed." msgstr "" "Каждый раз при перезапуске Dom0 конфигурационный файл необходимо снова " "передавать в `xl create`, чтобы воссоздать DomU. По умолчанию после " "перезагрузки создается только Dom0, но не отдельные виртуальные машины. " "Виртуальные машины могут продолжить работу с момента остановки, так как " "операционная система сохраняется на виртуальном диске. Конфигурация " "виртуальной машины может со временем меняться (например, при добавлении " "памяти). Конфигурационные файлы виртуальных машин необходимо надлежащим " "образом резервировать и хранить в доступном месте, чтобы иметь возможность " "воссоздать гостевую виртуальную машину при необходимости." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2479 msgid "The output of `xl list` confirms that the DomU has been created." msgstr "Вывод команды `xl list` подтверждает, что DomU был создан." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2486 #, no-wrap msgid "" "# xl list\n" "Name ID Mem VCPUs State Time(s)\n" "Domain-0 0 8192 4 r----- 1653.4\n" "freebsd 1 1024 1 -b---- 663.9\n" msgstr "" "# xl list\n" "Name ID Mem VCPUs State Time(s)\n" "Domain-0 0 8192 4 r----- 1653.4\n" "freebsd 1 1024 1 -b---- 663.9\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2493 msgid "" "To begin the installation of the base operating system, start the VNC " "client, directing it to the main network address of the host or to the IP " "address defined on the `vnclisten` line of [.filename]#freebsd.cfg#. After " "the operating system has been installed, shut down the DomU and disconnect " "the VNC viewer. Edit [.filename]#freebsd.cfg#, removing the line with the " "`cdrom` definition or commenting it out by inserting a `+#+` character at " "the beginning of the line. To load this new configuration, it is necessary " "to remove the old DomU with `xl destroy`, passing either the name or the id " "as the parameter. Afterwards, recreate it using the modified [." "filename]*freebsd.cfg*." msgstr "" "Для начала установки базовой операционной системы запустите клиент VNC, " "указав основной сетевой адрес хоста или IP-адрес, определённый в строке " "`vnclisten` файла [.filename]#freebsd.cfg#. После установки операционной " "системы завершите работу DomU и отключите VNC-клиент. Отредактируйте файл [." "filename]#freebsd.cfg#, удалив строку с определением `cdrom` или " "закомментировав её, поставив символ `+#+` в начале строки. Чтобы загрузить " "новую конфигурацию, необходимо удалить старый DomU командой `xl destroy`, " "передав в качестве параметра имя или идентификатор. После этого воссоздайте " "его, используя изменённый файл [.filename]*freebsd.cfg*." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2498 #, no-wrap msgid "" "# xl destroy freebsd\n" "# xl create freebsd.cfg\n" msgstr "" "# xl destroy freebsd\n" "# xl create freebsd.cfg\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2502 msgid "" "The machine can then be accessed again using the VNC viewer. This time, it " "will boot from the virtual disk where the operating system has been " "installed and can be used as a virtual machine." msgstr "" "Затем к машине можно снова получить доступ с помощью VNC-клиента. На этот " "раз она загрузится с виртуального диска, на который была установлена " "операционная система, и её можно будет использовать как виртуальную машину." #. type: Title === #: documentation/content/en/books/handbook/virtualization/_index.adoc:2504 #, no-wrap msgid "Troubleshooting" msgstr "Устранение неполадок" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2507 msgid "" "This section contains basic information in order to help troubleshoot issues " "found when using FreeBSD as a Xen(TM) host or guest." msgstr "" "Этот раздел содержит основную информацию, которая поможет в устранении " "проблем, возникающих при использовании FreeBSD в качестве хоста или гостевой " "системы Xen™." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:2509 #, no-wrap msgid "Host Boot Troubleshooting" msgstr "Устранение неполадок при загрузке хоста" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2513 msgid "" "Please note that the following troubleshooting tips are intended for Xen(TM) " "4.11 or newer. When still using Xen(TM) 4.7 and having issues, consider " "migrating to a newer version of Xen(TM)." msgstr "" "Обратите внимание, что следующие советы по устранению неполадок " "предназначены для Xen(TM) 4.11 или новее. Если вы всё ещё используете Xen(TM)" " 4.7 и сталкиваетесь с проблемами, рассмотрите возможность перехода на более " "новую версию Xen(TM)." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2517 msgid "" "In order to troubleshoot host boot issues, a serial cable or a debug USB " "cable is needed. Verbose Xen(TM) boot output can be obtained by adding " "options to the `xen_cmdline` option found in [.filename]#loader.conf#. A " "couple of relevant debug options are:" msgstr "" "Для устранения проблем с загрузкой хоста вам, скорее всего, понадобится " "последовательный кабель или отладочный USB-кабель. Подробный вывод загрузки " "Xen(TM) можно получить, добавив параметры к опции `xen_cmdline` в файле [." "filename]#loader.conf#. Несколько соответствующих отладочных параметров:" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2519 msgid "" "`iommu=debug`: can be used to print additional diagnostic information about " "the iommu." msgstr "" "`iommu=debug`: может использоваться для вывода дополнительной " "диагностической информации о iommu." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2520 msgid "" "`dom0=verbose`: can be used to print additional diagnostic information about " "the dom0 build process." msgstr "" "`dom0=verbose`: может использоваться для вывода дополнительной " "диагностической информации о процессе сборки dom0." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2521 msgid "" "`sync_console`: flag to force synchronous console output. Useful for " "debugging to avoid losing messages due to rate limiting. Never use this " "option in production environments since it can allow malicious guests to " "perform DoS attacks against Xen(TM) using the console." msgstr "" "`sync_console`: флаг для принудительного синхронного вывода на консоль. " "Полезен при отладке, чтобы избежать потери сообщений из-за ограничения " "скорости. Никогда не используйте эту опцию в рабочих средах, так как она " "может позволить злоумышленникам выполнять DoS-атаки на Xen(TM) через консоль." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2524 msgid "" "FreeBSD should also be booted in verbose mode in order to identify any " "issues. To activate verbose booting, run this command:" msgstr "" "FreeBSD также следует загружать в подробном режиме для выявления возможных " "проблем. Чтобы активировать подробную загрузку, выполните следующую команду:" #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2528 #, no-wrap msgid "# echo 'boot_verbose=\"YES\"' >> /boot/loader.conf\n" msgstr "# echo 'boot_verbose=\"YES\"' >> /boot/loader.conf\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2531 msgid "" "If none of these options help solving the problem, please send the serial " "boot log to mailto:freebsd-xen@FreeBSD.org[freebsd-xen@FreeBSD.org] and " "mailto:xen-devel@lists.xenproject.org[xen-devel@lists.xenproject.org] for " "further analysis." msgstr "" "Если ни один из этих вариантов не помог решить проблему, отправьте журнал " "загрузки по последовательному соединению по адресам mailto:freebsd-" "xen@FreeBSD.org[freebsd-xen@FreeBSD.org] и mailto:xen-devel@lists.xenproject." "org[xen-devel@lists.xenproject.org] для дальнейшего анализа." #. type: Title ==== #: documentation/content/en/books/handbook/virtualization/_index.adoc:2533 #, no-wrap msgid "Guest Creation Troubleshooting" msgstr "Устранение неполадок при создании гостевой системы" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2536 msgid "" "Issues can also arise when creating guests, the following attempts to " "provide some help for those trying to diagnose guest creation issues." msgstr "" "Проблемы также могут возникать при создании гостевых систем. В следующем " "разделе представлены рекомендации для диагностики подобных проблем." #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2539 msgid "" "The most common cause of guest creation failures is the `xl` command " "spitting some error and exiting with a return code different than 0. If the " "error provided is not enough to help identify the issue, more verbose output " "can also be obtained from `xl` by using the `v` option repeatedly." msgstr "" "Наиболее распространённой причиной сбоев при создании гостевой системы " "является команда `xl`, которая выдаёт ошибку и завершается с кодом возврата, " "отличным от 0. Если предоставленного сообщения об ошибке недостаточно для " "определения проблемы, можно получить более подробный вывод от `xl`, " "многократно используя опцию `v`." #. type: delimited block . 4 #: documentation/content/en/books/handbook/virtualization/_index.adoc:2555 #, no-wrap msgid "" "# xl -vvv create freebsd.cfg\n" "Parsing config from freebsd.cfg\n" "libxl: debug: libxl_create.c:1693:do_domain_create: Domain 0:ao 0x800d750a0: create: how=0x0 callback=0x0 poller=0x800d6f0f0\n" "libxl: debug: libxl_device.c:397:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=unknown\n" "libxl: debug: libxl_device.c:432:libxl__device_disk_set_backend: Disk vdev=xvda, using backend phy\n" "libxl: debug: libxl_create.c:1018:initiate_domain_create: Domain 1:running bootloader\n" "libxl: debug: libxl_bootloader.c:328:libxl__bootloader_run: Domain 1:not a PV/PVH domain, skipping bootloader\n" "libxl: debug: libxl_event.c:689:libxl__ev_xswatch_deregister: watch w=0x800d96b98: deregister unregistered\n" "domainbuilder: detail: xc_dom_allocate: cmdline=\"\", features=\"\"\n" "domainbuilder: detail: xc_dom_kernel_file: filename=\"/usr/local/lib/xen/boot/hvmloader\"\n" "domainbuilder: detail: xc_dom_malloc_filemap : 326 kB\n" "libxl: debug: libxl_dom.c:988:libxl__load_hvm_firmware_module: Loading BIOS: /usr/local/share/seabios/bios.bin\n" "...\n" msgstr "" "# xl -vvv create freebsd.cfg\n" "Parsing config from freebsd.cfg\n" "libxl: debug: libxl_create.c:1693:do_domain_create: Domain 0:ao 0x800d750a0: create: how=0x0 callback=0x0 poller=0x800d6f0f0\n" "libxl: debug: libxl_device.c:397:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=unknown\n" "libxl: debug: libxl_device.c:432:libxl__device_disk_set_backend: Disk vdev=xvda, using backend phy\n" "libxl: debug: libxl_create.c:1018:initiate_domain_create: Domain 1:running bootloader\n" "libxl: debug: libxl_bootloader.c:328:libxl__bootloader_run: Domain 1:not a PV/PVH domain, skipping bootloader\n" "libxl: debug: libxl_event.c:689:libxl__ev_xswatch_deregister: watch w=0x800d96b98: deregister unregistered\n" "domainbuilder: detail: xc_dom_allocate: cmdline=\"\", features=\"\"\n" "domainbuilder: detail: xc_dom_kernel_file: filename=\"/usr/local/lib/xen/boot/hvmloader\"\n" "domainbuilder: detail: xc_dom_malloc_filemap : 326 kB\n" "libxl: debug: libxl_dom.c:988:libxl__load_hvm_firmware_module: Loading BIOS: /usr/local/share/seabios/bios.bin\n" "...\n" #. type: Plain text #: documentation/content/en/books/handbook/virtualization/_index.adoc:2560 msgid "" "If the verbose output does not help diagnose the issue, there are also QEMU " "and Xen(TM) toolstack logs in [.filename]#/var/log/xen#. Note that the name " "of the domain is appended to the log name, so if the domain is named " "`freebsd` find a [.filename]#/var/log/xen/xl-freebsd.log# and likely a [." "filename]#/var/log/xen/qemu-dm-freebsd.log#. Both log files can contain " "useful information for debugging. If none of this helps solve the issue, " "please send the description of the issue and as much information as possible " "to mailto:freebsd-xen@FreeBSD.org[freebsd-xen@FreeBSD.org] and mailto:xen-" "devel@lists.xenproject.org[xen-devel@lists.xenproject.org] to get help." msgstr "" "Если подробный вывод не помог диагностировать проблему, также существуют " "журналы QEMU и инструментов Xen(TM) в [.filename]#/var/log/xen#. Обратите " "внимание, что имя домена добавляется к имени журнала, поэтому если домен " "называется `freebsd`, вы найдете файлы [.filename]#/var/log/xen/xl-freebsd." "log# и, вероятно, [.filename]#/var/log/xen/qemu-dm-freebsd.log#. Оба файла " "журналов могут содержать полезную информацию для отладки. Если ничто из " "этого не помогло решить проблему, пожалуйста, отправьте описание возникшей " "проблемы и как можно больше информации на адреса mailto:freebsd-xen@FreeBSD." "org[freebsd-xen@FreeBSD.org] и mailto:xen-devel@lists.xenproject.org[xen-" "devel@lists.xenproject.org], чтобы получить помощь."