™.. virt-image - Online Linux Manual PageSection : 5
Updated : 2017-03-22
Source :
Note : Virtual Machine Install Tools

NAMEvirt−image − Format of the virtual image XML descriptor

DESCRIPTIONvirt−image(1) relies on an XML descriptor to create virtual machines from virtual machine images. In general, a virtual machine image consists of the ​XML descriptor (usually in a file image.xml) and a number of files for the virtual machine's disks. In the following explanation of the structure of the image descriptor, mandatory XML elements are marked as element, whereas optional elements are marked as element. All file names in the image descriptor are relative to the location of the descriptor itself. Generally, disk files are either kept in the same directory as the image descriptor, or in a subdirectory.

HOST MATCHINGThe image descriptor contains information on the requirements a guest has on the host platform through one or more the /image/domain/boot descriptors (see section BOOT). The image can only be used if at least one of the boot descriptors is suitable for the host platform; a boot descriptor is suitable if: • The CPU architecture of the boot descriptor, given by the ​boot/guest/arch element, is supported by the host • The host supports a guest with the features requested in the ​boot/guest/features element, such as providing an APIC, or having ACPI turned off If a suitable boot descriptor is found, the guest is created and booted according to the information about booting the OS from the boot/os element and with the disks specified in the boot/drive element. If more than one suitable boot descriptor is found, one of them is chosen based on a heuristic, generally preferring paravirtualized guests over full virtualized ones, though this is an implementation detail of the tool creating the virtual machine.

STRUCTUREThe image descriptor consists of three sections, all contained in the toplevel image element: General metadata about the image A number of elements like label, name, and description that give some simple information about the image. The name must be a string suitable as a name for the virtual machine, the label is a short human-readable string suitable for display in graphical UI's, and the ​description should be a longer, free-form description of the purpose of the image. The name is mandatory. Virtual machine attributes The domain element contains instructions on how to boot the image, and device attributes such as the number of virtual CPU's and the size of the memory. (see section DOMAIN) Storage layout The storage element lists the files to back the virtual machine's disks and some information about their format and use. (see section STORAGE)

DOMAINThe domain element contains one or more boot descriptors (see section ​BOOT) and a devices element. The Devices element lists the recommended number of virtual CPU's in the vcpu element and the recommended amount of memory in kB in the memory element. It also indicates whether the virtual machine should have a network interface through the interface element and whether the virtual machine has a graphical interface through the graphics element.

