Provided by: libguestfs-tools_1.36.13-1ubuntu3.3_amd64 bug

НАЗВА

       virt-customize - Customize a virtual machine

КОРОТКИЙ ОПИС

        virt-customize
           [ -a диск.img [ -a диск.img ... ] | -d назва домену ]
           [--attach файл ISO] [--attach-format ФОРМАТ]
           [ -c АДРЕСА | --connect АДРЕСА ] [ -n | --dry-run ]
           [ --format ФОРМАТ] [ -m МБ | --memsize МБ ]
           [ --network | --no-network ]
           [ -q | --quiet ] [--smp N] [ -v | --verbose ] [-x]

        virt-customize [ -V | --version ]

ОПИС

       Virt-customize can customize a virtual machine (disk image) by installing packages, editing configuration
       files, and so on.

       Virt-customize modifies the guest or disk image in place.  The guest must be shut down.  If you want to
       preserve the existing contents of the guest, you must snapshot, copy or clone the disk first.

       You do not need to run virt-customize as root.  In fact we'd generally recommend that you don't.

       Related tools include: virt-sysprep(1) and virt-builder(1).

ПАРАМЕТРИ

       --help
           Показати коротку довідку.

       -a файл
       --add файл
           Додати файл, який має бути образом диска з віртуальної машини.

           Формат  образу  диска визначається автоматично. Щоб перевизначити його і примусово використати певний
           формат, скористайтеся параметром --format.

       -a адреса
       --add адреса
           Add a remote disk.  The URI format is compatible with guestfish.   See  "ADDING  REMOTE  STORAGE"  in
           guestfish(1).

       --attach ФАЙЛ_ISO
           The  given  disk  is  attached  to  the libguestfs appliance.  This is used to provide extra software
           repositories or other data for customization.

           You probably want to ensure the volume(s) or filesystems in the attached disks are labelled  (or  use
           an ISO volume name) so that you can mount them by label in your run-scripts:

            mkdir /tmp/mount
            mount LABEL=EXTRA /tmp/mount

           You can have multiple --attach options, and the format can be any disk format (not just an ISO).

       --attach-format ФОРМАТ
           Specify the disk format for the next --attach option.  The "FORMAT" is usually "raw" or "qcow2".  Use
           "raw" for ISOs.

       --colors
       --colours
           Use  ANSI  colour sequences to colourize messages.  This is the default when the output is a tty.  If
           the output of the program is redirected to a file, ANSI colour sequences are disabled unless you  use
           this option.

       -c адреса
       --connect адреса
           Якщо  використовується  libvirt,  встановити з’єднання з вказаним URI. Якщо пропущено, з’єднання буде
           встановлено з типовим гіпервізором libvirt.

           Якщо вказати блокові пристрої гостьових систем безпосередньо (-a), libvirt не буде  використовуватися
           взагалі.

       -d гість
       --domain гість
           Додати  всі  диски  з  вказаної гостьової системи libvirt. UUID доменів можна використовувати замість
           назв.

       -n
       --dry-run
           Perform a read-only "dry run" on the guest.  This runs the sysprep operation,  but  throws  away  any
           changes to the disk at the end.

       --echo-keys
           When  prompting for keys and passphrases, virt-customize normally turns echoing off so you cannot see
           what you are typing.  If you are not worried about Tempest attacks and there is no one  else  in  the
           room you can specify this flag to see what you are typing.

       --format raw|qcow2|..
       --format auto
           Типовим  значенням для параметра -a є автоматичне визначення формату образу диска. Використання цього
           параметра примусово визначає значення  параметрів  -a  формату  диска  у  наступному  рядку  команди.
           Використання  параметра --format auto перемикає програму у режим автоматичного визначення у наступних
           параметрах -a.

           Приклад:

            virt-customize --format raw -a disk.img

           примусове встановлення формату без обробки (без автоматичного визначення) для disk.img.

            virt-customize --format raw -a disk.img --format auto -a another.img

           примусове встановлення формату без обробки (без автоматичного визначення) для diskimg і повернення до
           автоматичного визначення для another.img.

           Якщо ви користуєтеся  ненадійними  образами  гостьових  систем  у  необробленому  форматі,  вам  слід
           скористатися цим параметром для визначення формату диска. Таким чином можна уникнути можливих проблем
           з захистом для сформованих зловмисниками гостьових систем (CVE-2010-3851).

       --keys-from-stdin
           Read  key  or  passphrase  parameters from stdin.  The default is to try to read passphrases from the
           user by opening /dev/tty.

       -m МБ
       --memsize МБ
           Change the amount of memory allocated to --run scripts.  Increase this if you find that --run scripts
           or the --install option are running out of memory.

           Типові значення можна визначити за допомогою такої команди:

            guestfish get-memsize

       --network
       --no-network
           Увімкнути чи вимкнути доступ до мережі для гостьової системи під час встановлення.

           Типово увімкнено. Скористайтеся параметром --no-network, щоб вимкнути доступ.

           The network only allows outgoing connections and has  other  minor  limitations.   See  "NETWORK"  in
           virt-rescue(1).

           If you use --no-network then certain other options such as --install will not work.

           This  does  not affect whether the guest can access the network once it has been booted, because that
           is controlled by your hypervisor or cloud environment and has nothing to do with virt-customize.

           Загалом кажучи, вам не варто використовувати --no-network. Але ось декілька випадків, коли у вас може
           виникнути потреба у використанні цього параметра:

           1.  У модулі обробки libguestfs, яким  ви  користуєтеся,  не  передбачено  підтримки  мережі.   (Див.
               "BACKEND" in guestfs(3)).

           2.  Усе програмне забезпечення, яке ви маєте намір встановити, походить з долученого образу ISO, отже
               потреби у мережі немає.

           3.  You  don't  want  untrusted  guest  code  trying  to  access your host network when running virt-
               customize.  This is particularly an issue when you don't trust the source of the operating system
               templates.  (See "SECURITY" below).

           4.  Ви не хочете користуватися мережею основної системи (наприклад, через захищеність або обмеженість
               середовища у ній).

       -q
       --quiet
           Не виводити повідомлень до журналу.

           To enable detailed logging of individual file operations, use -x.

       --smp N
           Enable N ≥ 2 virtual CPUs for --run scripts to use.

       -v
       --verbose
           Увімкнути докладний показ повідомлень з метою діагностики.

       -V
       --version
           Показати дані щодо версії і завершити роботу.

       -x  Увімкнути трасування викликів програмного інтерфейсу libguestfs.

   Параметри налаштовування
       --append-line FILE:LINE
           Append a single line of text to the "FILE".  If the file does not already end with  a  newline,  then
           one  is  added  before  the  appended  line.  Also a newline is added to the end of the "LINE" string
           automatically.

           For example (assuming ordinary shell quoting) this command:

            --append-line '/etc/hosts:10.0.0.1 foo'

           will add either "10.0.0.1 foo⏎" or "⏎10.0.0.1 foo⏎" to the file, the latter only if the existing file
           does not already end with a newline.

           "⏎" represents a newline character, which is guessed by looking at the existing content of the  file,
           so this command does the right thing for files using Unix or Windows line endings.  It also works for
           empty or non-existent files.

           To insert several lines, use the same option several times:

            --append-line '/etc/hosts:10.0.0.1 foo'
            --append-line '/etc/hosts:10.0.0.2 bar'

           To insert a blank line before the appended line, do:

            --append-line '/etc/hosts:'
            --append-line '/etc/hosts:10.0.0.1 foo'

       --chmod ПРАВА_ДОСТУПУ:ФАЙЛ
           Змінити права доступу до файла "ФАЙЛ" на "ПРАВА_ДОСТУПУ".

           Зауваження: типово "ПРАВА_ДОСТУПУ" записуються у десятковому форматі, якщо ви не додасте початковий 0
           , щоб вказати вісімкове число, тобто скористаєтеся 0700, а не 700.

       --commands-from-file НАЗВА_ФАЙЛА
           Прочитати команди налаштовування з файла, по одній (разом із аргументами) на рядок.

           Кожен рядок містить команду налаштовування та її аргументи, наприклад:

            delete /якийсь/файл
            install якийсь_пакунок
            password якийсь-користувач:password:його-новий-пароль

           Empty  lines  are  ignored,  and  lines  starting  with  "#"  are  comments  and are ignored as well.
           Furthermore, arguments can be spread across multiple lines, by adding a "\" (continuation  character)
           at the of a line, for example

            edit /якийсь/файл:\
              s/^OPT=.*/OPT=ok/

           The  commands  are  handled  in  the same order as they are in the file, as if they were specified as
           --delete /some/file on the command line.

       --copy ДЖЕРЕЛО:ПРИЗНАЧЕННЯ
           Копіювати файли або каталоги рекурсивно у межах гостьової системи.

           Не можна використовувати символи-замінники.

       --copy-in ЛОКАЛЬНИЙ_ШЛЯХ:ВІДДАЛЕНИЙ_КАТАЛОГ
           Copy local files or directories recursively into the  disk  image,  placing  them  in  the  directory
           "REMOTEDIR" (which must exist).

           Не можна використовувати символи-замінники.

       --delete ШЛЯХ
           Вилучити файл з гостьової системи. Або вилучити каталог (і увесь його вміст, рекурсивно).

           You  can  use shell glob characters in the specified path.  Be careful to escape glob characters from
           the host shell, if that is required.  For example:

            virt-customize --delete '/var/log/*.log'.

           Див. також --upload, --scrub.

       --edit ФАЙЛ:ВИРАЗ
           Edit "FILE" using the Perl expression "EXPR".

           Be careful to properly quote the expression to prevent it from being altered by the shell.

           Note that this option is only available when Perl 5 is installed.

           Див. "NON-INTERACTIVE EDITING" in virt-edit(1).

       --firstboot СКРИПТ
           Install "SCRIPT" inside the guest, so that when the guest first boots up, the script runs  (as  root,
           late in the boot process).

           The script is automatically chmod +x after installation in the guest.

           The  alternative version --firstboot-command is the same, but it conveniently wraps the command up in
           a single line script for you.

           You can have multiple --firstboot options.  They run in the  same  order  that  they  appear  on  the
           command line.

           Please  take a look at "FIRST BOOT SCRIPTS" in virt-builder(1) for more information and caveats about
           the first boot scripts.

           Див. також --run.

       --firstboot-command 'КОМАНДА+ПАРАМЕТРИ'
           Run command (and arguments) inside the guest when the guest first boots up (as root, late in the boot
           process).

           You can have multiple --firstboot options.  They run in the  same  order  that  they  appear  on  the
           command line.

           Please  take a look at "FIRST BOOT SCRIPTS" in virt-builder(1) for more information and caveats about
           the first boot scripts.

           Див. також --run.

       --firstboot-install ПАКУНОК,ПАКУНОК..
           Install the named packages (a comma-separated list).  These are installed when the guest first  boots
           using the guest's package manager (eg. apt, yum, etc.) and the guest's network connection.

           For   an  overview  on  the  different  ways  to  install  packages,  see  "INSTALLING  PACKAGES"  in
           virt-builder(1).

       --hostname НАЗВА_ВУЗЛА
           Set the hostname of the guest to "HOSTNAME".  You can use a dotted hostname.domainname (FQDN) if  you
           want.

       --install ПАКУНОК,ПАКУНОК..
           Install  the  named  packages  (a  comma-separated list).  These are installed during the image build
           using the guest's package manager (eg. apt, yum, etc.) and the host's network connection.

           For  an  overview  on  the  different  ways  to  install  packages,  see  "INSTALLING  PACKAGES"   in
           virt-builder(1).

           See also --update, --uninstall.

       --link TARGET:LINK[:LINK..]
           Create symbolic link(s) in the guest, starting at "LINK" and pointing at "TARGET".

       --mkdir КАТАЛОГ
           Створити каталог у гостьовій системі.

           This  uses "mkdir -p" so any intermediate directories are created, and it also works if the directory
           already exists.

       --move ДЖЕРЕЛО:ПРИЗНАЧЕННЯ
           Пересунути файли або каталоги у межах гостьової системи.

           Не можна використовувати символи-замінники.

       --no-logfile
           Scrub "builder.log" (log file from build commands) from the image after building is complete.  If you
           don't want to reveal precisely how the image was built, use this option.

           Див. також "LOG FILE".

       --password КОРИСТУВАЧ:ВАРІАНТ
           Set the password for "USER".  (Note this option does not create the user account).

           See "USERS AND PASSWORDS" in virt-builder(1) for the format of the "SELECTOR" field, and also how  to
           set up user accounts.

       --password-crypto md5|sha256|sha512
           When  the  virt tools change or set a password in the guest, this option sets the password encryption
           of that password to "md5", "sha256" or "sha512".

           "sha256" and "sha512" require glibc ≥ 2.7 (check crypt(3) inside the guest).

           "md5" працюватиме з відносно давніми гостьовими системами Linux (наприкладRHEL 3), але є  незахищеним
           щодо новітніх способів атак.

           Типовим  способом  шифрування  є  "sha512".  Він використовується, якщо libguestfs вдасться виявити у
           гостьовій системі підтримку SHA-512. Якщо такої підтримки  не  буде  виявлено,  використовуватиметься
           "md5".  За допомогою цього параметра ви можете перевизначити автоматично визначений libguestfs спосіб
           шифрування.

           Note this does not change the default password encryption used by the guest when you create new  user
           accounts  inside  the guest.  If you want to do that, then you should use the --edit option to modify
           "/etc/sysconfig/authconfig" (Fedora, RHEL) or "/etc/pam.d/common-password" (Debian, Ubuntu).

       --root-password SELECTOR
           Встановити пароль користувача root.

           See "USERS AND PASSWORDS" in virt-builder(1) for the format of the "SELECTOR" field, and also how  to
           set up user accounts.

           Note:  In  virt-builder,  if  you  don't  set  --root-password  then the guest is given a random root
           password.

       --run СКРИПТ
           Run the shell script (or any program) called "SCRIPT" on the disk image.  The script runs virtualized
           inside a small appliance, chrooted into the guest filesystem.

           The script is automatically chmod +x.

           If libguestfs supports it then a limited network connection is available but it only allows  outgoing
           network  connections.   You can also attach data disks (eg. ISO files) as another way to provide data
           (eg. software packages) to the script without needing a network connection (--attach).  You can  also
           upload data files (--upload).

           You  can  have  multiple  --run  options.  They run in the same order that they appear on the command
           line.

           Див. також --firstboot, --attach, --upload.

       --run-command 'КОМАНДА+ПАРАМЕТРИ'
           Run the command and arguments on the disk  image.   The  command  runs  virtualized  inside  a  small
           appliance, chrooted into the guest filesystem.

           If  libguestfs supports it then a limited network connection is available but it only allows outgoing
           network connections.  You can also attach data disks (eg. ISO files) as another way to  provide  data
           (eg.  software packages) to the script without needing a network connection (--attach).  You can also
           upload data files (--upload).

           You can have multiple --run-command options.  They run in the same order  that  they  appear  on  the
           command line.

           Див. також --firstboot, --attach, --upload.

       --scrub ФАЙЛ
           Витерти файл з гостьової системи. Подібне до --delete, окрім того, що:

           •   It scrubs the data so a guest could not recover it.

           •   It cannot delete directories, only regular files.

       --selinux-relabel
           Relabel files in the guest so that they have the correct SELinux label.

           This  will  attempt  to relabel files immediately, but if the operation fails this will instead touch
           /.autorelabel on the image to schedule a relabel operation for the next time the image boots.

           You should only use this option for guests which support SELinux.

       --sm-attach SELECTOR
           Attach to a pool using "subscription-manager".

           See "SUBSCRIPTION-MANAGER" in virt-builder(1) for the format of the "SELECTOR" field.

       --sm-credentials SELECTOR
           Set the credentials for "subscription-manager".

           See "SUBSCRIPTION-MANAGER" in virt-builder(1) for the format of the "SELECTOR" field.

       --sm-register
           Register the guest using "subscription-manager".

           This requires credentials being set using --sm-credentials.

       --sm-remove
           Remove all the subscriptions from the guest using "subscription-manager".

       --sm-unregister
           Unregister the guest using "subscription-manager".

       --ssh-inject КОРИСТУВАЧ[:ВАРІАНТ]
           Inject an ssh key so the given "USER" will be able to log in over ssh without supplying  a  password.
           The "USER" must exist already in the guest.

           See "SSH KEYS" in virt-builder(1) for the format of the "SELECTOR" field.

           You can have multiple --ssh-inject options, for different users and also for more keys for each user.

       --timezone ЧАСОВИЙ_ПОЯС
           Set the default timezone of the guest to "TIMEZONE".  Use a location string like "Europe/London"

       --touch ФАЙЛ
           This command performs a touch(1)-like operation on "FILE".

       --truncate ФАЙЛ
           This command truncates "FILE" to a zero-length file. The file must exist already.

       --truncate-recursive ШЛЯХ
           This command recursively truncates all files under "PATH" to zero-length.

       --uninstall ПАКУНОК,ПАКУНОК..
           Uninstall  the  named  packages  (a  comma-separated list).  These are removed during the image build
           using the guest's package manager (eg. apt, yum, etc.).  Dependent  packages  may  also  need  to  be
           uninstalled to satisfy the request.

           See also --install, --update.

       --update
           Do  the  equivalent of "yum update", "apt-get upgrade", or whatever command is required to update the
           packages already installed in the template to their latest versions.

           See also --install, --uninstall.

       --upload ФАЙЛ:ПРИЗНАЧЕННЯ
           Upload local file "FILE" to destination "DEST" in the disk image.  File owner  and  permissions  from
           the original are preserved, so you should set them to what you want them to be in the disk image.

           "DEST" could be the final filename.  This can be used to rename the file on upload.

           If "DEST" is a directory name (which must already exist in the guest)  then the file is uploaded into
           that directory, and it keeps the same name as on the local filesystem.

           Див. також --mkdir, --delete, --scrub.

       --write ФАЙЛ:ДАНІ
           Записати "ДАНІ" до файла "ФАЙЛ".

