Uyuni allows you to autoinstall and manage Xen and KVMVM Guests on a registered VM Host Server. To autoinstall a VM Guest, an autoinstallable distribution and an autoinstallation profile (AutoYaST or {kickstart}) need to exist on Uyuni. VM Guests registered with Uyuni can be managed like “regular” machines. In addition, basic VM Guestmanagement tasks such as (re)starting and stopping or changing processor and memory allocation can be carried out using Uyuni.
The following documentation is valid in the context of traditional clients. Salt minions must be treated differently:
Autoinstallation is still not supported and libvirt hosts are supported as read-only.
Autoinstalling and managing VM Guests via Uyuni is limited to Xen and KVM guests.
Uyuni uses libvirt for virtual machine management.
Currently, virtual machines from other virtualization solutions such as VMware* or VirtualBox*, are recognized as VM Guests, but cannot be managed from within Uyuni.
With Uyuni you can automatically deploy Xen and KVM VM Guests using AutoYaST or {kickstart} profiles. It is also possible to automatically register the VM Guests, so they can immediately be managed by Uyuni.
Setting up and managing VM Guest s with Uyuni does not require special configuration options. However, you need to provide activation keys for the VM Host Server and the VM Guest s, an autoinstallable distribution and an autoinstallation profile. To automatically register VM Guest s with Uyuni , a bootstrap script is needed.
Just like any other client, VM Host Server and VM Guest s need to be registered with Uyuni using activation keys. Find details on how to set up activation keys at Section 5.2, “Creating Activation Keys”. While there are no special requirements for a VM Guest key, at least the following requirements must be met for the VM Host Server activation key.
Entitlements: Provisioning, Virtualization Platform.
Packages: rhn-virtualization-host , osad .
If you want to manage the VM Host Server
system from Uyuni
(e.g.
by executing remote scripts), the package rhncfg-actions
needs to be installed as well.
To autoinstall clients from Uyuni , you need to provide an “autoinstallable distribution” , also referred to as autoinstallable tree or installation source. This installation source needs to be made available through the file system of the Uyuni host. It can for example be a mounted local or remote directory or a “loop-mounted” ISO image. It must match the following requirements:
Kernel and initrd location:
images/pxeboot/vmlinuz
images/pxeboot/initrd.img
boot/arch/loader/initrd
boot/arch/loader/linux
The needs to match the autoinstallable distribution.
There is a fundamental difference between RedHat and SUSE systems regarding the package sources for autoinstallation. The packages for a RedHat installation are being fetched from the . Packages for installing SUSE systems are being fetched from the autoinstallable distribution.
As a consequence, the autoinstallable distribution for a SUSE system has to be a complete installation source (same as for a regular installation).
Make sure an installation source is available from a local directory. The data source can be any kind of network resource, a local directory or an ISO image (which has to be “loop-mounted” ). Files and directories must be world readable.
Log in to the Uyuni Web UI} and navigate to › › › .
Fill out the form as follows:
Choose a unique name for the distribution. Only letters, numbers, hyphens, periods, and underscores are allowed; the minimum length is 4 characters. This field is mandatory.
Absolute local disk path to installation source. This field is mandatory.
Channel matching the installation source. This channel is the package source for non-SUSE installations. This field is mandatory.
Operating system version matching the installation source. This field is mandatory.
Options passed to the kernel when booting for the installation.
There is no need to specify the install= parameter since it will automatically be added.
Moreover, the parameters self_update=0 pt.options=self_update are added automatically to prevent AutoYaST from updating itself during the system installation.
This field is optional.
Options passed to the kernel when booting the installed system for the first time. This field is optional.
Save your settings by clicking .
To edit an existing › › and click on a › .
Autoinstallation profiles (AutoYaST or {kickstart} files) contain all the installation and configuration data needed to install a system without user intervention. They may also contain scripts that will be executed after the installation has completed.
All profiles can be uploaded to Uyuni and be edited afterwards. Kickstart profiles can also be created from scratch with Uyuni .
A minimalist AutoYaST profile including a script for registering the client with Uyuni is listed in Appendix B, Minimalist AutoYaST Profile for Automated Installations and Useful Enhancements. For more information, examples and HOWTOs on AutoYaST profiles, refer to SUSE Linux Enterprise AutoYaST (https://www.suse.com/documentation/sles-12/book_autoyast/data/book_autoyast.html). For more information on {kickstart} profiles, refer to your RedHat documentation.
You need the installation media to setup the distribution. Starting with version 15, there is only one installation media. You will use the same one for SLES, SLED, and all the other SUSE Linux Enterprise 15 based products.
In the AutoYaST profile specify which product is to be installed.
For installing SUSE Linux Enterprise Server use the following snippet in autoyast.xml:
<products config:type="list"> <listentry>SLES</listentry> </products>
Then then specify all the required modules as add-on in autoyast.xml. This is a minimal SLE-Product-SLES15-Pool selection that will result in a working
installation and can be managed by Uyuni:
SLE-Manager-Tools15-Pool
SLE-Manager-Tools15-Updates
SLE-Module-Basesystem15-Pool
SLE-Module-Basesystem15-Updates
SLE-Product-SLES15-Updates
It is also recommended to add the following modules:
SLE-Module-Server-Applications15-Pool
SLE-Module-Server-Applications15-Updates
Log in to the Uyuni Web interface and open › › › .
Choose a unique name for the profile. Only letters, numbers, hyphens, periods, and underscores are allowed; the minimum length is 6 characters. This field is mandatory.
Choose an › is available, you need to add an Autoinstallable Distribution. Refer to Section 11.1.1.2, “Setting up an Autoinstallable Distribution” for instructions.
Choose a › here.
Scroll down to the › › to select it, then click .
The uploaded file will be displayed in the section, where you can edit it.
Click to store the profile.
To edit an existing profile, go to › › and click on a › .
If you are changing the › › › tab to verify these settings when changing the .
Currently it is only possible to create autoinstallation profiles for RHEL systems. If installing a SUSE Linux Enterprise Server system, you need to upload an existing AutoYaST profile as described in Section 11.1.1.4.1, “Uploading an Autoinstallation Profile”.
Log in to the Uyuni Web interface and go to › › › .
Choose a unique name for the profile. The minimum length is 6 characters. This field is mandatory.
Choose a › . This field is mandatory.
Choose an › is available, you need to add an Autoinstallable Distribution. Refer to Section 11.1.1.2, “Setting up an Autoinstallable Distribution” for instructions.
Choose a › here.
Click the button.
Select the location of the distribution files for the installation of your VM Guest s. There should already be a › button.
Choose a root password for the VM Guest s. Click the button to generate the profile.
This completes {kickstart} profile creation. After generating a profile, you are taken to the newly-created {kickstart} profile. You may browse through the various tabs of the profile and modify the settings as you see fit, but this is not necessary as the default settings should work well for the majority of cases.
A VM Guest that is autoinstalled does not get automatically registered. Adding a section to the autoinstallation profile that invokes a bootstrap script for registration will fix this. The following procedure describes adding a corresponding section to an AutoYaST profile. Refer to your RedHat Enterprise Linux documentation for instructions on adding scripts to a {kickstart} file.
First, provide a bootstrap script on the Uyuni :
Create a bootstrap script for VM Guest s on the Uyuni as described in Section 5.4.1, “Generating a Bootstrap Script”.
Log in as root to the konsole of Uyuni and go to /srv/www/htdocs/pub/bootstrap . Copy bootstrap.sh (the bootstrap script created in the previous step) to e.g. bootstrap_vm_guests.sh in the same directory.
Edit the newly created file according to your needs. The minimal requirement is to include the activation key for the VM Guest s (see Section 11.1.1.1, “Activation Keys” for details). We strongly recommend to also include one or more GPG keys (for example, your organization key and package signing keys).
Log in to the Uyuni Web interface and go to › › . Click on the profile that is to be used for autoinstalling the VM Guest s to open it for editing.
Scroll down to the
section where you can edit the AutoYaST
XML file.
Add the following snippet at the end of the XML file right before the closing </profile> tag and replace the given IP address with the address of the Uyuni
server.
See Appendix B, Minimalist AutoYaST Profile for Automated Installations and Useful Enhancementsfor an example script.
<scripts>
<init-scripts config:type="list">
<script>
<interpreter>shell </interpreter>
<location>
http://`192.168.1.1`/pub/bootstrap/bootstrap_vm_guests.sh
</location>
</script>
</init-scripts>
</scripts><scripts> section allowedIf your AutoYaST
profile already contains a <scripts> section, do not add a second one, but rather place the <script> part above within the existing <scripts> section!
Click to save the changes.
A VM Host Server system serving as a target for autoinstalling VM Guest s from Uyuni must be capable of running guest operating systems. This requires either KVM or Xen being properly set up. For installation instructions for SUSE Linux Enterprise Server systems refer to the SLES Virtualization Guide available from https://www.suse.com/documentation/sles-12/book_virt/data/book_virt.html. For instructions on setting up a RedHat VM Host Server refer to your RedHat Enterprise Linux documentation.
Since Uyuni
uses libvirt
for VM Guest
installation and management, the libvirtd
needs to run on the VM Host Server
.
The default libvirt
configuration is sufficient to install and manage VM Guest
s from Uyuni
.
However, in case you want to access the VNC console of a VM Guest
as a non-root
user, you need to configure libvirt
appropriately.
Configuration instructions for libvirt
on SUSE Linux Enterprise Server
are available in the SLES Virtualization
Guide
available from https://www.suse.com/documentation/sles-12/book_virt/data/book_virt.html available from http://www.suse.com/documentation/sles11/.
For instructions for a RedHat VM Host Server
refer to your RedHat Enterprise Linux documentation.
Apart from being able to serve as a host for KVM
or Xen
guests, which are managed by libvirt
, a VM Host Server
must be registered with Uyuni
.
Make sure either KVM or Xen is properly set up.
Make sure the libvirtd is running.
Register the VM Host Server with Uyuni :
Create a bootstrap script on the Uyuni as described in Section 5.4.1, “Generating a Bootstrap Script”.
Download the bootstrap script from susemanager.example.com/pub/bootstrap/bootstrap.sh to the VM Host Server .
Edit the bootstrap script according to your needs. The minimal requirement is to include the activation key for the VM Host Server (see Section 11.1.1.1, “Activation Keys” for details). We strongly recommend to also include one or more GPG keys (for example, your organization key and package signing keys).
Execute the bootstrap script to register the VM Host Server .
If the VM Host Server is registered as a Salt minion, a final configuration step is needed in order to gather all the guest VMs defined on the VM Host Server:
From the › page, enable the Add-on System Type Virtualization Host and confirm with .
Schedule a Hardware Refresh. On the › page click .
Once the registration process is finished and all packages have been installed, enable the osad
(Open Source Architecture Daemon). On a SUSE Linux Enterprise Server
system this can be achieved by running the following commands as user root
:
systemctl stop rhnsd systemctl disable rhnsd
systemctl enable osad systemctl start osad
osadTogether with rhnsdThe rhnsd
daemon checks for scheduled actions every four hours, so it can take up to four hours before a scheduled action is carried out.
If many clients are registered with Uyuni
, this long interval ensures a certain level of load balancing since not all clients act on a scheduled action at the same time.
However, when managing VM Guest
s, you usually want actions like rebooting a VM Guest
to be carried out immediately. Adding osad
ensures that.
The osad
daemon receives commands over the jabber protocol from Uyuni
and commands are instantly executed.
Alternatively you may schedule actions to be carried out at a fixed time in the future (whereas with rhnsd
you can only schedule for a time in the future plus up to four hours).
Once all requirements on the Uyuni and the VM Host Server are met, you can start to autoinstall VM Guest s on the host. Note that VM Guest s will not be automatically registered with Uyuni , therefore we strongly recommend to modify the autoinstallation profile as described in Section 11.1.1.4.3, “Adding a Registration Script to the Autoinstallation Profile”. VM Guest s need to be registered to manage them with Uyuni . Proceed as follows to autoinstall a VM Guest ;.
It is not possible to install more than one VM Guest at a time on a single VM Host Server . When scheduling more than one autoinstallation with Uyuni make sure to choose a timing, that starts the next installation after the previous one has finished. If a guest installation starts while another one is still running, the running installation will be cancelled.
Log in to the Uyuni Web interface and click the tab.
Click the VM Host Server 's name to open its page.
Open the form for creating a new VM Guest by clicking › . Fill out the form by choosing an autoinstallation profile and by specifying a name for the VM Guest (must not already exist on VM Host Server ). Choose a proxy if applicable and enter a schedule. To change the VM Guest 's hardware profile and configuration options, click .
Finish the configuration by clicking › page opens for you to monitor the autoinstallation process.
To view the installation log, click › on the › page you can click a entry to view a detailed log.
In case an installation has failed, you can it from this page once you have corrected the problem. You do not have to configure the installation again.
If the event log does not contain enough information to locate a problem, log in to the VM Host Server
console and read the log file /var/log/up2date
.
If you are using the rhnsd
, you may alternatively immediately trigger any scheduled actions by calling rhn_ckeck on the VM Host Server
.
Increase the command’s verbosity by using the options -v, -vv, or -vvv, respectively.
Basic VM Guest management actions such as restarting or shutting down a virtual machine as well as changing the CPU and memory allocation can be carried out in the Uyuni Web interface if the following requirements are met:
VM Host Server must be a KVM or Xen host.
libvirtd must be running on VM Host Server .
VM Host Server must be registered with Uyuni.
In addition, if you want to see the profile of the VM Guest, install packages, etc., you must also register it with Uyuni.
All actions can be triggered in the Uyuni Web UI from the › tab. On the resulting page, click the VM Host Server 's name and then on . This page lists all VM Guest s for this host, known to Uyuni .
Click the name of a VM Guest on the VM Host Server 's page to open its profile page with detailed information about this guest. For details, refer to Chapter 7, Systems.
A profile page for a virtual system does not differ from a regular system’s profile page. You can perform the same actions (e.g. installing software or changing its configuration).
To start, stop, restart, suspend, or resume a VM Guest , navigate to the VM Host Server 's › listed in the table and scroll down to the bottom of the page. Choose an action from the drop-down list and click › the action on the next page.
Automatically restarting a VM Guest
when the VM Host Server
reboots is not enabled by default on VM Guest
s and cannot be configured from Uyuni
.
Refer to your KVM
or Xen
documentation.
Alternatively, you may use libvirt
to enable automatic reboots.
To change the CPU or RAM allocation of a VM Guest navigate to the VM Host Server 's › from the table and scroll down to the bottom of the page. Choose an action from the › followed by .
The memory allocation can be changed on the fly, provided the memory ballooning driver is installed on the VM Guest . If this is not the case, or if you want to change the CPU allocation, you need to shutdown the guest first. Refer to Section 11.2.2, “Starting, Stopping, Suspending and Resuming a VM Guest” for details.
To delete a VM Guest you must first shut it down as described in Section 11.2.2, “Starting, Stopping, Suspending and Resuming a VM Guest”. Wait at least two minutes to allow the shutdown to finish and then choose › and .