BOOTEach boot descriptor details how the virtual machine should be started on a certain hypervisor. The type attribute of the boot element, which can either be \*(C`xen\*(C'\fR or \f(CW\*(C`hvm\*(C'\fR, depending on whether the boot descriptor is for a paravirtualized Xen(tm) guest or a fully-virtualized guest. The boot element contains three subelements: The platform requirements of the guest The platform requirements, contained in the guest element, consist of the arch element and the features element. The arch element indicates the CPU architecture the guest expects, e.g. \*(C`i686\*(C'\fR, \f(CW\*(C`x86_64\*(C'\fR, or \*(C`ppc\*(C'\fR. The features element indicates whether certain platform features should be on or off. Currently, the platform features are pae, acpi, and ​apic. Omitting a togglable feature tag turns it off. The details of booting the image's operating system The os element for fully-virtualized \*(C`hvm\*(C'\fR guests contains a \fBloader\fR element whose dev attribute indicates whether to boot off a hard disk (\*(C`dev=\*(Aqhd\*(Aq\*(C'\fR) or off a CD-ROM (\f(CW\*(C`dev=\*(Aqcdrom\*(Aq\*(C'\fR) For paravirtualized guests, the os element either contains a ​\*(C`<loader>pygrub</loader>\*(C'\fR element, indicating that the guest should be booted with pygrub, or kernel, initrd and cmdline elements. The contents of the kernel and initrd elements are the names of the kernel and initrd files, whereas the cmdline element contains the command line that should be passed to the kernel on boot. The mapping of disk files as devices into the guest The mapping of disk files into the guest is performed by a list of drive elements inside the boot element. Each drive element references the name of a disk file from the STORAGE section through its disk attribute and can optionally specify as what device that disk file should appear in the guest through its target attribute. If the target is omitted, device names are assigned in the order in which the drive elements appear, skipping already assigned devices.

STORAGEThe storage element lists the disk image files that are part of the virtual machine image in a list of one or more disk elements. Each ​disk element can contain the following attributes: • the file attribute giving the name of the disk file • an optional id attribute. The name given with that attribute is used to reference the disk from the drive element of a boot descriptor. If the id attribute is missing, it defaults to the file attribute. • the use attribute indicating whether the disk file is a \*(C`system\*(C'\fR, ​\*(C`user\*(C'\fR, or \f(CW\*(C`scratch\*(C'\fR disk. The \fBuse\fR attribute differentiates disk files so that an update based on replacing disk files can replace \*(C`system\*(C'\fR disks, but leave \*(C`user\*(C'\fR disks untouched. Generally, \*(C`system\*(C'\fR disks contain application code, \f(CW\*(C`user\*(C'\fR disks contain the application's data, and \*(C`scratch\*(C'\fR disks contain temporary state that can be erased between runs of the guest. The virtual machine image must contain files for all \*(C`system\*(C'\fR disks, and may contain files for the \*(C`user\*(C'\fR and \f(CW\*(C`scratch\*(C'\fR disks. If the latter are not part of the image, they are initialized as empty files when a guest is created, with the size given by the size attribute. • the size attribute giving the size of the disk in MB. • the format attribute giving the format of the disk file. Currently, this can be one of: \*(C`raw\*(C'\fR, \f(CW\*(C`iso\*(C'\fR, \f(CW\*(C`qcow2\*(C'\fR, or \f(CW\*(C`vmdk\*(C'\fR.

EXAMPLEThe image descriptor below can be used to create a virtual machine running the System Rescue CD (\*(C`http://www.sysresccd.org/\*(C'\fR) Besides the descriptor, you only need the ISO image from the System Rescue CD website. <?xml version="1.0" encoding="UTF−8"?><image><name>sysresccd</name><domain><boot type="hvm"><guest><arch>i686</arch></guest><os><loader dev="cdrom"/></os><drive disk="root.raw" target="hda"/><drive disk="sysresc"/></boot><devices><vcpu>1</vcpu><memory>262144</memory><interface/><graphics/></devices></domain><storage><disk file="root.raw" use="scratch" size="100" format="raw"/><disk id="sysresc" file="isos/systemrescuecd.iso" ​ use="system" format="iso"/></storage></image> To create a virtual machine, save the above XML in image.xml and run: ​ # virt−image −−vnc image.xml

AUTHORWritten by David Lutterkort. See the AUTHORS file in the source distribution for the complete list of credits.

BUGSPlease see \*(C`http://virt\-manager.org/page/BugReporting\*(C'\fR

COPYRIGHTCopyright (C) 2006−2007 Red Hat, Inc, and various contributors. This is free software. You may redistribute copies of it under the terms of the GNU General Public License \*(C`http://www.gnu.org/licenses/gpl.html\*(C'\fR. There is NO WARRANTY, to the extent permitted by law.

SEE ALSOvirt−image(1), virt−install(1), the project website ​\*(C`http://virt\-manager.org\*(C'\fR, the Relax-NG grammar for image \s-1XML\s0 \f(CW\*(C`image.rng\*(C'\fR
0
Johanes Gumabo
Data Size   :   29,761 byte
man-virt-image.5Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 170,534
Visitor ID   :     :  
Visitor IP   :   3.138.134.149   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|virt-image.5|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|virt-image.5|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|virt-image.5|41|br══─}─══|'br══─}─══ )         (htmlprn|149|virt-image.5|41|'br══─}─══ |'br══─}─══ )         (rof_nr_x|149|virt-image.5|51/52|\nF|.ie \nF ══─{─══. de IX )         (rof_unit_scale_px|41|virt-image.5|51/52|F|.ie \nF ══─{─══. de IX )         (rof_if|19|virt-image.5|51/52|\nF|.ie \nF ══─{─══. de IX )         (htmlprn|149|virt-image.5|51/52|.ie \nF ══─{─══. de IX|.ie \nF ══─{─══. de IX )         (rof_escape_sequence|91|virt-image.5|53|\$1\t\\n%\t"\\$2" |. tm Index:\\$1\t\\n%\t"\\$2" )         (parse_manual_page_|249|virt-image.5|57|══─}─══|.══─}─══ )         (htmlprn|149|virt-image.5|57|.══─}─══ |.══─}─══ )         (rof_escape_sequence|91|virt-image.5|204|\*(C`xen\*(C'\fR or \f(CW\*(C`hvm\*(C'\fR, depending on whether the boot |which can either be \f(CW\*(C`xen\*(C'\fR or \f(CW\*(C`hvm\*(C'\fR, depending on whether the boot )         (rof_escape_sequence|91|virt-image.5|213|\*(C`i686\*(C'\fR, \f(CW\*(C`x86_64\*(C'\fR, |indicates the \s-1CPU\s0 architecture the guest expects, e.g. \f(CW\*(C`i686\*(C'\fR, \f(CW\*(C`x86_64\*(C'\fR, )         (rof_escape_sequence|91|virt-image.5|214|\*(C`ppc\*(C'\fR. |or \f(CW\*(C`ppc\*(C'\fR. )         (rof_escape_sequence|91|virt-image.5|221|\*(C`hvm\*(C'\fR guests contains a \fBloader\fR |The \fBos\fR element for fully-virtualized \f(CW\*(C`hvm\*(C'\fR guests contains a \fBloader\fR )         (rof_escape_sequence|91|virt-image.5|223|\*(C`dev=\*(Aqhd\*(Aq\*(C'\fR) or off a CD-ROM (\f(CW\*(C`dev=\*(Aqcdrom\*(Aq\*(C'\fR) |(\f(CW\*(C`dev=\*(Aqhd\*(Aq\*(C'\fR) or off a CD-ROM (\f(CW\*(C`dev=\*(Aqcdrom\*(Aq\*(C'\fR) )         (rof_escape_sequence|91|virt-image.5|226|\*(C`pygrub\*(C'\fR element, indicating that the guest should be |\&\f(CW\*(C`pygrub\*(C'\fR element, indicating that the guest should be )         (rof_escape_sequence|91|virt-image.5|252|\*(C`system\*(C'\fR, |the \fBuse\fR attribute indicating whether the disk file is a \f(CW\*(C`system\*(C'\fR, )         (rof_escape_sequence|91|virt-image.5|253|\*(C`user\*(C'\fR, or \f(CW\*(C`scratch\*(C'\fR disk. The \fBuse\fR attribute differentiates disk files |\&\f(CW\*(C`user\*(C'\fR, or \f(CW\*(C`scratch\*(C'\fR disk. The \fBuse\fR attribute differentiates disk files )         (rof_escape_sequence|91|virt-image.5|254|\*(C`system\*(C'\fR |so that an update based on replacing disk files can replace \f(CW\*(C`system\*(C'\fR )         (rof_escape_sequence|91|virt-image.5|255|\*(C`user\*(C'\fR disks untouched. |disks, but leave \f(CW\*(C`user\*(C'\fR disks untouched. )         (rof_escape_sequence|91|virt-image.5|257|\*(C`system\*(C'\fR disks contain application code, \f(CW\*(C`user\*(C'\fR disks contain |Generally, \f(CW\*(C`system\*(C'\fR disks contain application code, \f(CW\*(C`user\*(C'\fR disks contain )         (rof_escape_sequence|91|virt-image.5|258|\*(C`scratch\*(C'\fR disks contain temporary state that |the application's data, and \f(CW\*(C`scratch\*(C'\fR disks contain temporary state that )         (rof_escape_sequence|91|virt-image.5|261|\*(C`system\*(C'\fR disks, and |The virtual machine image must contain files for all \f(CW\*(C`system\*(C'\fR disks, and )         (rof_escape_sequence|91|virt-image.5|262|\*(C`user\*(C'\fR and \f(CW\*(C`scratch\*(C'\fR disks. If the latter are |may contain files for the \f(CW\*(C`user\*(C'\fR and \f(CW\*(C`scratch\*(C'\fR disks. If the latter are )         (rof_escape_sequence|91|virt-image.5|269|\*(C`raw\*(C'\fR, \f(CW\*(C`iso\*(C'\fR, \f(CW\*(C`qcow2\*(C'\fR, or \f(CW\*(C`vmdk\*(C'\fR. |can be one of: \f(CW\*(C`raw\*(C'\fR, \f(CW\*(C`iso\*(C'\fR, \f(CW\*(C`qcow2\*(C'\fR, or \f(CW\*(C`vmdk\*(C'\fR. )         (rof_escape_sequence|91|virt-image.5|273|\*(C`http://www.sysresccd.org/\*(C'\fR) Besides the descriptor, |the System Rescue \s-1CD\s0 (\f(CW\*(C`http://www.sysresccd.org/\*(C'\fR) Besides the descriptor, )         (rof_escape_sequence|91|virt-image.5|317|\*(C`http://virt\-manager.org/page/BugReporting\*(C'\fR |Please see \f(CW\*(C`http://virt\-manager.org/page/BugReporting\*(C'\fR )         (rof_escape_sequence|91|virt-image.5|322|\*(C`http://www.gnu.org/licenses/gpl.html\*(C'\fR. |of the \s-1GNU\s0 General Public License \f(CW\*(C`http://www.gnu.org/licenses/gpl.html\*(C'\fR. )         (rof_escape_sequence|91|virt-image.5|327|\*(C`http://virt\-manager.org\*(C'\fR, the Relax-NG grammar for image \s-1XML\s0 \f(CW\*(C`image.rng\*(C'\fR |\&\f(CW\*(C`http://virt\-manager.org\*(C'\fR, the Relax-NG grammar for image \s-1XML\s0 \f(CW\*(C`image.rng\*(C'\fR )