SELINUX

       For  guests  which  make  use of SELinux, special handling for them might be needed when using operations
       which create new files or alter existing ones.

       For further details, see "SELINUX" in virt-builder(1).

СТАН ВИХОДУ

       This program returns 0 on success, or 1 if there was an error.

ЗМІННІ СЕРЕДОВИЩА

       "VIRT_TOOLS_DATA_DIR"
           This can point to the directory containing data files used for Windows firstboot installation.

           Зазвичай, потреби у  встановленні  власного  значення  немає.  Якщо  значення  не  встановлено,  буде
           використано вбудоване типове значення (щось схоже на /usr/share/virt-tools).

           Цей каталог може містити такі файли:

           rhsrvany.exe
               This  is the RHSrvAny Windows binary, used to install a "firstboot" script in Windows guests.  It
               is required if you intend to use the --firstboot  or  --firstboot-command  options  with  Windows
               guests.

               Див. також "https://github.com/rwmjones/rhsrvany"

           pvvxsvc.exe
               This  is a Windows binary shipped with SUSE VMDP, used to install a "firstboot" script in Windows
               guests.  It is required if you intend to use the --firstboot or --firstboot-command options  with
               Windows guests.

       Опис інших змінних середовища наведено у розділі "ENVIRONMENT VARIABLES" in guestfs(3).

