#, fuzzy msgid "" msgstr "" "Project-Id-Version: Virtual Machine Image Guide\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-26 07:31+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../convert-images.rst:3 msgid "Converting between image formats" msgstr "" #: ../convert-images.rst:5 msgid "" "Converting images from one format to another is generally straightforward." msgstr "" #: ../convert-images.rst:8 msgid "qemu-img convert: raw, qcow2, qed, vdi, vmdk, vhd" msgstr "" #: ../convert-images.rst:10 msgid "" "The :command:`qemu-img convert` command can do conversion between multiple " "formats, including ``qcow2``, ``qed``, ``raw``, ``vdi``, ``vhd``, and " "``vmdk``." msgstr "" #: ../convert-images.rst:14 msgid "qemu-img format strings" msgstr "" #: ../convert-images.rst:17 msgid "Image format" msgstr "" #: ../convert-images.rst:18 msgid "Argument to qemu-img" msgstr "" #: ../convert-images.rst:19 msgid "QCOW2 (KVM, Xen)" msgstr "" #: ../convert-images.rst:20 msgid "``qcow2``" msgstr "" #: ../convert-images.rst:21 msgid "QED (KVM)" msgstr "" #: ../convert-images.rst:22 msgid "``qed``" msgstr "" #: ../convert-images.rst:23 msgid "raw" msgstr "" #: ../convert-images.rst:24 msgid "``raw``" msgstr "" #: ../convert-images.rst:25 msgid "VDI (VirtualBox)" msgstr "" #: ../convert-images.rst:26 msgid "``vdi``" msgstr "" #: ../convert-images.rst:27 msgid "VHD (Hyper-V)" msgstr "" #: ../convert-images.rst:28 msgid "``vpc``" msgstr "" #: ../convert-images.rst:29 msgid "VMDK (VMware)" msgstr "" #: ../convert-images.rst:30 msgid "``vmdk``" msgstr "" #: ../convert-images.rst:32 msgid "" "This example will convert a raw image file named ``image.img`` to a qcow2 " "image file." msgstr "" #: ../convert-images.rst:39 msgid "" "Run the following command to convert a vmdk image file to a raw image file." msgstr "" #: ../convert-images.rst:45 msgid "" "Run the following command to convert a vmdk image file to a qcow2 image file." "" msgstr "" #: ../convert-images.rst:53 msgid "" "The ``-f format`` flag is optional. If omitted, ``qemu-img`` will try to " "infer the image format." msgstr "" #: ../convert-images.rst:56 msgid "" "When converting an image file with Windows, ensure the virtio driver is " "installed. Otherwise, you will get a blue screen when launching the image " "due to lack of the virtio driver. Another option is to set the image " "properties as below when you update the image in the Image service to avoid " "this issue, but it will reduce virtual machine performance significantly." msgstr "" #: ../convert-images.rst:69 msgid "VBoxManage: VDI (VirtualBox) to raw" msgstr "" #: ../convert-images.rst:71 msgid "" "If you've created a VDI image using VirtualBox, you can convert it to raw " "format using the ``VBoxManage`` command-line tool that ships with VirtualBox." " On Mac OS X, and Linux, VirtualBox stores images by default in the ``~/" "VirtualBox VMs/`` directory. The following example creates a raw image in " "the current directory from a VirtualBox VDI image." msgstr "" #: ../create-images-automatically.rst:3 msgid "Tools to automate image creation" msgstr "" #: ../create-images-automatically.rst:5 msgid "There are several tools that are designed to automate image creation." msgstr "" #: ../create-images-automatically.rst:7 #: ../create-images-manually-example-centos-image.rst:10 #: ../create-images-manually-example-fedora-image.rst:10 #: ../create-images-manually-example-freebsd-image.rst:20 #: ../create-images-manually-example-ubuntu-image.rst:9 #: ../create-images-manually-example-windows-image.rst:5 #: ../create-images-manually-tools-libvirt.rst:5 ../index.rst:12 #: ../obtain-images.rst:5 msgid "Contents" msgstr "" #: ../create-images-automatically.rst:10 msgid "OpenStack tools" msgstr "" #: ../create-images-automatically.rst:13 msgid "Diskimage-builder" msgstr "" #: ../create-images-automatically.rst:15 msgid "" "`Diskimage-builder `_ " "is an automated disk image creation tool that supports a variety of " "distributions and architectures. Diskimage-builder (DIB) can build images " "for Fedora, Red Hat Enterprise Linux, Ubuntu, Debian, CentOS, and openSUSE. " "DIB is organized in a series of elements that build on top of each other to " "create specific images." msgstr "" #: ../create-images-automatically.rst:23 ../create-images-automatically.rst:219 msgid "To build an image, call the following script:" msgstr "" #: ../create-images-automatically.rst:29 msgid "" "This example creates a generic, bootable Ubuntu image of the latest release." msgstr "" #: ../create-images-automatically.rst:31 msgid "" "Further customization could be accomplished by setting environment variables " "or adding elements to the command-line:" msgstr "" #: ../create-images-automatically.rst:38 msgid "" "This example creates the image as before, but for arm architecture. More " "elements are available in the `git source directory `_ " "and documented in the `diskimage-builder elements documentation `_." msgstr "" #: ../create-images-automatically.rst:45 msgid "External tools" msgstr "" #: ../create-images-automatically.rst:48 msgid "image-bootstrap" msgstr "" #: ../create-images-automatically.rst:50 msgid "" "`image-bootstrap `_ is a " "command line tool that generates bootable virtual machine images with " "support for Arch, Debian, Gentoo and Ubuntu, and is prepared for use with " "OpenStack." msgstr "" #: ../create-images-automatically.rst:56 msgid "KIWI" msgstr "" #: ../create-images-automatically.rst:58 msgid "" "The `KIWI appliance builder `_ provides " "an operating system image builder for various Linux supported hardware " "platforms as well as for virtualization and cloud systems. It allows " "building of images based on openSUSE, SUSE Linux Enterprise, and Red Hat " "Enterprise Linux. The `KIWI NG Documentation `_ explains how to use it." msgstr "" #: ../create-images-automatically.rst:66 msgid "openstack-debian-images" msgstr "" #: ../create-images-automatically.rst:68 msgid "" "`openstack-debian-images `_ is the tool Debian uses to create its official OpenStack image. It " "is made of a single very simple shell script that is easy to understand and " "modify. It supports Grub and Syslinux, BIOS or EFI, amd64 and arm64 arch." msgstr "" #: ../create-images-automatically.rst:73 msgid "" "openstack-debian-images can also be used to create a bootable image directly " "on a hard disk, instead of using the Debian installer." msgstr "" #: ../create-images-automatically.rst:76 msgid "To build an image, type this:" msgstr "" #: ../create-images-automatically.rst:82 msgid "More parameters can be added to further customize the image:" msgstr "" #: ../create-images-automatically.rst:93 msgid "" "The file ``/root/my-hook-script.sh`` will recieve 2 environment variable: " "``BODI_CHROOT_PATH`` path where the image is mounted, and ``BODI_RELEASE`` " "which is the name of the Debian release that is being bootstraped. Here's an " "example for customizing the motd:" msgstr "" #: ../create-images-automatically.rst:104 msgid "" "This hook script will conveniently be called at the correct moment of the " "build process, when everything is installed, but before unmounting the " "partition." msgstr "" #: ../create-images-automatically.rst:109 msgid "Oz" msgstr "" #: ../create-images-automatically.rst:111 msgid "" "`Oz `_ is a command-line tool that " "automates the process of creating a virtual machine image file. Oz is a " "Python app that interacts with KVM to step through the process of installing " "a virtual machine." msgstr "" #: ../create-images-automatically.rst:116 msgid "" "It uses a predefined set of kickstart (Red Hat-based systems) and preseed " "files (Debian-based systems) for operating systems that it supports, and it " "can also be used to create Microsoft Windows images." msgstr "" #: ../create-images-automatically.rst:120 msgid "" "A full treatment of Oz is beyond the scope of this document, but we will " "provide an example. You can find additional examples of Oz template files on " "GitHub at `rcbops/oz-image-build/tree/master/templates `_. Here's how you would create " "a CentOS 6.4 image with Oz." msgstr "" #: ../create-images-automatically.rst:126 msgid "" "Create a template file called ``centos64.tdl`` with the following contents. " "The only entry you will need to change is the ```` contents." msgstr "" #: ../create-images-automatically.rst:166 msgid "" "This Oz template specifies where to download the Centos 6.4 install ISO. Oz " "will use the version information to identify which kickstart file to use. In " "this case, it will be `RHEL6.auto `_. It adds EPEL as a repository and install the " "``epel-release``, ``cloud-utils``, and ``cloud-init`` packages, as specified " "in the ``packages`` section of the file." msgstr "" #: ../create-images-automatically.rst:174 msgid "" "After Oz completes the initial OS install using the kickstart file, it " "customizes the image with an update. It also removes any reference to the " "eth0 device that libvirt creates while Oz does the customizing, as specified " "in the ``command`` section of the XML file." msgstr "" #: ../create-images-automatically.rst:179 msgid "To run this:" msgstr "" #: ../create-images-automatically.rst:185 msgid "The ``-d3`` flag tells Oz to show status information as it runs." msgstr "" #: ../create-images-automatically.rst:186 msgid "" "The ``-u`` tells Oz to do the customization (install extra packages, run the " "commands) once it does the initial install." msgstr "" #: ../create-images-automatically.rst:188 msgid "" "The ``-x`` flag tells Oz what filename to use to write out a libvirt XML " "file (otherwise it will default to something like ``centos64Apr_03_2013-12:" "39:42``)." msgstr "" #: ../create-images-automatically.rst:192 msgid "" "If you leave out the ``-u`` flag, or you want to edit the file to do " "additional customizations, you can use the :command:`oz-customize` command, " "using the libvirt XML file that :command:`oz-install` creates. For example:" msgstr "" #: ../create-images-automatically.rst:201 msgid "" "Oz will invoke libvirt to boot the image inside of KVM, then Oz will ssh " "into the instance and perform the customizations." msgstr "" #: ../create-images-automatically.rst:205 msgid "Packer" msgstr "" #: ../create-images-automatically.rst:207 msgid "" "`Packer `_ is a tool for creating machine images for " "multiple platforms from a single source configuration." msgstr "" #: ../create-images-automatically.rst:211 msgid "virt-builder" msgstr "" #: ../create-images-automatically.rst:213 msgid "" "`Virt-builder `_ is a tool for " "quickly building new virtual machines. You can build a variety of VMs for " "local or cloud use, usually within a few minutes or less. Virt-builder also " "has many ways to customize these VMs. Everything is run from the command " "line and nothing requires root privileges, so automation and scripting is " "simple." msgstr "" #: ../create-images-automatically.rst:226 msgid "To list the operating systems available to install:" msgstr "" #: ../create-images-automatically.rst:232 msgid "To import it into libvirt with :command:`virsh`:" msgstr "" #: ../create-images-automatically.rst:240 msgid "windows-openstack-imaging-tools" msgstr "" #: ../create-images-automatically.rst:242 msgid "" "`windows-openstack-imaging-tools `_ is a PowerShell module that automates the Windows " "image creation for OpenStack and supports building VHDX, QCOW2, RAW and VMDK " "image types." msgstr "" #: ../create-images-automatically.rst:247 msgid "" "For easier installation, the tool is published as a PowerShellGallery module " "`WindowsImageBuilder `_." msgstr "" #: ../create-images-automatically.rst:251 msgid "Windows image build example:" msgstr "" #: ../create-images-automatically.rst:267 msgid "Requirements:" msgstr "" #: ../create-images-automatically.rst:269 msgid "" "A Windows host, with Hyper-V virtualization enabled, PowerShell >=v4 support " "and Windows Assessment and Deployment Kit (ADK)." msgstr "" #: ../create-images-automatically.rst:271 msgid "A Windows installation ISO or DVD." msgstr "" #: ../create-images-automatically.rst:272 msgid "" "Windows compatible drivers, if required by the target environment. For " "example, `VirtIO `_, network card, or storage adapter drivers." msgstr "" #: ../create-images-automatically.rst:276 msgid "Git environment." msgstr "" #: ../create-images-manually-example-centos-image.rst:3 msgid "Example: CentOS image" msgstr "" #: ../create-images-manually-example-centos-image.rst:5 msgid "" "This example shows you how to install a CentOS image and focuses mainly on " "CentOS 7. Because the CentOS installation process might differ across " "versions, the installation steps might differ if you use a different version " "of CentOS." msgstr "" #: ../create-images-manually-example-centos-image.rst:13 msgid "Download a CentOS install ISO" msgstr "" #: ../create-images-manually-example-centos-image.rst:15 msgid "" "Navigate to the `CentOS mirrors `_ " "page." msgstr "" #: ../create-images-manually-example-centos-image.rst:17 msgid "" "Click one of the ``HTTP`` links in the right-hand column next to one of the " "mirrors." msgstr "" #: ../create-images-manually-example-centos-image.rst:19 msgid "" "Click the folder link of the CentOS version that you want to use. For " "example, ``7/``." msgstr "" #: ../create-images-manually-example-centos-image.rst:21 msgid "Click the ``isos/`` folder link." msgstr "" #: ../create-images-manually-example-centos-image.rst:22 msgid "Click the ``x86_64/`` folder link for 64-bit images." msgstr "" #: ../create-images-manually-example-centos-image.rst:23 msgid "" "Click the netinstall ISO image that you want to download. For example, " "``CentOS-7-x86_64-NetInstall-1611.iso`` is a good choice because it is a " "smaller image that downloads missing packages from the Internet during " "installation." msgstr "" #: ../create-images-manually-example-centos-image.rst:29 #: ../create-images-manually-example-fedora-image.rst:28 #: ../create-images-manually-example-ubuntu-image.rst:20 msgid "Start the installation process" msgstr "" #: ../create-images-manually-example-centos-image.rst:31 #: ../create-images-manually-example-fedora-image.rst:30 msgid "" "Start the installation process using either the :command:`virt-manager` or " "the :command:`virt-install` command as described previously. If you use the :" "command:`virt-install` command, do not forget to connect your VNC client to " "the virtual machine." msgstr "" #: ../create-images-manually-example-centos-image.rst:36 #: ../create-images-manually-example-fedora-image.rst:35 msgid "Assume that:" msgstr "" #: ../create-images-manually-example-centos-image.rst:38 msgid "" "The name of your virtual machine image is ``centos``; you need this name " "when you use :command:`virsh` commands to manipulate the state of the image." msgstr "" #: ../create-images-manually-example-centos-image.rst:41 msgid "You saved the netinstall ISO image to the ``/data/isos`` directory." msgstr "" #: ../create-images-manually-example-centos-image.rst:43 #: ../create-images-manually-example-fedora-image.rst:42 msgid "" "If you use the :command:`virt-install` command, the commands should look " "something like this:" msgstr "" #: ../create-images-manually-example-centos-image.rst:57 #: ../create-images-manually-example-fedora-image.rst:56 #: ../create-images-manually-example-ubuntu-image.rst:49 msgid "Step through the installation" msgstr "" #: ../create-images-manually-example-centos-image.rst:59 msgid "" "At the initial Installer boot menu, choose the :guilabel:`Install CentOS 7` " "option. After the installation program starts, choose your preferred " "language and click :guilabel:`Continue` to get to the installation summary. " "Accept the defaults." msgstr "" #: ../create-images-manually-example-centos-image.rst:68 msgid "Change the Ethernet status" msgstr "" #: ../create-images-manually-example-centos-image.rst:70 msgid "" "The default Ethernet setting is ``OFF``. Change the setting of the Ethernet " "form ``OFF`` to ``ON``. In particular, ensure that ``IPv4 Settings' Method`` " "is ``Automatic (DHCP)``, which is the default." msgstr "" #: ../create-images-manually-example-centos-image.rst:79 #: ../create-images-manually-example-fedora-image.rst:68 #: ../create-images-manually-example-ubuntu-image.rst:58 msgid "Hostname" msgstr "" #: ../create-images-manually-example-centos-image.rst:81 #: ../create-images-manually-example-fedora-image.rst:70 msgid "" "The installer allows you to choose a host name. The default (``localhost." "localdomain``) is fine. You install the ``cloud-init`` package later, which " "sets the host name on boot when a new instance is provisioned using this " "image." msgstr "" #: ../create-images-manually-example-centos-image.rst:88 msgid "Point the installer to a CentOS web server" msgstr "" #: ../create-images-manually-example-centos-image.rst:90 msgid "" "Depending on the version of CentOS, the net installer requires the user to " "specify either a URL or the web site and a CentOS directory that corresponds " "to one of the CentOS mirrors. If the installer asks for a single URL, a " "valid URL might be ``http://mirror.umd.edu/centos/7/os/x86_64``." msgstr "" #: ../create-images-manually-example-centos-image.rst:98 msgid "Consider using other mirrors as an alternative to ``mirror.umd.edu``." msgstr "" #: ../create-images-manually-example-centos-image.rst:103 msgid "" "If the installer asks for web site name and CentOS directory separately, you " "might enter:" msgstr "" #: ../create-images-manually-example-centos-image.rst:106 msgid "Web site name: ``mirror.umd.edu``" msgstr "" #: ../create-images-manually-example-centos-image.rst:107 msgid "CentOS directory: ``centos/7/os/x86_64``" msgstr "" #: ../create-images-manually-example-centos-image.rst:109 msgid "" "See `CentOS mirror page `_ to get " "a full list of mirrors, click on the ``HTTP`` link of a mirror to retrieve " "the web site name of a mirror." msgstr "" #: ../create-images-manually-example-centos-image.rst:114 msgid "Storage devices" msgstr "" #: ../create-images-manually-example-centos-image.rst:116 msgid "" "If prompted about which type of devices your installation uses, choose :" "guilabel:`Virtio Block Device`." msgstr "" #: ../create-images-manually-example-centos-image.rst:120 #: ../create-images-manually-example-fedora-image.rst:77 #: ../create-images-manually-example-ubuntu-image.rst:77 msgid "Partition the disks" msgstr "" #: ../create-images-manually-example-centos-image.rst:122 #: ../create-images-manually-example-fedora-image.rst:79 msgid "" "There are different options for partitioning the disks. The default " "installation uses LVM partitions, and creates three partitions (``/boot``, " "``/``, ``swap``), which works fine. Alternatively, you might want to create " "a single ext4 partition that is mounted to ``/``, which also works fine." msgstr "" #: ../create-images-manually-example-centos-image.rst:128 #: ../create-images-manually-example-fedora-image.rst:85 msgid "" "If unsure, use the default partition scheme for the installer. While no " "scheme is inherently better than another, having the partition that you want " "to dynamically grow at the end of the list will allow it to grow without " "crossing another partition's boundary." msgstr "" #: ../create-images-manually-example-centos-image.rst:135 msgid "Select installation option" msgstr "" #: ../create-images-manually-example-centos-image.rst:137 #: ../create-images-manually-example-fedora-image.rst:94 msgid "" "Step through the installation, using the default options. The simplest thing " "to do is to choose the ``Minimal Install`` install, which installs an SSH " "server." msgstr "" #: ../create-images-manually-example-centos-image.rst:142 #: ../create-images-manually-example-fedora-image.rst:99 msgid "Set the root password" msgstr "" #: ../create-images-manually-example-centos-image.rst:144 #: ../create-images-manually-example-fedora-image.rst:101 msgid "" "During the installation, remember to set the root password when prompted." msgstr "" #: ../create-images-manually-example-centos-image.rst:147 #: ../create-images-manually-example-fedora-image.rst:104 msgid "Detach the CD-ROM and reboot" msgstr "" #: ../create-images-manually-example-centos-image.rst:149 #: ../create-images-manually-example-fedora-image.rst:106 msgid "Wait until the installation is complete." msgstr "" #: ../create-images-manually-example-centos-image.rst:154 #: ../create-images-manually-example-fedora-image.rst:108 msgid "" "To eject a disk by using the :command:`virsh` command, libvirt requires that " "you attach an empty disk at the same target that the CD-ROM was previously " "attached, which may be ``hda``. You can confirm the appropriate target using " "the :command:`virsh dumpxml vm-image` command." msgstr "" #: ../create-images-manually-example-centos-image.rst:175 #: ../create-images-manually-example-fedora-image.rst:132 msgid "" "Run the following commands from the host to eject the disk and reboot using " "``virsh``, as root. If you are using ``virt-manager``, the commands below " "will work, but you can also use the GUI to detach and reboot it by manually " "stopping and starting." msgstr "" #: ../create-images-manually-example-centos-image.rst:186 #: ../create-images-manually-example-fedora-image.rst:143 msgid "Install the ACPI service" msgstr "" #: ../create-images-manually-example-centos-image.rst:188 #: ../create-images-manually-example-fedora-image.rst:145 msgid "" "To enable the hypervisor to reboot or shutdown an instance, you must install " "and run the ``acpid`` service on the guest system." msgstr "" #: ../create-images-manually-example-centos-image.rst:191 msgid "" "Log in as root to the CentOS guest and run the following commands to install " "the ACPI service and configure it to start when the system boots:" msgstr "" #: ../create-images-manually-example-centos-image.rst:201 msgid "Configure to fetch metadata" msgstr "" #: ../create-images-manually-example-centos-image.rst:203 msgid "" "An instance must interact with the metadata service to perform several tasks " "on start up. For example, the instance must get the ssh public key and run " "the user data script. To ensure that the instance performs these tasks, use " "one of these methods:" msgstr "" #: ../create-images-manually-example-centos-image.rst:208 msgid "" "Install a ``cloud-init`` RPM, which is a port of the Ubuntu `cloud-init " "`_ package. This is the recommended " "approach." msgstr "" #: ../create-images-manually-example-centos-image.rst:211 msgid "" "Modify the ``/etc/rc.local`` file to fetch desired information from the " "metadata service, as described in the next section." msgstr "" #: ../create-images-manually-example-centos-image.rst:215 #: ../openstack-images.rst:198 msgid "Use cloud-init to fetch the public key" msgstr "" #: ../create-images-manually-example-centos-image.rst:217 msgid "" "The ``cloud-init`` package automatically fetches the public key from the " "metadata server and places the key in an account. Install ``cloud-init`` " "inside the CentOS guest by running:" msgstr "" #: ../create-images-manually-example-centos-image.rst:226 msgid "" "The account varies by distribution. On CentOS-based virtual machines, the " "account is called ``centos``." msgstr "" #: ../create-images-manually-example-centos-image.rst:229 #: ../create-images-manually-example-fedora-image.rst:178 #: ../create-images-manually-example-ubuntu-image.rst:153 #: ../openstack-images.rst:207 msgid "" "You can change the name of the account used by ``cloud-init`` by editing the " "``/etc/cloud/cloud.cfg`` file and adding a line with a different user. For " "example, to configure ``cloud-init`` to put the key in an account named " "``admin``, use the following syntax in the configuration file:" msgstr "" #: ../create-images-manually-example-centos-image.rst:242 #: ../create-images-manually-example-fedora-image.rst:191 msgid "Install cloud-utils-growpart to allow partitions to resize" msgstr "" #: ../create-images-manually-example-centos-image.rst:244 #: ../create-images-manually-example-fedora-image.rst:193 msgid "" "In order for the root partition to properly resize, install the ``cloud-" "utils-growpart`` package, which contains the proper tools to allow the disk " "to resize using cloud-init." msgstr "" #: ../create-images-manually-example-centos-image.rst:253 msgid "Write a script to fetch the public key (if no cloud-init)" msgstr "" #: ../create-images-manually-example-centos-image.rst:255 msgid "" "If you are not able to install the ``cloud-init`` package in your image, to " "fetch the ssh public key and add it to the root account, edit the ``/etc/rc." "d/rc.local`` file and add the following lines before the line ``touch /var/" "lock/subsys/local``:" msgstr "" #: ../create-images-manually-example-centos-image.rst:289 msgid "" "Some VNC clients replace the colon (``:``) with a semicolon (``;``) and the " "underscore (``_``) with a hyphen (``-``). Make sure to specify ``http:`` and " "not ``http;``. Make sure to specify ``authorized_keys`` and not ``authorized-" "keys``." msgstr "" #: ../create-images-manually-example-centos-image.rst:296 msgid "" "The previous script only gets the ssh public key from the metadata server. " "It does not get user data, which is optional data that can be passed by the " "user when requesting a new instance. User data is often used to run a custom " "script when an instance boots." msgstr "" #: ../create-images-manually-example-centos-image.rst:301 msgid "" "As the OpenStack metadata service is compatible with version 2009-04-04 of " "the Amazon EC2 metadata service, consult the Amazon EC2 documentation on " "`Using Instance Metadata `_ for details on how to get " "user data." msgstr "" #: ../create-images-manually-example-centos-image.rst:308 #: ../create-images-manually-example-fedora-image.rst:202 msgid "Disable the zeroconf route" msgstr "" #: ../create-images-manually-example-centos-image.rst:310 #: ../create-images-manually-example-fedora-image.rst:204 msgid "" "For the instance to access the metadata service, you must disable the " "default zeroconf route:" msgstr "" #: ../create-images-manually-example-centos-image.rst:318 #: ../create-images-manually-example-fedora-image.rst:212 msgid "Configure console" msgstr "" #: ../create-images-manually-example-centos-image.rst:320 msgid "" "For the :command:`nova console-log` command to work properly on CentOS 7, " "you might need to do the following steps:" msgstr "" #: ../create-images-manually-example-centos-image.rst:323 msgid "" "Edit the ``/etc/default/grub`` file and configure the ``GRUB_CMDLINE_LINUX`` " "option. Delete the ``rhgb quiet`` and add ``console=tty0 console=" "ttyS0,115200n8`` to the option." msgstr "" #: ../create-images-manually-example-centos-image.rst:327 msgid "For example:" msgstr "" #: ../create-images-manually-example-centos-image.rst:334 #: ../create-images-manually-example-fedora-image.rst:227 msgid "Run the following command to save the changes:" msgstr "" #: ../create-images-manually-example-centos-image.rst:351 #: ../create-images-manually-example-fedora-image.rst:240 #: ../create-images-manually-example-ubuntu-image.rst:166 msgid "Shut down the instance" msgstr "" #: ../create-images-manually-example-centos-image.rst:353 #: ../create-images-manually-example-fedora-image.rst:242 msgid "From inside the instance, run as root:" msgstr "" #: ../create-images-manually-example-centos-image.rst:360 #: ../create-images-manually-example-fedora-image.rst:249 #: ../create-images-manually-example-ubuntu-image.rst:175 msgid "Clean up (remove MAC address details)" msgstr "" #: ../create-images-manually-example-centos-image.rst:362 #: ../create-images-manually-example-fedora-image.rst:251 msgid "" "The operating system records the MAC address of the virtual Ethernet card in " "locations such as ``/etc/sysconfig/network-scripts/ifcfg-eth0`` during the " "instance process. However, each time the image boots up, the virtual " "Ethernet card will have a different MAC address, so this information must be " "deleted from the configuration file." msgstr "" #: ../create-images-manually-example-centos-image.rst:368 #: ../create-images-manually-example-fedora-image.rst:257 #: ../create-images-manually-example-ubuntu-image.rst:183 msgid "" "There is a utility called :command:`virt-sysprep`, that performs various " "cleanup tasks such as removing the MAC address references. It will clean up " "a virtual machine image in place:" msgstr "" #: ../create-images-manually-example-centos-image.rst:377 #: ../create-images-manually-example-fedora-image.rst:266 #: ../create-images-manually-example-ubuntu-image.rst:192 msgid "Undefine the libvirt domain" msgstr "" #: ../create-images-manually-example-centos-image.rst:379 #: ../create-images-manually-example-fedora-image.rst:268 msgid "" "Now that you can upload the image to the Image service, you no longer need " "to have this virtual machine image managed by libvirt. Use the :command:" "`virsh undefine vm-image` command to inform libvirt:" msgstr "" #: ../create-images-manually-example-centos-image.rst:388 #: ../create-images-manually-example-fedora-image.rst:277 #: ../create-images-manually-example-ubuntu-image.rst:203 msgid "Image is complete" msgstr "" #: ../create-images-manually-example-centos-image.rst:390 msgid "" "The underlying image file that you created with the :command:`qemu-img " "create` command is ready to be uploaded. For example, you can upload the ``/" "tmp/centos.qcow2`` image to the Image service by using the :command:" "`openstack image create` command. For more information, see the `python-" "openstackclient command list `__." msgstr "" #: ../create-images-manually-example-fedora-image.rst:3 msgid "Example: Fedora image" msgstr "" #: ../create-images-manually-example-fedora-image.rst:5 msgid "" "This example shows you how to install a Fedora image and focuses mainly on " "Fedora 25. Because the Fedora installation process might differ across " "versions, the installation steps might differ if you use a different version " "of Fedora." msgstr "" #: ../create-images-manually-example-fedora-image.rst:13 msgid "Download a Fedora install ISO" msgstr "" #: ../create-images-manually-example-fedora-image.rst:15 msgid "Visit the `Fedora download site `_." msgstr "" #: ../create-images-manually-example-fedora-image.rst:17 msgid "" "Navigate to the `Download Fedora Server page `_ for a Fedora Server ISO image." msgstr "" #: ../create-images-manually-example-fedora-image.rst:21 msgid "Choose the ISO image you want to download." msgstr "" #: ../create-images-manually-example-fedora-image.rst:23 msgid "" "For example, the ``Netinstall Image`` is a good choice because it is a " "smaller image that downloads missing packages from the Internet during " "installation." msgstr "" #: ../create-images-manually-example-fedora-image.rst:37 msgid "" "The name of your virtual machine image is ``fedora``; you need this name " "when you use :command:`virsh` commands to manipulate the state of the image." msgstr "" #: ../create-images-manually-example-fedora-image.rst:40 msgid "You saved the netinstall ISO image to the ``/tmp`` directory." msgstr "" #: ../create-images-manually-example-fedora-image.rst:58 msgid "" "After the installation program starts, choose your preferred language and " "click :guilabel:`Continue` to get to the installation summary. Accept the " "defaults." msgstr "" #: ../create-images-manually-example-fedora-image.rst:62 msgid "Review the Ethernet status" msgstr "" #: ../create-images-manually-example-fedora-image.rst:64 msgid "" "Ensure that the Ethernet setting is ``ON``. Additionally, make sure that " "``IPv4 Settings' Method`` is ``Automatic (DHCP)``, which is the default." msgstr "" #: ../create-images-manually-example-fedora-image.rst:92 msgid "Select software to install" msgstr "" #: ../create-images-manually-example-fedora-image.rst:148 msgid "" "Log in as root to the Fedora guest and run the following commands to install " "the ACPI service and configure it to start when the system boots:" msgstr "" #: ../create-images-manually-example-fedora-image.rst:158 msgid "Configure cloud-init to fetch metadata" msgstr "" #: ../create-images-manually-example-fedora-image.rst:160 msgid "" "An instance must interact with the metadata service to perform several tasks " "on start up. For example, the instance must get the ssh public key and run " "the user data script. To ensure that the instance performs these tasks, use " "the ``cloud-init`` package." msgstr "" #: ../create-images-manually-example-fedora-image.rst:166 msgid "" "The ``cloud-init`` package automatically fetches the public key from the " "metadata server and places the key in an account. Install ``cloud-init`` " "inside the Fedora guest by running:" msgstr "" #: ../create-images-manually-example-fedora-image.rst:175 msgid "" "The account varies by distribution. On Fedora-based virtual machines, the " "account is called ``fedora``." msgstr "" #: ../create-images-manually-example-fedora-image.rst:214 msgid "" "For the :command:`nova console-log` command to work properly on Fedora, you " "might need to do the following steps:" msgstr "" #: ../create-images-manually-example-fedora-image.rst:217 msgid "" "Edit the ``/etc/default/grub`` file and configure the ``GRUB_CMDLINE_LINUX`` " "option. Delete the ``rhgb quiet`` and add ``console=tty0 console=" "ttyS0,115200n8`` to the option. For example:" msgstr "" #: ../create-images-manually-example-fedora-image.rst:279 msgid "" "The underlying image file that you created with the :command:`qemu-img " "create` command is ready to be uploaded. For example, you can upload the ``/" "tmp/fedora.qcow2`` image to the Image service by using the :command:" "`openstack image create` command. For more information, see the `python-" "openstackclient command list `__." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:3 msgid "Example: FreeBSD image" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:5 msgid "" "This example creates a minimal FreeBSD image that is compatible with " "OpenStack and ``bsd-cloudinit``. The ``bsd-cloudinit`` program is " "independently maintained and in active development. The best source of " "information on the current state of the project is at `bsd-cloudinit `_." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:12 msgid "" "KVM with virtio drivers is used as the virtualization platform because that " "is the most widely used among OpenStack operators. If you use a different " "platform for your cloud virtualization, use that same platform in the image " "creation step." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:17 msgid "" "This example shows how to create a FreeBSD 10 image. To create a FreeBSD 9.2 " "image, follow these steps with the noted differences." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:23 #: ../create-images-manually-example-windows-image.rst:11 #: ../create-images-manually-tools-libvirt.rst:8 msgid "Prerequisites" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:25 msgid "Make a virtual drive:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:31 msgid "" "The minimum supported disk size for FreeBSD is 1 GB. Because the goal is to " "make the smallest possible base image, the example uses that minimum size. " "This size is sufficient to include the optional ``doc``, ``games``, and " "``lib32`` collections. To include the ``ports`` collection, add another 1 GB." " To include ``src``, add 512 MB." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:38 msgid "Get the installer ISO:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:45 msgid "" "Launch a VM on your local workstation. Use the same hypervisor, virtual " "disk, and virtual network drivers as you use in your production environment." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:49 msgid "The following command uses the minimum amount of RAM, which is 256 MB:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:57 msgid "" "You can specify up to 1 GB additional RAM to make the installation process " "run faster." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:60 msgid "This VM must also have Internet access to download packages." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:64 msgid "" "By using the same hypervisor, you can ensure that you emulate the same " "devices that exist in production. However, if you use full hardware " "virtualization instead of paravirtualization, you do not need to use the " "same hypervisor; you must use the same type of virtualized hardware because " "FreeBSD device names are related to their drivers. If the name of your root " "block device or primary network interface in production differs than the " "names used during image creation, errors can occur." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:74 msgid "" "You now have a VM that boots from the downloaded install ISO and is " "connected to the blank virtual disk that you created previously." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:78 #: ../create-images-manually-example-windows-image.rst:28 msgid "Installation" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:80 msgid "" "To install the operating system, complete the following steps inside the VM:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:83 msgid "When prompted, choose to run the ISO in :guilabel:`Install` mode." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:85 msgid "" "Accept the default keymap or select an appropriate mapping for your needs." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:88 msgid "" "Provide a host name for your image. If you use ``bsd-cloudinit``, it " "overrides this value with the name provided by OpenStack when an instance " "boots from this image." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:92 msgid "" "When prompted about the optional ``doc``, ``games``, ``lib32``, ``ports``, " "and ``src`` system components, select only those that you need. It is " "possible to have a fully functional installation without selecting " "additional components selected. As noted previously, a minimal system with a " "1 GB virtual disk supports ``doc``, ``games``, and ``lib32`` inclusive. The " "``ports`` collection requires at least 1 GB additional space and possibly " "more if you plan to install many ports. The ``src`` collection requires an " "additional 512 MB." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:103 msgid "" "Configure the primary network interface to use DHCP. In this example, which " "uses a virtio network device, this interface is named ``vtnet0``." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:107 msgid "Accept the default network mirror." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:109 msgid "Set up disk partitioning." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:111 msgid "" "Disk partitioning is a critical element of the image creation process and " "the auto-generated default partitioning scheme does not work with ``bsd-" "cloudinit`` at this time." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:115 msgid "" "Because the default does not work, you must select manual partitioning. The " "partition editor should list only one block device. If you use virtio for " "the disk device driver, it is named ``vtbd0``. Select this device and run " "the :command:`create` command three times:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:121 msgid "" "Select :guilabel:`Create` to create a partition table. This action is the " "default when no partition table exists. Then, select :guilabel:`GPT GUID " "Partition Table` from the list. This choice is the default." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:126 msgid "Create two partitions:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:128 msgid "" "First partition: A 64 kB ``freebsd-boot`` partition with no mount point." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:130 msgid "" "Second partition: A ``freebsd-ufs`` partition with a mount point of ``/`` " "with all remaining free space." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:133 msgid "" "The following figure shows a completed partition table with a 1 GB virtual " "disk:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:139 msgid "" "Select :guilabel:`Finish` and then :guilabel:`Commit` to commit your changes." "" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:144 msgid "" "If you modify this example, the root partition, which is mounted on ``/``, " "must be the last partition on the drive so that it can expand at run time to " "the disk size that your instance type provides. Also note that ``bsd-" "cloudinit`` currently has a hard-coded assumption that this is the second " "partition." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:151 msgid "Select a root password." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:153 msgid "Select the CMOS time zone." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:155 msgid "" "The virtualized CMOS almost always stores its time in UTC, so unless you " "know otherwise, select UTC." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:158 msgid "Select the time zone appropriate to your environment." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:160 msgid "" "From the list of services to start on boot, you must select :guilabel:`ssh`. " "Optionally, select other services." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:163 msgid "Optionally, add users." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:165 msgid "" "You do not need to add users at this time. The ``bsd-cloudinit`` program " "adds a ``freebsd`` user account if one does not exist. The ``ssh`` keys for " "this user are associated with OpenStack. To customize this user account, you " "can create it now. For example, you might want to customize the shell for " "the user." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:172 msgid "Final config" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:174 msgid "" "This menu enables you to update previous settings. Check that the settings " "are correct, and click :guilabel:`exit`." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:177 msgid "" "After you exit, you can open a shell to complete manual configuration steps. " "Select :guilabel:`Yes` to make a few OpenStack-specific changes:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:181 msgid "Set up the console:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:187 msgid "" "This sets console output to go to the serial console, which is displayed by :" "command:`nova consolelog`, and the video console for sites with VNC or Spice " "configured." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:191 msgid "Minimize boot delay:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:197 msgid "" "Download the latest ``bsd-cloudinit-installer``. The download commands " "differ between FreeBSD 10.1 and 9.2 because of differences in how the :" "command:`fetch` command handles HTTPS URLs." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:202 msgid "" "In FreeBSD 10.1 the :command:`fetch` command verifies SSL peers by default, " "so you need to install the ``ca_root_nss`` package that contains certificate " "authority root certificates and tell :command:`fetch` where to find them. " "For FreeBSD 10.1 run these commands:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:214 msgid "" "FreeBSD 9.2 :command:`fetch` does not support peer-verification for https. " "For FreeBSD 9.2, run this command:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:221 msgid "Run the installer:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:227 msgid "" "Issue this command to download and install the latest ``bsd-cloudinit`` " "package, and install the necessary prerequisites." msgstr "" #: ../create-images-manually-example-freebsd-image.rst:230 msgid "" "Install ``sudo`` and configure the ``freebsd`` user to have passwordless " "access:" msgstr "" #: ../create-images-manually-example-freebsd-image.rst:238 msgid "Power off the system:" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:3 msgid "Example: Ubuntu image" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:5 msgid "" "This example installs an Ubuntu 18.04 (Bionic Beaver) image. To create an " "image for a different version of Ubuntu, follow these steps with the noted " "differences." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:12 msgid "Download an Ubuntu installation ISO" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:14 msgid "" "Because the goal is to make the smallest possible base image, this example " "uses the network installation ISO. The Ubuntu 64-bit 18.04 network " "installation ISO is at the `Ubuntu download page `_." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:22 msgid "" "Start the installation process by using either :command:`virt-manager` or :" "command:`virt-install` as described in the previous section. If you use :" "command:`virt-install`, do not forget to connect your VNC client to the " "virtual machine." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:27 msgid "" "Assume that the name of your virtual machine image is ``ubuntu-18.04``, " "which you need to know when you use :command:`virsh` commands to manipulate " "the state of the image." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:31 msgid "" "If you are using :command:`virt-manager`, the commands should look something " "like this:" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:51 msgid "" "At the initial Installer boot menu, choose the :guilabel:`Install` option. " "Step through the installation prompts, the defaults should be fine." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:60 msgid "" "The installer may ask you to choose a host name. The default (``ubuntu``) is " "fine. We will install the cloud-init package later, which will set the host " "name on boot when a new instance is provisioned using this image." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:66 msgid "Select a mirror" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:68 msgid "The default mirror proposed by the installer should be fine." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:71 msgid "Step through the install" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:73 msgid "" "Step through the install, using the default options. When prompted for a " "user name, the default (``ubuntu``) is fine." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:79 msgid "" "There are different options for partitioning the disks. The default " "installation will use LVM partitions, and will create three partitions (``/" "boot``, ``/``, swap), and this will work fine. Alternatively, you may wish " "to create a single ext4 partition, mounted to \"``/``\", should also work " "fine." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:85 msgid "" "If unsure, we recommend you use the installer's default partition scheme, " "since there is no clear advantage to one scheme or another." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:89 msgid "Automatic updates" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:91 msgid "" "The Ubuntu installer will ask how you want to manage upgrades on your system." " This option depends on your specific use case. If your virtual machine " "instances will be connected to the Internet, we recommend \"Install security " "updates automatically\"." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:97 msgid "Software selection: OpenSSH server" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:99 msgid "" "Choose :guilabel:`OpenSSH server` so that you will be able to SSH into the " "virtual machine when it launches inside of an OpenStack cloud." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:105 msgid "Install GRUB boot loader" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:107 msgid "" "Select :guilabel:`Yes` when asked about installing the GRUB boot loader to " "the master boot record." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:113 msgid "" "For more information on configuring Grub, see the section called \":ref:" "`write-to-console`\"." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:117 msgid "Log in to newly created image" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:119 msgid "" "When you boot for the first time after install, it may ask you about " "authentication tools, you can just choose :guilabel:`Exit`. Then, log in as " "admin user using the password you specified." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:124 msgid "Install cloud-init" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:126 msgid "" "The :command:`cloud-init` script starts on instance boot and will search for " "a metadata provider to fetch a public key from. The public key will be " "placed in the default user account for the image." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:130 msgid "Install the ``cloud-init`` package:" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:136 msgid "" "When building Ubuntu images :command:`cloud-init` must be explicitly " "configured for the metadata source in use. The OpenStack metadata server " "emulates the EC2 metadata service used by images in Amazon EC2." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:141 msgid "" "To set the metadata source to be used by the image run the :command:`dpkg-" "reconfigure` command against the ``cloud-init`` package. When prompted " "select the :guilabel:`EC2` data source:" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:149 msgid "" "The account varies by distribution. On Ubuntu-based virtual machines, the " "account is called ``ubuntu``. On Fedora-based virtual machines, the account " "is called ``ec2-user``." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:168 msgid "From inside the instance, as root:" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:177 msgid "" "The operating system records the MAC address of the virtual Ethernet card in " "locations such as ``/etc/udev/rules.d/70-persistent-net.rules`` during the " "installation process. However, each time the image boots up, the virtual " "Ethernet card will have a different MAC address, so this information must be " "deleted from the configuration file." msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:194 msgid "" "Now that the image is ready to be uploaded to the Image service, you no " "longer need to have this virtual machine image managed by libvirt. Use the :" "command:`virsh undefine vm-image` command to inform libvirt:" msgstr "" #: ../create-images-manually-example-ubuntu-image.rst:205 msgid "" "The underlying image file that you created with the :command:`qemu-img " "create` command, such as ``/var/lib/libvirt/images/bionic.qcow2``, is now " "ready for uploading to the Image service by using the :command:`openstack " "image create` command. For more information, see the `Glance User Guide " "`__." msgstr "" #: ../create-images-manually-example-windows-image.rst:3 msgid "Example: Microsoft Windows image" msgstr "" #: ../create-images-manually-example-windows-image.rst:7 msgid "" "This example creates a Windows Server 2012 qcow2 image, using the :command:" "`virt-install` command and the KVM hypervisor." msgstr "" #: ../create-images-manually-example-windows-image.rst:13 msgid "Follow these steps to prepare the installation:" msgstr "" #: ../create-images-manually-example-windows-image.rst:15 msgid "" "Download a Windows Server 2012 installation ISO. Evaluation images are " "available on the `Microsoft website `_ (registration required)." msgstr "" #: ../create-images-manually-example-windows-image.rst:19 msgid "" "Download the signed VirtIO drivers ISO from the `Fedora website `_." msgstr "" #: ../create-images-manually-example-windows-image.rst:21 msgid "Create a 15 GB qcow2 image:" msgstr "" #: ../create-images-manually-example-windows-image.rst:30 msgid "" "Start the Windows Server 2012 installation with the :command:`virt-install` " "command:" msgstr "" #: ../create-images-manually-example-windows-image.rst:44 msgid "" "Use :command:`virt-manager` or :command:`virt-viewer` to connect to the VM " "and start the Windows installation." msgstr "" #: ../create-images-manually-example-windows-image.rst:47 msgid "" "Enable the VirtIO drivers. By default, the Windows installer does not detect " "the disk." msgstr "" #: ../create-images-manually-example-windows-image.rst:50 msgid "" "Load VirtIO SCSI drivers and network drivers by choosing an installation " "target when prompted. Click :guilabel:`Load driver` and browse the file " "system." msgstr "" #: ../create-images-manually-example-windows-image.rst:54 msgid "" "Select the ``E:\\virtio-win-0.1XX\\viostor\\2k12\\amd64`` folder. The " "Windows installer displays a list of drivers to install." msgstr "" #: ../create-images-manually-example-windows-image.rst:57 msgid "Select the VirtIO SCSI drivers." msgstr "" #: ../create-images-manually-example-windows-image.rst:59 msgid "" "Click :guilabel:`Load driver` and browse the file system, and select the ``E:" "\\NETKVM\\2k12\\amd64`` folder." msgstr "" #: ../create-images-manually-example-windows-image.rst:62 msgid "" "Select the network drivers, and continue the installation. Once the " "installation is completed, the VM restarts." msgstr "" #: ../create-images-manually-example-windows-image.rst:65 msgid "Define a password for the administrator when prompted." msgstr "" #: ../create-images-manually-example-windows-image.rst:67 msgid "Log in as administrator and start a command window." msgstr "" #: ../create-images-manually-example-windows-image.rst:69 msgid "" "Complete the VirtIO drivers installation by running the following command:" msgstr "" #: ../create-images-manually-example-windows-image.rst:76 msgid "" "To allow the :term:`Cloudbase-Init` to run scripts during an instance boot, " "set the PowerShell execution policy to be unrestricted:" msgstr "" #: ../create-images-manually-example-windows-image.rst:84 msgid "Download and install the ``Cloudbase-Init``:" msgstr "" #: ../create-images-manually-example-windows-image.rst:91 msgid "" "In the :guilabel:`configuration options` window, change the following " "settings:" msgstr "" #: ../create-images-manually-example-windows-image.rst:94 msgid "Username: ``Administrator``" msgstr "" #: ../create-images-manually-example-windows-image.rst:95 msgid "Network adapter to configure: ``Red Hat VirtIO Ethernet Adapter``" msgstr "" #: ../create-images-manually-example-windows-image.rst:96 msgid "Serial port for logging: ``COM1``" msgstr "" #: ../create-images-manually-example-windows-image.rst:98 msgid "" "When the installation is done, in the :guilabel:`Complete the Cloudbase-Init " "Setup Wizard` window, select the :guilabel:`Run Sysprep` and :guilabel:" "`Shutdown` check boxes and click :guilabel:`Finish`." msgstr "" #: ../create-images-manually-example-windows-image.rst:103 msgid "Wait for the machine shutdown." msgstr "" #: ../create-images-manually-example-windows-image.rst:106 msgid "Image ready" msgstr "" #: ../create-images-manually-example-windows-image.rst:108 msgid "Your image is ready to upload to the Image service:" msgstr "" #: ../create-images-manually-tools-libvirt.rst:3 msgid "Tools: libvirt and virsh/virt-manager" msgstr "" #: ../create-images-manually-tools-libvirt.rst:11 msgid "Verify the libvirt default network is running" msgstr "" #: ../create-images-manually-tools-libvirt.rst:13 msgid "" "Before starting a virtual machine with libvirt, verify that the libvirt " "``default`` network has started. This network must be active for your " "virtual machine to be able to connect out to the network. Starting this " "network will create a Linux bridge (usually called ``virbr0``), iptables " "rules, and a dnsmasq process that will serve as a DHCP server." msgstr "" #: ../create-images-manually-tools-libvirt.rst:21 msgid "" "To verify that the libvirt ``default`` network is enabled, use the :command:" "`virsh net-list` command and verify that the ``default`` network is active:" msgstr "" #: ../create-images-manually-tools-libvirt.rst:32 msgid "If the network is not active, start it by doing:" msgstr "" #: ../create-images-manually-tools-libvirt.rst:39 msgid "Use the virt-manager X11 GUI" msgstr "" #: ../create-images-manually-tools-libvirt.rst:41 msgid "" "If you plan to create a virtual machine image on a machine that can run X11 " "applications, the simplest way to do so is to use the :command:`virt-" "manager` GUI, which is installable as the ``virt-manager`` package on both " "Fedora-based and Debian-based systems. This GUI has an embedded VNC client " "that will let you view and interact with the guest's graphical console." msgstr "" #: ../create-images-manually-tools-libvirt.rst:48 msgid "" "If you are building the image on a headless server, and you have an X server " "on your local machine, you can launch :command:`virt-manager` using ssh X11 " "forwarding to access the GUI. Since virt-manager interacts directly with " "libvirt, you typically need to be root to access it. If you can ssh directly " "in as root (or with a user that has permissions to interact with libvirt), " "do:" msgstr "" #: ../create-images-manually-tools-libvirt.rst:59 msgid "" "If the account you use to ssh into your server does not have permissions to " "run libvirt, but has sudo privileges, do:" msgstr "" #: ../create-images-manually-tools-libvirt.rst:69 msgid "" "The ``-X`` flag passed to ssh will enable X11 forwarding over ssh. If this " "does not work, try replacing it with the ``-Y`` flag." msgstr "" #: ../create-images-manually-tools-libvirt.rst:72 msgid "" "Click the :guilabel:`Create a new virtual machine` button at the top-left, " "or go to :menuselection:`File --> New Virtual Machine`. Then, follow the " "instructions." msgstr "" #: ../create-images-manually-tools-libvirt.rst:79 msgid "" "You will be shown a series of dialog boxes that will allow you to specify " "information about the virtual machine." msgstr "" #: ../create-images-manually-tools-libvirt.rst:84 msgid "" "When using qcow2 format images, you should check the option ``Customize " "configuration before install``, go to disk properties and explicitly select " "the :guilabel:`qcow2` format. This ensures the virtual machine disk size " "will be correct." msgstr "" #: ../create-images-manually-tools-libvirt.rst:90 msgid "Use virt-install and connect by using a local VNC client" msgstr "" #: ../create-images-manually-tools-libvirt.rst:92 msgid "" "If you do not wish to use :command:`virt-manager` (for example, you do not " "want to install the dependencies on your server, you do not have an X server " "running locally, the X11 forwarding over SSH is not working), you can use " "the :command:`virt-install` tool to boot the virtual machine through libvirt " "and connect to the graphical console from a VNC client installed on your " "local machine." msgstr "" #: ../create-images-manually-tools-libvirt.rst:99 msgid "" "Because VNC is a standard protocol, there are multiple clients available " "that implement the VNC spec, including `TigerVNC `_ " "(multiple platforms), `TightVNC `_ (multiple " "platforms), `RealVNC `_ (multiple platforms), `Chicken " "`_ (Mac OS X), `Krde `_ (KDE), `Vinagre `_ (GNOME)." msgstr "" #: ../create-images-manually-tools-libvirt.rst:108 msgid "" "The following example shows how to use the :command:`qemu-img` command to " "create an empty image file, and :command:`virt-install` command to start up " "a virtual machine using that image file. As root:" msgstr "" #: ../create-images-manually-tools-libvirt.rst:127 msgid "" "The KVM hypervisor starts the virtual machine with the libvirt name, " "``centos``, with 1024 MB of RAM. The virtual machine also has a virtual CD-" "ROM drive associated with the ``/data/isos/CentOS-7-x86_64-NetInstall-1611." "iso`` file and a local 10 GB hard disk in qcow2 format that is stored in the " "host at ``/tmp/centos.qcow2``. It configures networking to use libvirt " "default network. There is a VNC server that is listening on all interfaces, " "and libvirt will not attempt to launch a VNC client automatically nor try to " "display the text console (``--no-autoconsole``). Finally, libvirt will " "attempt to optimize the configuration for a Linux guest running a CentOS 7 " "distribution." msgstr "" #: ../create-images-manually-tools-libvirt.rst:142 msgid "" "When using the libvirt ``default`` network, libvirt will connect the virtual " "machine's interface to a bridge called ``virbr0``. There is a dnsmasq " "process managed by libvirt that will hand out an IP address on the 192.168." "122.0/24 subnet, and libvirt has iptables rules for doing NAT for IP " "addresses on this subnet." msgstr "" #: ../create-images-manually-tools-libvirt.rst:149 msgid "" "Run the :command:`osinfo-query os` command to see a range of allowed ``--os-" "variant`` options." msgstr "" #: ../create-images-manually-tools-libvirt.rst:152 msgid "" "Use the :command:`virsh vncdisplay vm-name` command to get the VNC port " "number." msgstr "" #: ../create-images-manually-tools-libvirt.rst:160 msgid "" "In the example above, the guest ``centos`` uses VNC display ``:1``, which " "corresponds to TCP port ``5901``. You should be able to connect a VNC client " "running on your local machine to display ``:1`` on the remote machine and " "step through the installation process." msgstr "" #: ../create-images-manually.rst:3 msgid "Create images manually" msgstr "" #: ../create-images-manually.rst:5 msgid "" "Creating a new image is a step done outside of your OpenStack installation. " "You create the new image manually on your own system and then upload the " "image to your cloud." msgstr "" #: ../create-images-manually.rst:9 msgid "" "To create a new image, you will need the installation CD or DVD ISO file for " "the guest operating system. You will also need access to a virtualization " "tool. You can use KVM for this. Or, if you have a GUI desktop virtualization " "tool (such as, VMware Fusion or VirtualBox), you can use that instead. " "Convert the file to raw once you are done." msgstr "" #: ../create-images-manually.rst:16 msgid "" "When you create a new virtual machine image, you will need to connect to the " "graphical console of the hypervisor, which acts as the virtual machine's " "display and allows you to interact with the guest operating system's " "installer using your keyboard and mouse. KVM can expose the graphical " "console using the `VNC `_ (Virtual Network Computing) protocol or the " "newer `SPICE `_ protocol. We will use the VNC " "protocol here, since you are more likely to find a VNC client that works on " "your local desktop." msgstr "" #: ../create-images-manually.rst:27 msgid "" "To create an image for the Database service, see `Building Guest Images for " "OpenStack Trove `_." msgstr "" #: ../create-images-manually.rst:32 msgid "Tools" msgstr "" #: ../create-images-manually.rst:40 msgid "Examples" msgstr "" #: ../index.rst:3 msgid "OpenStack Virtual Machine Image Guide" msgstr "" #: ../index.rst:6 msgid "Abstract" msgstr "" #: ../index.rst:8 msgid "" "This guide describes how to obtain, create, and modify virtual machine " "images that are compatible with OpenStack." msgstr "" #: ../introduction.rst:3 msgid "Introduction" msgstr "" #: ../introduction.rst:5 msgid "" "An OpenStack Compute cloud is not very useful unless you have virtual " "machine images (which some people call \"virtual appliances\"). This guide " "describes how to obtain, create, and modify virtual machine images that are " "compatible with OpenStack." msgstr "" #: ../introduction.rst:10 msgid "" "To keep things brief, we will sometimes use the term ``image`` instead of " "virtual machine image." msgstr "" #: ../introduction.rst:13 msgid "**What is a virtual machine image?**" msgstr "" #: ../introduction.rst:15 msgid "" "A virtual machine image is a single file which contains a virtual disk that " "has a bootable operating system installed on it." msgstr "" #: ../introduction.rst:19 msgid "Disk and container formats for images" msgstr "" #: ../introduction.rst:21 msgid "" "Virtual machine images come in different *formats*. A format describes the " "way the bits making up a file are arranged on the storage medium. Knowledge " "of a format is required in order for a consumer to interpret the content of " "the file correctly (rather than to simply view it as a bunch of bits)." msgstr "" #: ../introduction.rst:26 msgid "" "When considering a stored virtual machine image, there are two types of " "format that can come into play." msgstr "" #: ../introduction.rst:30 msgid "" "The stored file may be a *container* that contains the virtual disk. For " "example, the virtual disk may be contained in a ``tar`` file which must be " "opened before the disk can be retrieved. It's possible, however, that the " "virtual disk is not contained in a file, but is just stored as-is by the " "Image Service." msgstr "" #: ../introduction.rst:34 msgid "container format" msgstr "" #: ../introduction.rst:37 msgid "" "The virtual disk itself has its bits arranged in some format. A consuming " "service must know what this format is before it can effectively use the " "virtual disk." msgstr "" #: ../introduction.rst:39 msgid "disk format" msgstr "" #: ../introduction.rst:42 msgid "Image metadata" msgstr "" #: ../introduction.rst:44 msgid "" "Image metadata (also known as \"image properties\") provide information " "about the virtual disk stored by the Image service. The metadata is stored " "as part of the image record associated with the image data by the Image " "service. Image metadata can help end users determine the nature of an " "image, and is used by associated OpenStack components and drivers which " "interface with the Image service." msgstr "" #: ../introduction.rst:51 msgid "" "So that image consumers can easily identify the container and disk format of " "images, the image service has set aside particular metadata keys for these. " "Not surprisingly, these are named ``container_format`` and ``disk_format``. " "The legal values for each of these are specified in the Image service's " "Image schema, which you can obtain in any OpenStack installation by making " "the following API call::" msgstr "" #: ../introduction.rst:60 msgid "" "The supported formats may vary across OpenStack clouds. The formats " "accepted by a particular cloud will be specified in that cloud's get-schema " "response to the Images API." msgstr "" #: ../introduction.rst:66 msgid "" "The image schema lists the legal identifiers for container and disk formats. " "To understand what these identifiers refer to, consult the `Disk and " "Container Formats `_ section of the Glance User Guide." msgstr "" #: ../introduction.rst:72 msgid "" "Image metadata can also determine the scheduling of hosts. If specific " "metadata are set on an image (possible metadata are architecture, hypervisor " "type, and virtual machine mode), and Compute is configured so that the " "``ImagePropertiesFilter`` scheduler filter is enabled (default), then the " "scheduler only considers compute hosts that satisfy the specified properties." "" msgstr "" #: ../introduction.rst:80 msgid "" "Compute's ``ImagePropertiesFilter`` value is specified in the " "``enabled_filters`` value in the ``[filter_scheduler]`` section of the ``/" "etc/nova/nova.conf`` file." msgstr "" #: ../introduction.rst:84 msgid "" "Other Compute scheduler filters may also be affected by image metadata. For " "a complete list of valid property keys and values, refer to the `Useful " "image properties `_ section of the Glance Administration Guide." msgstr "" #: ../introduction.rst:91 msgid "Adding metadata to an image" msgstr "" #: ../introduction.rst:93 msgid "" "You can add metadata to Image service images by using the ``--property key=" "value`` parameter with the :command:`openstack image create` or :command:" "`openstack image set` command. More than one property can be specified. For " "example:" msgstr "" #: ../introduction.rst:103 msgid "" "Common image properties are also specified in the ``/etc/glance/schema-image." "json`` file. Other useful property keys and values, are listed in the " "`Useful image properties `_ section of the Glance Administration Guide." msgstr "" #: ../introduction.rst:110 msgid "" "All associated properties for an image can be displayed using the :command:" "`openstack image show` command. For example:" msgstr "" #: ../introduction.rst:142 msgid "**Volume-from-Image properties**" msgstr "" #: ../introduction.rst:144 msgid "" "When creating Block Storage volumes from images, also consider your " "configured image properties. If you alter the core image properties, you " "should also update your Block Storage configuration. Amend " "``glance_core_properties`` in the ``/etc/cinder/cinder.conf`` file on all " "controller nodes to match the core properties you have set in the Image " "service." msgstr "" #: ../introduction.rst:152 msgid "Metadata definition (metadefs) service" msgstr "" #: ../introduction.rst:154 msgid "" "Images are not the only OpenStack resource that can have metadata associated " "with them. Many other resources (for example, volumes) support setting " "metadata on the resources. As with images, the metadata may be consumed by " "humans to understand something about the resource, or may be used by other " "OpenStack services so that they can make efficient use of the resource (for " "example, the nova filter scheduler using the image ``architecture`` property " "to determine an appropriate host on which to build an instance from that " "image). Thus it is important that there be a discoverable way for people and " "services to determine what metadata properties and values are available " "throughout an OpenStack cloud." msgstr "" #: ../introduction.rst:165 msgid "" "To facilitate this, Glance (the OpenStack Image service) hosts a metadata " "definition service, which is also known as the *OpenStack metadefs catalog*." msgstr "" #: ../introduction.rst:168 msgid "With this service you can define:" msgstr "" #: ../introduction.rst:171 msgid "Contains metadata definitions." msgstr "" #: ../introduction.rst:173 msgid "" "Specifies the access controls for everything defined in the namespace. These " "access controls determine who can define and use the definitions in the " "namespace." msgstr "" #: ../introduction.rst:177 msgid "Associates the definitions with different types of resources." msgstr "" #: ../introduction.rst:177 msgid "Namespace" msgstr "" #: ../introduction.rst:180 msgid "" "A single property and its primitive constraints. Each property can only be a " "primitive type. For example, string, integer, number, boolean, or array." msgstr "" #: ../introduction.rst:181 msgid "Property" msgstr "" #: ../introduction.rst:184 msgid "" "Describes a group of one to many properties and their primitive constraints. " "Each property in the group can only be a primitive type. For example, " "string, integer, number, boolean, or array." msgstr "" #: ../introduction.rst:188 msgid "" "The object may optionally define required properties under the semantic " "understanding that if you use the object, you should provide all required " "properties." msgstr "" #: ../introduction.rst:190 msgid "Object" msgstr "" #: ../introduction.rst:193 msgid "" "Specifies the relationship between resource types and the namespaces that " "are applicable to them. This information can be used to drive UI and CLI " "views. For example, the same namespace of objects, properties, and tags may " "be used for images, snapshots, volumes, and flavors. Or a namespace may only " "apply to images." msgstr "" #: ../introduction.rst:197 msgid "Resource type association" msgstr "" #: ../introduction.rst:199 msgid "" "The Image service has predefined namespaces for the metadata definitions " "catalog. To load files from this directory into the database:" msgstr "" #: ../introduction.rst:206 msgid "To unload the files from the database:" msgstr "" #: ../introduction.rst:212 msgid "To export the definitions in JSON format:" msgstr "" #: ../introduction.rst:220 msgid "" "By default, files are loaded from and exported to the Image service's ``/etc/" "glance/metadefs`` directory." msgstr "" #: ../introduction.rst:223 msgid "" "There is no special relationship between the Image service and the Metadefs " "service. If you want to apply the keys and values defined in the Metadefs " "service to images, you must use the Image service API or client tools just " "as you would for any other OpenStack service." msgstr "" #: ../introduction.rst:228 msgid "For more information about the OpenStack Metadefs catalog, see:" msgstr "" #: ../introduction.rst:230 msgid "" "`Using Glance’s Metadata Definitions Catalog Public APIs `_ in the " "Glance User Guide" msgstr "" #: ../introduction.rst:233 msgid "" "The `Metadata Definitions Service API Reference `_" msgstr "" #: ../modify-images.rst:3 msgid "Modify images" msgstr "" #: ../modify-images.rst:5 msgid "" "Once you have obtained a virtual machine image, you may want to make some " "changes to it before uploading it to the Image service. Here we describe " "several tools available that allow you to modify images." msgstr "" #: ../modify-images.rst:11 msgid "" "Do not attempt to use these tools to modify an image that is attached to a " "running virtual machine. These tools are designed only to modify the images " "that are not currently running." msgstr "" #: ../modify-images.rst:17 msgid "guestfish" msgstr "" #: ../modify-images.rst:19 msgid "" "The ``guestfish`` program is a tool from the `libguestfs `_ project that allows you to modify the files inside of a virtual " "machine image." msgstr "" #: ../modify-images.rst:25 msgid "" "``guestfish`` does not mount the image directly into the local file system. " "Instead, it provides you with a shell interface that enables you to view, " "edit, and delete files. Many of :command:`guestfish` commands, such as :" "command:`touch`, :command:`chmod`, and :command:`rm`, resemble traditional " "bash commands." msgstr "" #: ../modify-images.rst:32 msgid "Example guestfish session" msgstr "" #: ../modify-images.rst:34 msgid "" "Sometimes you must modify a virtual machine image to remove any traces of " "the MAC address that was assigned to the virtual network interface card when " "the image was first created. This is because the MAC address is different " "when the virtual machine images boots. This example shows how to use the " "``guestfish`` to remove references to the old MAC address by deleting the ``/" "etc/udev/rules.d/70-persistent-net.rules`` file and removing the ``HWADDR`` " "line from the ``/etc/sysconfig/network-scripts/ifcfg-eth0`` file." msgstr "" #: ../modify-images.rst:45 msgid "" "Assume that you have a CentOS qcow2 image called ``centos63_desktop.img``. " "Mount the image in read-write mode as root, as follows:" msgstr "" #: ../modify-images.rst:61 msgid "This starts a guestfish session." msgstr "" #: ../modify-images.rst:65 msgid "the guestfish prompt looks like a fish: ``>``." msgstr "" #: ../modify-images.rst:67 msgid "" "We must first use the :command:`run` command at the guestfish prompt before " "we can do anything else. This will launch a virtual machine, which will be " "used to perform all of the file manipulations." msgstr "" #: ../modify-images.rst:76 msgid "" "We can now view the file systems in the image using the :command:`list-" "filesystems` command:" msgstr "" #: ../modify-images.rst:86 msgid "We need to mount the logical volume that contains the root partition:" msgstr "" #: ../modify-images.rst:92 msgid "" "Next, we want to delete a file. We can use the :command:`rm` guestfish " "command, which works the same way it does in a traditional shell." msgstr "" #: ../modify-images.rst:99 msgid "" "We want to edit the ``ifcfg-eth0`` file to remove the ``HWADDR`` line. The :" "command:`edit` command will copy the file to the host, invoke your editor, " "and then copy the file back." msgstr "" #: ../modify-images.rst:107 msgid "" "If you want to modify this image to load the 8021q kernel at boot time, you " "must create an executable script in the ``/etc/sysconfig/modules/`` " "directory. You can use the :command:`touch` guestfish command to create an " "empty file, the :command:`edit` command to edit it, and the :command:`chmod` " "command to make it executable." msgstr "" #: ../modify-images.rst:119 msgid "We add the following line to the file and save it:" msgstr "" #: ../modify-images.rst:125 msgid "Then we set to executable:" msgstr "" #: ../modify-images.rst:131 msgid "We are done, so we can exit using the :command:`exit` command:" msgstr "" #: ../modify-images.rst:138 msgid "Go further with guestfish" msgstr "" #: ../modify-images.rst:140 msgid "" "There is an enormous amount of functionality in guestfish and a full " "treatment is beyond the scope of this document. Instead, we recommend that " "you read the `guestfs-recipes `_ documentation page for a sense of what is possible with these tools." msgstr "" #: ../modify-images.rst:147 msgid "guestmount" msgstr "" #: ../modify-images.rst:149 msgid "" "For some types of changes, you may find it easier to mount the image's file " "system directly in the guest. The ``guestmount`` program, also from the " "libguestfs project, allows you to do so." msgstr "" #: ../modify-images.rst:154 msgid "" "For example, to mount the root partition from our ``centos63_desktop.qcow2`` " "image to ``/mnt``, we can do:" msgstr "" #: ../modify-images.rst:161 msgid "" "If we did not know in advance what the mount point is in the guest, we could " "use the ``-i`` (inspect) flag to tell guestmount to automatically determine " "what mount point to use:" msgstr "" #: ../modify-images.rst:169 msgid "" "Once mounted, we could do things like list the installed packages using rpm:" msgstr "" #: ../modify-images.rst:175 msgid "Once done, we unmount:" msgstr "" #: ../modify-images.rst:182 msgid "virt-* tools" msgstr "" #: ../modify-images.rst:184 msgid "" "The `libguestfs `_ project has a number of other " "useful tools, including:" msgstr "" #: ../modify-images.rst:187 msgid "" "`virt-edit `_ for editing a file " "inside of an image." msgstr "" #: ../modify-images.rst:189 msgid "" "`virt-df `_ for displaying free space " "inside of an image." msgstr "" #: ../modify-images.rst:191 msgid "" "`virt-resize `_ for resizing an " "image." msgstr "" #: ../modify-images.rst:193 msgid "" "`virt-sysprep `_ for preparing an " "image for distribution (for example, delete SSH host keys, remove MAC " "address info, or remove user accounts)." msgstr "" #: ../modify-images.rst:196 msgid "" "`virt-sparsify `_ for making an " "image sparse." msgstr "" #: ../modify-images.rst:198 msgid "" "`virt-p2v `_ for converting a physical " "machine to an image that runs on KVM." msgstr "" #: ../modify-images.rst:200 msgid "" "`virt-v2v `_ for converting Xen and VMware " "images to KVM images." msgstr "" #: ../modify-images.rst:204 msgid "Modify a single file inside of an image" msgstr "" #: ../modify-images.rst:206 msgid "" "This example shows how to use :command:`virt-edit` to modify a file. The " "command can take either a filename as an argument with the ``-a`` flag, or a " "domain name as an argument with the ``-d`` flag. The following examples " "shows how to use this to modify the ``/etc/shadow`` file in instance with " "libvirt domain name ``instance-000000e1`` that is currently running:" msgstr "" #: ../modify-images.rst:220 msgid "Resize an image" msgstr "" #: ../modify-images.rst:222 msgid "" "Here is an example of how to use :command:`virt-resize` to resize an image. " "Assume we have a 16 GB Windows image in qcow2 format that we want to resize " "to 50 GB." msgstr "" #: ../modify-images.rst:226 msgid "First, we use :command:`virt-filesystems` to identify the partitions:" msgstr "" #: ../modify-images.rst:236 msgid "" "In this case, it is the ``/dev/sda2`` partition that we want to resize. We " "create a new qcow2 image and use the :command:`virt-resize` command to write " "a resized copy of the original into the new image:" msgstr "" #: ../modify-images.rst:268 msgid "Loop devices, kpartx, network block devices" msgstr "" #: ../modify-images.rst:270 msgid "" "If you do not have access to the libguestfs, you can mount image file " "systems directly in the host using loop devices, kpartx, and network block " "devices." msgstr "" #: ../modify-images.rst:276 msgid "" "Mounting untrusted guest images using the tools described in this section is " "a security risk, always use libguestfs tools such as guestfish and " "guestmount if you have access to them. See `A reminder why you should never " "mount guest disk images on the host OS `_ by Daniel Berrangé for more details." msgstr "" #: ../modify-images.rst:285 msgid "Mount a raw image (without LVM)" msgstr "" #: ../modify-images.rst:287 msgid "" "If you have a raw virtual machine image that is not using LVM to manage its " "partitions, use the :command:`losetup` command to find an unused loop device." "" msgstr "" #: ../modify-images.rst:296 msgid "" "In this example, ``/dev/loop0`` is free. Associate a loop device with the " "raw image:" msgstr "" #: ../modify-images.rst:303 msgid "" "If the image only has a single partition, you can mount the loop device " "directly:" msgstr "" #: ../modify-images.rst:310 msgid "" "If the image has multiple partitions, use :command:`kpartx` to expose the " "partitions as separate devices (for example, ``/dev/mapper/loop0p1``), then " "mount the partition that corresponds to the root file system:" msgstr "" #: ../modify-images.rst:318 msgid "" "If the image has, say three partitions (/boot, /, swap), there should be one " "new device created per partition:" msgstr "" #: ../modify-images.rst:328 msgid "To mount the second partition, as root:" msgstr "" #: ../modify-images.rst:335 msgid "Once you are done, to clean up:" msgstr "" #: ../modify-images.rst:345 msgid "Mount a raw image (with LVM)" msgstr "" #: ../modify-images.rst:347 msgid "" "If your partitions are managed with LVM, use :command:`losetup` and :command:" "`kpartx` commands as in the previous example to expose the partitions to the " "host." msgstr "" #: ../modify-images.rst:358 msgid "" "Next, you need to use the :command:`vgscan` command to identify the LVM " "volume groups and then the :command:`vgchange` command to expose the volumes " "as devices:" msgstr "" #: ../modify-images.rst:371 msgid "Clean up when you are done:" msgstr "" #: ../modify-images.rst:381 msgid "Mount a qcow2 image (without LVM)" msgstr "" #: ../modify-images.rst:383 msgid "" "You need the ``nbd`` (network block device) kernel module loaded to mount " "qcow2 images. This will load it with support for 16 block devices, which is " "fine for our purposes. As root:" msgstr "" #: ../modify-images.rst:391 msgid "" "Assuming the first block device (``/dev/nbd0``) is not currently in use, we " "can expose the disk partitions using the :command:`qemu-nbd` and :command:" "`partprobe` commands. As root:" msgstr "" #: ../modify-images.rst:400 msgid "" "If the image has, say three partitions (/boot, /, swap), there should be one " "new device created for each partition:" msgstr "" #: ../modify-images.rst:413 msgid "" "If the network block device you selected was already in use, the initial :" "command:`qemu-nbd` command will fail silently, and the ``/dev/nbd0p{1,2,3}`` " "device files will not be created." msgstr "" #: ../modify-images.rst:417 msgid "" "If the image partitions are not managed with LVM, they can be mounted " "directly:" msgstr "" #: ../modify-images.rst:425 ../modify-images.rst:453 msgid "When you are done, clean up:" msgstr "" #: ../modify-images.rst:434 msgid "Mount a qcow2 image (with LVM)" msgstr "" #: ../modify-images.rst:436 msgid "" "If the image partitions are managed with LVM, after you use :command:`qemu-" "nbd` and :command:`partprobe`, you must use :command:`vgscan` and :command:" "`vgchange -ay` in order to expose the LVM partitions as devices that can be " "mounted:" msgstr "" #: ../obtain-images.rst:3 msgid "Get images" msgstr "" #: ../obtain-images.rst:7 msgid "" "The simplest way to obtain a virtual machine image that works with OpenStack " "is to download one that someone else has already created. Most of the images " "contain the ``cloud-init`` package to support the SSH key pair and user data " "injection. Because many of the images disable SSH password authentication by " "default, boot the image with an injected key pair. You can ``SSH`` into the " "instance with the private key and default login account. See `Configure " "access and security for instances `_ for more " "information on how to create and inject key pairs with OpenStack." msgstr "" #: ../obtain-images.rst:19 msgid "AlmaLinux" msgstr "" #: ../obtain-images.rst:21 msgid "" "AlmaLinux provides cloud images for download, more detail on the `get " "AlmaLinux project page `_" msgstr "" #: ../obtain-images.rst:27 msgid "In an Almalinux cloud image, the login account is ``almalinux``." msgstr "" #: ../obtain-images.rst:30 msgid "Alpine Linux" msgstr "" #: ../obtain-images.rst:32 msgid "" "Alpine Linux provides cloud images for download, more detail on the `Alpine " "Linux cloud page `_" msgstr "" #: ../obtain-images.rst:38 msgid "In an Alpine Linux cloud image, the login account is ``alpine``." msgstr "" #: ../obtain-images.rst:41 msgid "Arch Linux" msgstr "" #: ../obtain-images.rst:43 msgid "" "Arch Linux provides a cloud image for download. More details can be found on " "the `arch-boxes project page `_." msgstr "" #: ../obtain-images.rst:49 msgid "In an Arch Linux image, the login account is ``arch``." msgstr "" #: ../obtain-images.rst:52 msgid "BSD: DragonFlyBSD, FreeBSD, NetBSD, OpenBSD" msgstr "" #: ../obtain-images.rst:54 msgid "" "Unofficial images for BSD are available on `BSD-Cloud-Image.org `_." msgstr "" #: ../obtain-images.rst:58 msgid "" "The login accounts are ``freebsd`` for FreeBSD, ``openbsd`` for OpenBSD, and " "``netbsd`` for NetBSD." msgstr "" #: ../obtain-images.rst:62 msgid "CentOS" msgstr "" #: ../obtain-images.rst:64 msgid "The CentOS project maintains official images for direct download:" msgstr "" #: ../obtain-images.rst:66 msgid "`CentOS 9 stream images `_" msgstr "" #: ../obtain-images.rst:70 msgid "In a CentOS cloud image, the login account is ``centos``." msgstr "" #: ../obtain-images.rst:73 msgid "CirrOS (test)" msgstr "" #: ../obtain-images.rst:75 msgid "" "CirrOS is a minimal Linux distribution that was designed for use as a test " "image on clouds such as OpenStack Compute. You can download a CirrOS image " "in various formats from the `CirrOS download page `_." msgstr "" #: ../obtain-images.rst:80 msgid "" "If your deployment uses QEMU or KVM, we recommend using the images in qcow2 " "format. The most recent 64-bit qcow2 image as of this writing is `cirros-0.6." "2-x86_64-disk.img `_." msgstr "" #: ../obtain-images.rst:87 msgid "" "In a CirrOS image, the login account is ``cirros``. The password is " "``gocubsgo``. Since the fixed PW allows anyone to login, you should not run " "this image with a public IP attached." msgstr "" #: ../obtain-images.rst:92 msgid "Debian" msgstr "" #: ../obtain-images.rst:94 msgid "" "`Debian provides images for direct download `_. They are made at the same time as the CD and DVD images of " "Debian. Therefore, images are available on each point release of Debian. " "Also, weekly images of the testing distribution are available." msgstr "" #: ../obtain-images.rst:102 msgid "In a Debian image, the login account is ``debian``." msgstr "" #: ../obtain-images.rst:105 msgid "Fedora" msgstr "" #: ../obtain-images.rst:107 msgid "" "The Fedora project maintains a list of official cloud images at `Fedora " "download page `_." msgstr "" #: ../obtain-images.rst:112 msgid "In a Fedora cloud image, the login account is ``fedora``." msgstr "" #: ../obtain-images.rst:115 msgid "Kali Linux" msgstr "" #: ../obtain-images.rst:117 msgid "" "Kali Linux provides cloud images for download at the `Get Kali/Cloud page. " "`_ See also the page `Common " "Cloud Based Setup Information `_ for cloud setup information." msgstr "" #: ../obtain-images.rst:126 msgid "In a Kali Linux cloud image, the login account is ``kali``." msgstr "" #: ../obtain-images.rst:129 msgid "Microsoft Windows" msgstr "" #: ../obtain-images.rst:131 msgid "" "Cloudbase Solutions provides the last available trial version of `Windows " "Server 2012 R2 `_. This image " "includes cloudbase-init plus VirtIO drivers on KVM. You can build your own " "image based on Windows Server 2016, 2019, Windows 10 etc) with `Cloudbase " "Imaging Tools `_." msgstr "" #: ../obtain-images.rst:137 msgid "" "ISO files for Windows 10 are available on `Microsoft Windows 10 Downloadpage " "`_ and " "`Microsoft Evaluation Center `_." msgstr "" #: ../obtain-images.rst:140 msgid "" "`Fedora Virtio `_ provides also Windows images." msgstr "" #: ../obtain-images.rst:144 msgid "openSUSE and SUSE Linux Enterprise Server" msgstr "" #: ../obtain-images.rst:146 msgid "" "The openSUSE community provides images for `openSUSE `_ under ``Alternative Downloads / Cloud image``" msgstr "" #: ../obtain-images.rst:149 msgid "" "SUSE maintains official SUSE Linux Enterprise Server cloud images. Go to the " "`SUSE Linux Enterprise Server download page `_, select the ``AMD64 / Intel 64`` architecture and search for " "``Cloud``." msgstr "" #: ../obtain-images.rst:156 msgid "In an openSUSE cloud image, the login account is ``opensuse``." msgstr "" #: ../obtain-images.rst:159 msgid "Red Hat Enterprise Linux" msgstr "" #: ../obtain-images.rst:161 msgid "" "Red Hat maintains official Red Hat Enterprise Linux cloud images. A valid " "Red Hat Enterprise Linux subscription is required to download these images." msgstr "" #: ../obtain-images.rst:164 msgid "" "`Red Hat Enterprise Linux 7 KVM Guest Image `_" msgstr "" #: ../obtain-images.rst:166 msgid "" "`Red Hat Enterprise Linux 8 KVM Guest Image `_" msgstr "" #: ../obtain-images.rst:168 msgid "" "`Red Hat Enterprise Linux 9 KVM Guest Image `_" msgstr "" #: ../obtain-images.rst:173 msgid "In a RHEL cloud image, the login account is ``cloud-user``." msgstr "" #: ../obtain-images.rst:176 msgid "Rocky Linux" msgstr "" #: ../obtain-images.rst:178 msgid "" "Rocky Linux provides cloud images for download, more detail on the `Rocky " "Linux download page `_" msgstr "" #: ../obtain-images.rst:184 msgid "In an Rocky Linux cloud image, the login account is ``rocky``." msgstr "" #: ../obtain-images.rst:187 msgid "Ubuntu" msgstr "" #: ../obtain-images.rst:189 msgid "" "Canonical maintains an official set of `Ubuntu-based images `_." msgstr "" #: ../obtain-images.rst:192 msgid "" "Images are arranged by Ubuntu release, and by image release date, with " "``current`` being the most recent. For example, the page that contains the " "most recently built image for Ubuntu 24.04 Noble Numbat is `Ubuntu 24.04 LTS " "(Noble Numbat) Daily Build `_. Scroll to the bottom of the page for links to the images that can be " "downloaded directly." msgstr "" #: ../obtain-images.rst:200 msgid "" "If your deployment uses QEMU or KVM, we recommend using the images in qcow2 " "format, with name ending in ``.img``. The most recent version of the 64-bit " "amd64-arch QCOW2 image for Ubuntu 24.04 is `noble-server-cloudimg-amd64.img " "`_." msgstr "" #: ../obtain-images.rst:209 msgid "In an Ubuntu cloud image, the login account is ``ubuntu``." msgstr "" #: ../openstack-images.rst:3 msgid "Image requirements" msgstr "" #: ../openstack-images.rst:6 msgid "Linux" msgstr "" #: ../openstack-images.rst:8 msgid "" "For a Linux-based image to have full functionality in an OpenStack Compute " "cloud, there are a few requirements. For some of these, you can fulfill the " "requirements by installing the `cloud-init `_ package. Read this section before you create your own " "image to be sure that the image supports the OpenStack features that you " "plan to use." msgstr "" #: ../openstack-images.rst:15 msgid "Disk partitions and resize root partition on boot (``cloud-init``)" msgstr "" #: ../openstack-images.rst:16 ../openstack-images.rst:142 msgid "No hard-coded MAC address information" msgstr "" #: ../openstack-images.rst:17 msgid "SSH server running" msgstr "" #: ../openstack-images.rst:18 ../openstack-images.rst:174 msgid "Disable firewall" msgstr "" #: ../openstack-images.rst:19 msgid "Access instance using ssh public key (``cloud-init``)" msgstr "" #: ../openstack-images.rst:20 msgid "Process user data and other metadata (``cloud-init``)" msgstr "" #: ../openstack-images.rst:21 msgid "" "Paravirtualized Xen support in Linux kernel (Xen hypervisor only with Linux " "kernel version < 3.0)" msgstr "" #: ../openstack-images.rst:25 msgid "Disk partitions and resize root partition on boot (cloud-init)" msgstr "" #: ../openstack-images.rst:27 msgid "" "When you create a Linux image, you must decide how to partition the disks. " "The choice of partition method can affect the resizing functionality, as " "described in the following sections." msgstr "" #: ../openstack-images.rst:31 msgid "" "The size of the disk in a virtual machine image is determined when you " "initially create the image. However, OpenStack lets you launch instances " "with different size drives by specifying different flavors. For example, if " "your image was created with a 5 GB disk, and you launch an instance with a " "flavor of ``m1.small``. The resulting virtual machine instance has, by " "default, a primary disk size of 20 GB. When the disk for an instance is " "resized up, zeros are just added to the end." msgstr "" #: ../openstack-images.rst:41 msgid "" "Your image must be able to resize its partitions on boot to match the size " "requested by the user. Otherwise, after the instance boots, you must " "manually resize the partitions to access the additional storage to which you " "have access when the disk size associated with the flavor exceeds the disk " "size with which your image was created." msgstr "" #: ../openstack-images.rst:49 msgid "Xen: one ext3/ext4 partition (no LVM)" msgstr "" #: ../openstack-images.rst:51 msgid "" "If you use the OpenStack XenAPI driver, the Compute service automatically " "adjusts the partition and file system for your instance on boot. Automatic " "resize occurs if the following conditions are all true:" msgstr "" #: ../openstack-images.rst:55 msgid "" "``auto_disk_config=True`` is set as a property on the image in the image " "registry." msgstr "" #: ../openstack-images.rst:57 msgid "The disk on the image has only one partition." msgstr "" #: ../openstack-images.rst:58 msgid "The file system on the one partition is ext3 or ext4." msgstr "" #: ../openstack-images.rst:60 msgid "" "Therefore, if you use Xen, we recommend that when you create your images, " "you create a single ext3 or ext4 partition (not managed by LVM). Otherwise, " "read on." msgstr "" #: ../openstack-images.rst:65 msgid "Non-Xen with cloud-init/cloud-tools: one ext3/ext4 partition (no LVM)" msgstr "" #: ../openstack-images.rst:67 msgid "You must configure these items for your image:" msgstr "" #: ../openstack-images.rst:69 msgid "" "The partition table for the image describes the original size of the image." msgstr "" #: ../openstack-images.rst:70 msgid "The file system for the image fills the original size of the image." msgstr "" #: ../openstack-images.rst:72 msgid "Then, during the boot process, you must:" msgstr "" #: ../openstack-images.rst:74 msgid "Modify the partition table to make it aware of the additional space:" msgstr "" #: ../openstack-images.rst:76 msgid "" "If you do not use LVM, you must modify the table to extend the existing root " "partition to encompass this additional space." msgstr "" #: ../openstack-images.rst:79 msgid "" "If you use LVM, you can add a new LVM entry to the partition table, create a " "new LVM physical volume, add it to the volume group, and extend the logical " "partition with the root volume." msgstr "" #: ../openstack-images.rst:83 msgid "Resize the root volume file system." msgstr "" #: ../openstack-images.rst:85 msgid "" "Depending on your distribution, the simplest way to support this is to " "install in your image:" msgstr "" #: ../openstack-images.rst:88 msgid "the `cloud-init `__ package," msgstr "" #: ../openstack-images.rst:89 msgid "" "the `cloud-utils `_ package, which, on " "Ubuntu and Debian, also contains the ``growpart`` tool for extending " "partitions," msgstr "" #: ../openstack-images.rst:92 msgid "" "if you use Fedora, CentOS 7, or RHEL 7, the ``cloud-utils-growpart`` " "package, which contains the ``growpart`` tool for extending partitions," msgstr "" #: ../openstack-images.rst:94 msgid "" "if you use Ubuntu or Debian, the `cloud-initramfs-growroot `_ package , which supports resizing " "root partition on the first boot." msgstr "" #: ../openstack-images.rst:98 msgid "" "With these packages installed, the image performs the root partition resize " "on boot. For example, in the ``/etc/rc.local`` file." msgstr "" #: ../openstack-images.rst:101 msgid "" "If you cannot install ``cloud-initramfs-tools``, Robert Plestenjak has a " "GitHub project called `linux-rootfs-resize `_ that contains scripts that update a ramdisk by using " "``growpart`` so that the image resizes properly on boot." msgstr "" #: ../openstack-images.rst:107 msgid "" "If you can install the ``cloud-init`` and ``cloud-utils`` packages, we " "recommend that when you create your images, you create a single ext3 or ext4 " "partition (not managed by LVM)." msgstr "" #: ../openstack-images.rst:112 msgid "Non-Xen without cloud-init/cloud-tools: LVM" msgstr "" #: ../openstack-images.rst:114 msgid "" "If you cannot install ``cloud-init`` and ``cloud-tools`` inside of your " "guest, and you want to support resize, you must write a script that your " "image runs on boot to modify the partition table. In this case, we recommend " "using LVM to manage your partitions. Due to a limitation in the Linux kernel " "(as of this writing), you cannot modify a partition table of a raw disk that " "has partitions currently mounted, but you can do this for LVM." msgstr "" #: ../openstack-images.rst:122 msgid "Your script must do something like the following:" msgstr "" #: ../openstack-images.rst:124 msgid "" "Detect if any additional space is available on the disk. For example, parse " "the output of ``parted /dev/sda --script \"print free\"``." msgstr "" #: ../openstack-images.rst:127 msgid "" "Create a new LVM partition with the additional space. For example, ``parted /" "dev/sda --script \"mkpart lvm ...\"``." msgstr "" #: ../openstack-images.rst:129 msgid "Create a new physical volume. For example, ``pvcreate /dev/sda6``." msgstr "" #: ../openstack-images.rst:130 msgid "" "Extend the volume group with this physical partition. For example, " "``vgextend vg00 /dev/sda6``." msgstr "" #: ../openstack-images.rst:132 msgid "" "Extend the logical volume contained the root partition by the amount of " "space. For example, ``lvextend /dev/mapper/node-root /dev/sda6``." msgstr "" #: ../openstack-images.rst:135 msgid "" "Resize the root file system. For example, ``resize2fs /dev/mapper/node-" "root``." msgstr "" #: ../openstack-images.rst:138 msgid "" "You do not need a ``/boot`` partition unless your image is an older Linux " "distribution that requires that ``/boot`` is not managed by LVM." msgstr "" #: ../openstack-images.rst:144 msgid "" "You must remove the network persistence rules in the image because they " "cause the network interface in the instance to come up as an interface other " "than eth0. This is because your image has a record of the MAC address of the " "network interface card when it was first installed, and this MAC address is " "different each time the instance boots. You should alter the following files:" "" msgstr "" #: ../openstack-images.rst:152 msgid "" "Replace ``/etc/udev/rules.d/70-persistent-net.rules`` with an empty file " "(contains network persistence rules, including MAC address)." msgstr "" #: ../openstack-images.rst:154 msgid "" "Replace ``/lib/udev/rules.d/75-persistent-net-generator.rules`` with an " "empty file (this generates the file above)." msgstr "" #: ../openstack-images.rst:156 msgid "" "Remove the HWADDR line from ``/etc/sysconfig/network-scripts/ifcfg-eth0`` on " "Fedora-based images." msgstr "" #: ../openstack-images.rst:161 msgid "" "If you delete the network persistent rules files, you may get a ``udev " "kernel`` warning at boot time, which is why we recommend replacing them with " "empty files instead." msgstr "" #: ../openstack-images.rst:166 msgid "Ensure ssh server runs" msgstr "" #: ../openstack-images.rst:168 msgid "" "You must install an ssh server into the image and ensure that it starts up " "on boot, or you cannot connect to your instance by using ssh when it boots " "inside of OpenStack. This package is typically called ``openssh-server``." msgstr "" #: ../openstack-images.rst:176 msgid "" "In general, we recommend that you disable any firewalls inside of your image " "and use OpenStack security groups to restrict access to instances. The " "reason is that having a firewall installed on your instance can make it more " "difficult to troubleshoot networking issues if you cannot connect to your " "instance." msgstr "" #: ../openstack-images.rst:184 msgid "Access instance by using ssh public key (cloud-init)" msgstr "" #: ../openstack-images.rst:186 msgid "" "The typical way that users access virtual machines running on OpenStack is " "to ssh using public key authentication. For this to work, your virtual " "machine image must be configured to download the ssh public key from the " "OpenStack metadata service or config drive, at boot time." msgstr "" #: ../openstack-images.rst:192 msgid "" "If both the XenAPI agent and ``cloud-init`` are present in an image, ``cloud-" "init`` handles ssh-key injection. The system assumes ``cloud-init`` is " "present when the image has the ``cloud_init_installed`` property." msgstr "" #: ../openstack-images.rst:200 msgid "" "The ``cloud-init`` package automatically fetches the public key from the " "metadata server and places the key in an account. The account varies by " "distribution. On Ubuntu-based virtual machines, the account is called " "``ubuntu``, on Fedora-based virtual machines, the account is called " "``fedora``, and on CentOS-based virtual machines, the account is called " "``centos``." msgstr "" #: ../openstack-images.rst:220 msgid "Write a custom script to fetch the public key" msgstr "" #: ../openstack-images.rst:222 msgid "" "If you are unable or unwilling to install ``cloud-init`` inside the guest, " "you can write a custom script to fetch the public key and add it to a user " "account." msgstr "" #: ../openstack-images.rst:226 msgid "" "To fetch the ssh public key and add it to the root account, edit the ``/etc/" "rc.local`` file and add the following lines before the line ``touch /var/" "lock/subsys/local``. This code fragment is taken from the `rackerjoe oz-" "image-build CentOS 6 template `_." msgstr "" #: ../openstack-images.rst:269 msgid "" "Some VNC clients replace : (colon) with ; (semicolon) and _ (underscore) " "with - (hyphen). If editing a file over a VNC session, make sure it is http: " "not http; and authorized_keys not authorized-keys." msgstr "" #: ../openstack-images.rst:275 msgid "Process user data and other metadata (cloud-init)" msgstr "" #: ../openstack-images.rst:277 msgid "" "In addition to the ssh public key, an image might need additional " "information from OpenStack, such as to povide user data to instances, that " "the user submitted when requesting the image. For example, you might want to " "set the host name of the instance when it is booted. Or, you might wish to " "configure your image so that it executes user data content as a script on " "boot." msgstr "" #: ../openstack-images.rst:285 msgid "" "You can access this information through the metadata service or referring to " "`Store metadata on the configuration drive `_. As the OpenStack metadata service is " "compatible with version 2009-04-04 of the Amazon EC2 metadata service, " "consult the Amazon EC2 documentation on `Using Instance Metadata `_ for details on how to retrieve the user data." msgstr "" #: ../openstack-images.rst:295 msgid "" "The easiest way to support this type of functionality is to install the " "``cloud-init`` package into your image, which is configured by default to " "treat user data as an executable script, and sets the host name." msgstr "" #: ../openstack-images.rst:303 msgid "Ensure image writes boot log to console" msgstr "" #: ../openstack-images.rst:305 msgid "" "You must configure the image so that the kernel writes the boot log to the " "``ttyS0`` device. In particular, the ``console=tty0 console=ttyS0,115200n8`` " "arguments must be passed to the kernel on boot." msgstr "" #: ../openstack-images.rst:310 msgid "" "If your image uses ``grub2`` as the boot loader, there should be a line in " "the grub configuration file. For example, ``/boot/grub/grub.cfg``, which " "looks something like this:" msgstr "" #: ../openstack-images.rst:318 msgid "" "If ``console=tty0 console=ttyS0,115200n8`` does not appear, you must modify " "your grub configuration. In general, you should not update the ``grub.cfg`` " "directly, since it is automatically generated. Instead, you should edit the " "``/etc/default/grub`` file and modify the value of the " "``GRUB_CMDLINE_LINUX_DEFAULT`` variable:" msgstr "" #: ../openstack-images.rst:328 msgid "" "Next, update the grub configuration. On Debian-based operating systems such " "as Ubuntu, run this command:" msgstr "" #: ../openstack-images.rst:335 msgid "" "On Fedora-based systems, such as RHEL and CentOS, and on openSUSE, run this " "command:" msgstr "" #: ../openstack-images.rst:343 msgid "Paravirtualized Xen support in the kernel (Xen hypervisor only)" msgstr "" #: ../openstack-images.rst:345 msgid "" "Prior to Linux kernel version 3.0, the mainline branch of the Linux kernel " "did not have support for paravirtualized Xen virtual machine instances (what " "Xen calls DomU guests). If you are running the Xen hypervisor with " "paravirtualization, and you want to create an image for an older Linux " "distribution that has a pre 3.0 kernel, you must ensure that the image boots " "a kernel that has been compiled with Xen support." msgstr "" #: ../openstack-images.rst:354 msgid "Manage the image cache" msgstr "" #: ../openstack-images.rst:356 msgid "" "Use options in the ``nova.conf`` file to control whether, and for how long, " "unused base images are stored in the ``/var/lib/nova/instances/_base/``. If " "you have configured live migration of instances, all your compute nodes " "share one common ``/var/lib/nova/instances/`` directory." msgstr "" #: ../openstack-images.rst:361 msgid "" "For information about the libvirt images in OpenStack, see `The life of an " "OpenStack libvirt image from Pádraig Brady `_." msgstr "" #: ../openstack-images.rst:366 msgid "Image cache management configuration options" msgstr "" #: ../openstack-images.rst:370 msgid "Configuration option=Default value" msgstr "" #: ../openstack-images.rst:371 msgid "(Type) Description" msgstr "" #: ../openstack-images.rst:372 msgid "preallocate_images=none" msgstr "" #: ../openstack-images.rst:373 msgid "(StrOpt) VM image preallocation mode:" msgstr "" #: ../openstack-images.rst:375 msgid "none" msgstr "" #: ../openstack-images.rst:376 msgid "No storage provisioning occurs up front." msgstr "" #: ../openstack-images.rst:378 msgid "" "Storage is fully allocated at instance start. The ``$instance_dir/`` images " "are `fallocated `_ to immediately determine if enough space is available, " "and to possibly improve VM I/O performance due to ongoing allocation " "avoidance, and better locality of block allocations." msgstr "" #: ../openstack-images.rst:382 msgid "space" msgstr "" #: ../openstack-images.rst:384 msgid "remove_unused_base_images=True" msgstr "" #: ../openstack-images.rst:385 msgid "" "(BoolOpt) Should unused base images be removed? When set to True, the " "interval at which base images are removed are set with the following two " "settings. If set to False base images are never removed by Compute." msgstr "" #: ../openstack-images.rst:389 msgid "remove_unused_original_minimum_age_seconds=86400" msgstr "" #: ../openstack-images.rst:390 msgid "" "(IntOpt) Unused unresized base images younger than this are not removed. " "Default is 86400 seconds, or 24 hours." msgstr "" #: ../openstack-images.rst:392 msgid "remove_unused_resized_minimum_age_seconds=3600" msgstr "" #: ../openstack-images.rst:393 msgid "" "(IntOpt) Unused resized base images younger than this are not removed. " "Default is 3600 seconds, or one hour." msgstr "" #: ../openstack-images.rst:396 msgid "" "To see how the settings affect the deletion of a running instance, check the " "directory where the images are stored:" msgstr "" #: ../openstack-images.rst:403 msgid "In the ``/var/log/compute/compute.log`` file, look for the identifier:" msgstr "" #: ../openstack-images.rst:411 msgid "" "Because 86400 seconds (24 hours) is the default time for " "``remove_unused_original_minimum_age_seconds``, you can either wait for that " "time interval to see the base image removed, or set the value to a shorter " "time period in the ``nova.conf`` file. Restart all nova services after " "changing a setting in the ``nova.conf`` file." msgstr "" #: ../share-images.rst:3 msgid "Image sharing" msgstr "" #: ../share-images.rst:5 msgid "" "Image producers and consumers are both OpenStack users, or projects. Image " "producers create and share images with image consumers, allowing the " "consumers to use the shared image when booting a server. The producer shares " "an image with the consumer by making the consumer a member of that image. " "The consumer then accepts or rejects the image by changing the image member " "status. After it is accepted, the image appears in the consumer's image list." " As long as the consumer is a member of the image, the consumer can use the " "image, regardless of the image member status, if the consumer knows the " "image ID." msgstr "" #: ../share-images.rst:16 msgid "" "In the OpenStack Image API, the image member status serves three purposes:" msgstr "" #: ../share-images.rst:19 msgid "" "The member status controls whether image appears in the consumer's image " "list. If the image member status is ``accepted``, the image appears in the " "consumer's image list. Otherwise, the image does not appear in the image " "list. The image may still be used as long as the consumer knows the image ID." "" msgstr "" #: ../share-images.rst:25 msgid "The member status can be used to filter the consumer's image list." msgstr "" #: ../share-images.rst:27 msgid "" "The member status lets the producer know whether the consumer has seen and " "acted on the shared image. If the status is ``accepted`` or ``rejected``, " "the consumer has definitely seen the shared image. If the status is " "``pending``, the consumer may not be aware that an image was shared." msgstr "" #: ../share-images.rst:33 msgid "" "Image producers and consumers have different abilities and responsibilities " "regarding image sharing, which the following list shows." msgstr "" #: ../share-images.rst:36 msgid "" "Image producers add members to images, or remove members from images, but " "they may not modify the member status of an image member." msgstr "" #: ../share-images.rst:39 msgid "" "Image producers and consumers view the status of image members. When listing " "image members, the producers see all the image members, and the consumers " "see only themselves." msgstr "" #: ../share-images.rst:43 msgid "" "Image consumers change their own member status, but they may not add or " "remove themselves as an image member." msgstr "" #: ../share-images.rst:46 msgid "" "Image consumers can boot from any image shared by the image producer, " "regardless of the member status, as long as the consumer knows the image ID." msgstr "" #: ../share-images.rst:51 msgid "Sharing an image" msgstr "" #: ../share-images.rst:53 msgid "" "The following procedure is a workflow for image sharing after image creation." "" msgstr "" #: ../share-images.rst:55 msgid "" "Communications between the image producer and the consumer, such as those " "described in this example, must be arranged independently of the OpenStack " "Image API. The consumer and producer can send notifications by using email, " "phone, Twitter, or other channels." msgstr "" #: ../share-images.rst:60 msgid "" "The producer posts the availability of specific images for consumers to " "review." msgstr "" #: ../share-images.rst:63 msgid "" "A potential consumer provides the producer with the consumer's project ID. " "Optionally, the producer might request the consumer's email address for " "notification purposes, but this is outside the scope of the API." msgstr "" #: ../share-images.rst:68 msgid "" "The producer shares the image with the consumer, by using the ``Create " "image member`` API operation." msgstr "" #: ../share-images.rst:71 msgid "" "Optionally, the producer notifies the consumer that the image has been " "shared and provides the image's ID (UUID)." msgstr "" #: ../share-images.rst:74 msgid "" "If the consumer wants the image to appear in the image list, the consumer " "uses the OpenStack Image API to change the image member status to " "``accepted``, by using the ``Update image member`` API operation." msgstr "" #: ../share-images.rst:78 msgid "" "If the consumer subsequently wants to hide the image, the consumer uses the " "OpenStack Image API to change the image member status to ``rejected``. If " "the consumer wants to hide the image, but is open to the possibility of " "being reminded by the producer that the image is available, the consumer " "uses the OpenStack Image API to change the image member status back to " "``pending``, by using the ``Update image member`` API operation." msgstr ""