Xen and KVM virtualized clients can be managed directly in {productname}.
To begin, you need to set up a virtual host on your {productname} Server. You can then set up autoinstallation using {ay} or {kickstart} for future virtual hosts, and for virtual guests.
This section also includes information about administering your virtual guests after they have been installed.
The way that you set up Xen or KVM on a VM host depends on what operating system you want to use on its associated guests.
For {suse} operating systems, see the SLES Virtualization Guide available from https://documentation.suse.com/sles/15-SP4/html/SLES-all/book-virtualization.html.
For {rhel} operating systems, refer to the Red Hat documentation for your version.
The Virtualization Host
formula will help you with initializing the host.
For more information, see client-configuration:virt-xenkvm.adoc.
{productname} uses libvirt
to install and manage guests.
You must have the libvirt-daemon
package installed on your host.
In most cases, the default settings are sufficient and you do not need to adjust them.
However, if you want to access the VNC console on your guests as a non-root user, you need to perform some configuration changes.
For more information about how to set this up, consult the relevant documentation for your operating system.
You need a bootstrap script on the {productname} Server. Your bootstrap script must include the activation key for your host. We also recommend that you include your GPG key for additional security. For more on creating a bootstrap script, see client-configuration:registration-bootstrap.adoc.
When your bootstrap script is ready, execute it on the host to register it with the {productname} Server. For more on client registration, see client-configuration:registration-overview.adoc.
With the Virtualization Host
formula, initialize the host:
Virtualization Host
-
In the {productname} {webui}, navigate to the
System Details
page for the host, and click theFormulas
tab. -
Select the
Virtualization Host
formula, and click btn:[Save]. -
Click the
Virtualization Host
subtab. -
Check the settings, and click btn:[Save Formula].
-
Apply the Highstate for the changes to take effect.
-
Restart the
salt-minion
service to activate the new configuration:systemctl restart salt-minion
For traditional clients, by default, VM hosts use the rhnsd
service to check for scheduled actions.
The check occurs every four hours, to balance load in environments where there are a lot of clients.
This can create delays of up to four hours before an action is carried out.
When you are managing VM guests, this long delay is not always ideal, especially for actions like rebooting a guest.
To address this, you can disable the rhnsd
service, and enable the osad
service.
The osad
service receives commands using a jabber protocol, and executes commands instantly.
To disable the rhnsd
service, and enable the osad
daemon, run these commands as the root user:
service rhnsd stop service rhnsd disable
service osad enable service osad start
You can use {ay} or {kickstart} to automatically install and register Xen and KVM guests.
You need an activation key for the VM host you want to register the guests to, and for each guest.
Your activation key must have the provisioning
and Virtualization Platform
entitlements.
Your activation key must also have access to the mgr-virtualization-host
and mgr-osad
packages.
For more on creating activation keys, see client-configuration:activation-keys.adoc.
If you want to automatically register the guests with {productname} after installation, you need to create a bootstrap script. For more on creating a bootstrap script, see client-configuration:registration-bootstrap.adoc.
Important
|
Autoinstallation of VM guests works only if they are configured as Traditional clients. Salt clients can be created using a template disk image, but not by using {ay} or {kickstart}. |
You need to create an autoinstallable distribution on the VM host to be able to autoinstall clients from {productname}. The distribution can be made available from a mounted local or remote directory, or on a loop-mounted ISO image.
The configuration of the autoinstallable distribution differs depending on whether you are using a SLES or {rhel} operating system on your guests. The packages for a {rhel} installation are fetched from the associated base channel. Packages for installing {suse} systems are fetched from the autoinstallable distribution. Therefore, for SLES systems, the autoinstallable distribution must be a complete installation source.
Operating System Type | Kernel Location | initrd Location |
---|---|---|
{rhel} |
|
|
SLES |
|
|
In all cases, ensure that the base channel matches the autoinstallable distribution.
Before you begin, ensure you have a installation media available to your VM Host. It can be on a network resource, a local directory, or an loop-mounted ISO image. Additionally, ensure that all files and directories are world-readable.
-
In the {productname} {webui}, navigate to menu:Systems[Autoinstallation > Distributions] and click btn:[Create Distribution].
-
In the
Create Autoinstallable Distribution
section, use these parameters:-
In the
Distribution Label
section, type a unique name for the distribution. Use only letters, numbers, hyphens (-
), periods (.
), and underscores (_
), and ensure the name is longer than four characters. -
In the
Tree Path
field, type an absolute path to the installation source. -
In the
Base Channel
field, select the channel that matches the installation source. This channel is used as the package source for non-{suse} installations. -
In the
Installer Generation
field, select the operating system version that matches the installation source. -
In the
Kernel Options
field, type any options to be passed to the kernel when booting for the installation. Theinstall=
parameter and theself_update=0 pt.options=self_update
parameter are added by default. -
In the
Post Kernel Options
section, type any options to be passed to the kernel when booting the installed system for the first time.
-
-
Click btn:[Create Autoinstallable Distribution] to save.
When you have created an autoinstallable distribution, you can edit it by navigating to menu:Systems[Autoinstallation > Distributions] and selecting the distribution you want to edit.
Autoinstallation profiles contain all the installation and configuration data needed to install a system. They can also contain scripts to be executed after the installation is complete.
{kickstart} profiles can be created using the {productname} {webui}, by navigating to menu:Systems[Autoinstallation > Profiles], clicking btn:[Create New Kickstart File], and following the prompts.
You can also create {ay} or {kickstart} autoinstallation profiles by hand. {suse} provides templates of {ay} installation files that you can use as a starting point for your own custom files. You will find them at https://github.com/SUSE/manager-build-profiles.
If you are using {ay} to install SLES, you also need to include this snippet:
<products config:type="list"> <listentry>SLES</listentry> </products>
-
For more on {ay}, see client-configuration:autoinst-profiles.adoc.
-
For more on {kickstart}, see client-configuration:autoinst-profiles.adoc, or refer to the Red Hat documentation for your installation.
-
In the {productname} {webui}, navigate to menu:Systems[Autoinstallation > Profiles] and click btn:[Upload Kickstart/AutoYaST File].
-
In the
Create Autoinstallation Profile
section, use these parameters:-
In the
Label
field, type a unique name for the profile. Use only letters, numbers, hyphens (-
), periods (.
), and underscores (_
), and ensure the name is longer than six characters. -
In the
Autoinstall Tree
field, select the autoinstallable distribution you created earlier. -
In the
Virtualization Type
field, select the relevant Guest type (for example,KVM Virtualized Guest
. Do not chooseXen Virtualized Host
here. -
OPTIONAL: If you want to manually create your autoinstallation profile, you can type it directly into the
File Contents
field. If you have a file already created, leave theFile Contents
field blank. -
In the
File to Upload
field, click btn:[Choose File], and use the system dialog to select the file to upload. If the file is successfully uploaded, the filename is shown in theFile to Upload
field. -
The contents of the uploaded file is shown in the
File Contents
field. If you need to make edits, you can do so directly.
-
-
Click btn:[Create] to save your changes and store the profile.
When you have created an autoinstallation profile, you can edit it by navigating to menu:Systems[Autoinstallation > Profiles] and selecting the profile you want to edit. Make the desired changes and save your settings by clicking btn:[Create].
Important
|
If you change the |
When you install VM guests automatically, they are not registered to {productname}. If you want your guests to be automatically registered as soon as they are installed, you can add a section to the autoinstallation profile that invokes a bootstrap script, and registers the guests.
This section gives instructions for adding a bootstrap script to an existing {ay} profile.
For more information about creating a bootstrap script, see client-configuration:registration-bootstrap.adoc. For instructions on how to do this for {kickstart}, refer to the Red Hat documentation for your installation.
-
Ensure your bootstrap script contains the activation key for the VM guests you want to register with it, and that is located on the host at
/srv/www/htdocs/pub/bootstrap_vm_guests.sh
. -
In the {productname} {webui}, navigate to menu:Systems[Autoinstallation > Profiles], and select the {ay} profile to associate this script with.
-
In the
File Contents
field, add this snippet at the end of the file, immediately before the closing</profile>
tag. Ensure you replace the example IP address192.168.1.1
in the snippet with the correct IP address for your {productname} Server:<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>
-
Click menu:Update[] to save your changes.
Important
|
If your {ay} profile already contains a |
Once you have everything set up, you can start to autoinstall your VM guests.
Important
|
Each VM host can only install one guest at a time. If you are scheduling more than one autoinstallation, make sure you time them so that the next installation does not begin before the previous one has completed. If a guest installation starts while another one is still running, the running installation is canceled. |
-
In the {productname} {webui}, navigate to menu:Systems[Overview], and select the VM host you want to install guests on.
-
Navigate to the
Virtualization
tab, and theProvisioning
subtab. -
Select the autoinstallation profile you want to use, and specify a unique name for the guest.
-
Choose a proxy if applicable and enter a schedule.
-
To change the guest’s hardware profile and configuration options, click btn:[Advanced Options].
-
Click btn:[Schedule Autoinstallation and Finish] to complete.
You can use the {productname} {webui} to manage your VM Guests, including actions like shutting down, restarting, and adjusting CPU, and memory allocations.
To do this, you need your Xen or KVM VM host registered to the {productname} Server, and have the libvirtd
service running on the host.
For traditional clients, you also need the mgr-cfg-actions
package installed on your {productname} Server.
In the {productname} {webui}, navigate to menu:Systems[System List], and click on the VM host for the guests you want to manage.
Navigate to the Virtualization
tab to see all guests registered to this host, and access the management functions.
For more information on managing VM guests using the {webui}, see reference:systems/system-details/sd-virtualization.adoc.