17.4. The Image Uploader Tool
17.4.1. The Image Uploader Tool
engine-image-uploadercommand allows you to list export storage domains and upload virtual machine images in OVF or OVA format to an export storage domain and have them automatically recognized in the Red Hat Enterprise Virtualization Manager.
tararchive of the OVF files.
|-- images | |-- [Image Group UUID] | |--- [Image UUID (this is the disk image)] | |--- [Image UUID (this is the disk image)].meta |-- master | |---vms | |--- [UUID] | |--- [UUID].ovf
17.4.2. Syntax for the engine-image-uploader Command
listaction lists the export storage domains to which images can be uploaded.
uploadaction uploads images to the specified export storage domain.
engine-image-uploadercommand. You can set defaults for any of these parameters in the
- Displays information on how to use the image uploader command.
- Sets [PATH] as the configuration file the command will use. The default is
- Sets [PATH] as the specific file name the command will use to write log output. The default is
- Sets [PATH] as the certificate for validating the engine. The default is
- Specifies that no attempt will be made to verify the engine.
- Sets quiet mode, reducing console output to a minimum.
- Sets verbose mode, providing more console output.
- Force mode is necessary when the source file being uploaded has the same file name as an existing file in the destination export domain. This option forces the existing file to be overwritten.
Red Hat Enterprise Virtualization Manager Options
- Specifies the user whose credentials will be used to execute the command. The [USER] is specified in the format [username]@[domain]. The user must exist in the specified domain and be known to the Red Hat Enterprise Virtualization Manager.
- Specifies the IP address or fully qualified domain name of the Red Hat Enterprise Virtualization Manager from which the images will be uploaded. It is assumed that the image uploader is being run from the same machine on which the Red Hat Enterprise Virtualization Manager is installed. The default value is
Export Storage Domain Options
-eoption or the
- Sets the storage domain EXPORT_DOMAIN as the destination for uploads.
- Sets the NFS path [NFSSERVER] as the destination for uploads.
- Specifies that the UUID of the image will not be updated. By default, the command generates a new UUID for images that are uploaded. This ensures there is no conflict between the id of the image being uploaded and the images already in the environment.
- Specifies that the instance ID for each disk in the image will not be renamed. By default, the command generates new UUIDs for disks in images that are uploaded. This ensures there are no conflicts between the disks on the image being uploaded and the disks already in the environment.
- Specifies that network components in the image will not be removed from the image. By default, the command removes network interface cards from image being uploaded to prevent conflicts with network cards on other virtual machines already in the environment. If you do not use this option, you can use the Administration Portal to add network interface cards to newly imported images and the Manager will ensure there are no MAC address conflicts.
- Specifies a new name for the image being uploaded.
17.4.3. Creating an OVF Archive That is Compatible With the Image Uploader
You can create files that can be uploaded using the
Procedure 17.2. Creating an OVF Archive That is Compatible With the Image Uploader
- Use the Manager to create an empty export domain. An empty export domain makes it easy to see which directory contains your virtual machine.
- Export your virtual machine to the empty export domain you just created.
- Log in to the storage server that serves as the export domain, find the root of the NFS share and change to the subdirectory under that mount point. You started with a new export domain, there is only one directory under the exported directory. It contains the
- Run the
tar -zcvf my.ovf images/ master/command to create the tar/gzip OVF archive.
- Anyone you give the resulting OVF file to (in this example, called
my.ovf) can import it to Red Hat Enterprise Virtualization Manager using the
You have created a compressed OVF image file that can be distributed. Anyone you give it to can use the
engine-image-uploader command to upload your image into their Red Hat Enterprise Virtualization environment.
17.4.4. Basic engine-image-uploader Usage Examples
Example 17.6. Listing export storage domains using the image uploader
# engine-image-uploader list Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): Export Storage Domain Name | Datacenter | Export Domain Status myexportdom | Myowndc | active
Example 17.7. Uploading a file using the image uploader
# engine-image-uploader -e myexportdom upload myrhel6.ovf Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort):