第10章 Provisioning Virtual Machines on Red Hat Virtualization
Red Hat Virtualization is an enterprise-grade server and desktop virtualization platform. In Red Hat Satellite, you can manage virtualization functions through Red Hat Virtualization’s REST API. This includes creating virtual machines and controlling their power states.
You can use Red Hat Virtualization provisioning to create virtual machines over a network connection or from an existing image.
You can use cloud-init to configure the virtual machines that you provision. Using cloud-init avoids any special configuration on the network, such as a managed DHCP and TFTP, to finish the installation of the virtual machine. This method does not require Satellite to connect to the provisioned virtual machine using SSH to run the finish script.
Prerequisites
- Synchronized content repositories for Red Hat Enterprise Linux. For more information, see Synchronizing Red Hat Repositories in the Content Management Guide.
- An activation key for host registration. For more information, see Creating An Activation Key in the Content Management guide.
- A Capsule Server managing a logical network on the Red Hat Virtualization environment. Ensure no other DHCP services run on this network to avoid conflicts with the Capsule Server. For more information, see 3章Configuring Networking.
-
An existing template, other than the
blanktemplate, if you want to use image-based provisioning. For more information about creating templates for virtual machines, see Templates in the Red Hat Virtualization Virtual Machine Management Guide. An administration-like user on Red Hat Virtualization for communication with Satellite Server. Do not use the
admin@internaluser for this communication. Instead, create a new Red Hat Virtualization user with the following permissions:- System > Configure System > Login Permissions
- Network > Configure vNIC Profile > Create
- Network > Configure vNIC Profile > Edit Properties
- Network > Configure vNIC Profile > Delete
- Network > Configure vNIC Profile > Assign vNIC Profile to VM
- Network > Configure vNIC Profile > Assign vNIC Profile to Template
- Template > Provisioning Operations > Import/Export
- VM > Provisioning Operations > Create
- VM > Provisioning Operations > Delete
- VM > Provisioning Operations > Import/Export
- VM > Provisioning Operations > Edit Storage
- Disk > Provisioning Operations > Create
Disk > Disk Profile > Attach Disk Profile
For more information about how to create a user and add permissions in Red Hat Virtualization, see Administering User Tasks From the Administration Portal in the Red Hat Virtualization Administration Guide.
Procedure Overview
- 「Adding the Red Hat Virtualization Connection to Satellite Server」.
-
Optional: 「Preparing Cloud-init Images in Red Hat Virtualization」. Use this procedure if you want to use
cloud-initto configure an image-based virtual machine. - Optional: 「Adding Red Hat Virtualization Images to Satellite Server」. Use this procedure if you want to use image-based provisioning.
-
Optional: 「Preparing a Cloud-init Template」. Use this procedure if you want to use
cloud-initto configure an image-based virtual machine. - 「Adding Red Hat Virtualization Details to a Compute Profile」.
- 「Creating Hosts on Red Hat Virtualization」.
10.1. Adding the Red Hat Virtualization Connection to Satellite Server リンクのコピーリンクがクリップボードにコピーされました!
Use this procedure to add Red Hat Virtualization as a compute resource in Satellite.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Compute Resources and click Create Compute Resource.
- In the Name field, enter a name for the new compute resource.
- From the Provider list, select RHV.
- In the Description field, enter a description for the compute resource.
-
In the URL field, enter the connection URL for the Red Hat Virtualization Manager’s API in the following form:
https://rhv.example.com/ovirt-engine/api/v3. - Optionally, select the Use APIv4 check box to evaluate the new Red Hat Virtualization Manager API.
- In the User field, enter the name of a user with permissions to access Red Hat Virtualization Manager’s resources.
- In the Password field, enter the password of the user.
- Click Load Datacenters to populate the Datacenter list with data centers from your Red Hat Virtualization environment.
- From the Datacenter list, select a data center.
- From the Quota ID list, select a quota to limit resources available to Satellite.
- In the X509 Certification Authorities field, enter the certificate authority for SSL/TLS access. Alternatively, if you leave the field blank, a self-signed certificate is generated on the first API request by the server.
- Click the Locations tab and select the location you want to use.
- Click the Organizations tab and select the organization you want to use.
- Click Submit to save the compute resource.
For CLI Users
Enter the
hammer compute-resource createcommand withOvirtfor--providerand the name of the data center you want to use for--datacenter.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optionally, to evaluate the new Red Hat Virtualization Manager API, change
falsetotruefor the--use-v4option.