ТАКОЖ ПЕРЕГЛЯНЬТЕ

       guestfs(3),     guestfish(1),    virt-builder(1),    virt-clone(1),    virt-rescue(1),    virt-resize(1),
       virt-sparsify(1), virt-sysprep(1), virsh(1), lvcreate(8), qemu-img(1), scrub(1),  http://libguestfs.org/,
       http://libvirt.org/.

АВТОРИ

       Richard W.M. Jones http://people.redhat.com/~rjones/

АВТОРСЬКІ ПРАВА

       Copyright (C) 2011-2017 Red Hat Inc.

LICENSE

       This  program  is  free  software;  you  can  redistribute it and/or modify it under the terms of the GNU
       General Public License as published by the Free Software Foundation; either version 2 of the License,  or
       (at your option) any later version.

       This  program  is  distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
       the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General  Public
       License for more details.

       You  should have received a copy of the GNU General Public License along with this program; if not, write
       to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

BUGS

       To     get      a      list      of      bugs      against      libguestfs,      use      this      link:
       https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools

       To       report       a       new       bug       against       libguestfs,      use      this      link:
       https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools

       When reporting a bug, please supply:

       •   The version of libguestfs.

       •   Where you got libguestfs (eg. which Linux distro, compiled from source, etc)

       •   Describe the bug accurately and give a way to reproduce it.

       •   Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.

libguestfs-1.36.13                                 2018-01-25                                  virt-customize(1)