Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

11 Virtualization

SUSE Manager 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 SUSE Manager. VM Guests registered with SUSE Manager 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 SUSE Manager.

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.

Warning
Warning: Limitation to Xen and KVM Guests

Autoinstalling and managing VM Guests via SUSE Manager is limited to Xen and KVM guests. SUSE Manager 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 SUSE Manager.

11.1 Autoinstalling VM Guest s

With SUSE Manager 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 SUSE Manager.

11.1.1 Requirements on SUSE Manager

Setting up and managing VM Guest s with SUSE Manager 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 SUSE Manager , a bootstrap script is needed.

11.1.1.1 Activation Keys

Just like any other client, VM Host Server and VM Guest s need to be registered with SUSE Manager using activation keys. Find details on how to set up activation keys at Book “Getting Started”, Chapter 5 “Registering Clients”, 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.

VM Host ServerActivation Key: Minimum Requirements
  • Entitlements: Provisioning, Virtualization Platform.

  • Packages: rhn-virtualization-host , osad .

    If you want to manage the VM Host Server system from SUSE Manager (e.g. by executing remote scripts), the package rhncfg-actions needs to be installed as well.

11.1.1.2 Setting up an Autoinstallable Distribution

To autoinstall clients from SUSE Manager , 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 SUSE Manager 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:

RedHat / Generic RPM
  • images/pxeboot/vmlinuz

  • images/pxeboot/initrd.img

SUSE
  • boot/arch/loader/initrd

  • boot/arch/loader/linux

    • The Base Channel needs to match the autoinstallable distribution.

Important
Important: Autoinstallation package sources

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 Base Channel . 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).

Procedure: Creating Autoinstallable Distribution
  1. 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.

  2. Log in to the SUSE Manager Web UI} and navigate to Systems › Autoinstallation › Distributions › Create Distribution .

  3. Fill out the form Create Autoinstallable Distribution as follows:

    Distribution Label

    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.

    Tree Path

    Absolute local disk path to installation source. This field is mandatory.

    Base Channel

    Channel matching the installation source. This channel is the package source for non-SUSE installations. This field is mandatory.

    Installer Generation

    Operating system version matching the installation source. This field is mandatory.

    Kernel Options

    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.

    Post Kernel Options

    Options passed to the kernel when booting the installed system for the first time. This field is optional.

  4. Save your settings by clicking Create Autoinstallable Distribution .

To edit an existing Autoinstallable Distribution › ] , go to menu:Systems[Autoinstallation › Distributions and click on a Label › ] . Make the desired changes and save your settings by clicking menu:Update Autoinstallable Distribution[ .

11.1.1.3 Providing an Autoinstallation Profile

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 SUSE Manager and be edited afterwards. Kickstart profiles can also be created from scratch with SUSE Manager .

A minimalist AutoYaST profile including a script for registering the client with SUSE Manager 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.

11.1.1.4 SUSE Linux Enterprise 15 Systems

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 SUSE Manager:

  • 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

11.1.1.4.1 Uploading an Autoinstallation Profile
  1. Log in to the SUSE Manager Web interface and open Systems › Autoinstallation › Profiles › Upload New Kickstart/AutoYaST File .

  2. 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.

  3. Choose an Autoinstallable Tree › ] from the drop-down menu. If no menu:Autoinstallable Tree[ is available, you need to add an Autoinstallable Distribution. Refer to Section 11.1.1.2, “Setting up an Autoinstallable Distribution” for instructions.

  4. Choose a Virtualization Type › ] from the drop-down menu. KVM and Xen (para-virtualized and fully-virtualized) are available. Do not choose menu:Xen Virtualized Host[ here.

  5. Scroll down to the File to Upload › ] dialog › click menu:Browse[ to select it, then click Upload File .

  6. The uploaded file will be displayed in the File Contents section, where you can edit it.

  7. Click Create to store the profile.

To edit an existing profile, go to Systems › Autoinstallation › Profiles and click on a Label › ] . Make the desired changes and save your settings by clicking menu:Create[ .

Note
Note: Editing existing {kickstart}profiles

If you are changing the Virtualization Type › ] of an existing {kickstart} profile › it may also modify the bootloader and partition options › potentially overwriting any user customizations. Be sure to review the menu:Partitioning[ tab to verify these settings when changing the Virtualization Type .

11.1.1.4.2 Creating a Kickstart Profile
Note
Note

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”.

  1. Log in to the SUSE Manager Web interface and go to Systems › Autoinstallation › Profiles › Create New Kickstart File .

  2. Choose a unique name for the profile. The minimum length is 6 characters. This field is mandatory.

  3. Choose a Base Channel › ] . This channel is the package source for non-SUSE installations and must match the menu:Autoinstallable Tree[ . This field is mandatory.

  4. Choose an Autoinstallable Tree › ] from the drop-down menu. If no menu:Autoinstallable Tree[ is available, you need to add an Autoinstallable Distribution. Refer to Section 11.1.1.2, “Setting up an Autoinstallable Distribution” for instructions.

  5. Choose a Virtualization Type › ] from the drop-down menu. KVM and Xen (para-virtualized and fully-virtualized) are available. Do not choose menu:Xen Virtualized Host[ here.

  6. Click the Next button.

  7. Select the location of the distribution files for the installation of your VM Guest s. There should already be a Default Download Location › ] filled out and selected for you on this screen. Click the menu:Next[ button.

  8. Choose a root password for the VM Guest s. Click the Finish 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.

11.1.1.4.3 Adding a Registration Script to the Autoinstallation Profile

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.

  1. First, provide a bootstrap script on the SUSE Manager :

    • Create a bootstrap script for VM Guest s on the SUSE Manager as described in Book “Getting Started”, Chapter 5 “Registering Clients”, Section 5.4 “Registering Traditional Clients”, Section 5.4.1 “Generating a Bootstrap Script”.

    • Log in as root to the konsole of SUSE Manager 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).

  2. Log in to the SUSE Manager Web interface and go to Systems › Autoinstallation › Profiles . Click on the profile that is to be used for autoinstalling the VM Guest s to open it for editing.

    Scroll down to the File Contents 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 SUSE Manager 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>
    Important
    Important: Only one <scripts> section allowed

    If 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!

  3. Click Update to save the changes.

11.1.2 VM Host Server Setup

A VM Host Server system serving as a target for autoinstalling VM Guest s from SUSE Manager 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 SUSE Manager 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 SUSE Manager . 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 SUSE Manager .

  1. Make sure either KVM or Xen is properly set up.

  2. Make sure the libvirtd is running.

  3. Register the VM Host Server with SUSE Manager :

    • Create a bootstrap script on the SUSE Manager as described in Book “Getting Started”, Chapter 5 “Registering Clients”, Section 5.4 “Registering Traditional Clients”, 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 .

11.1.2.1 VM Host Server setup on Salt clients

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:

  1. From the System Details › Properties page, enable the Add-on System Type Virtualization Host and confirm with Update Properties.

  2. Schedule a Hardware Refresh. On the System Details › Hardware page click Schedule Hardware Refresh.

11.1.2.2 VM Host Server setup on Traditional clients

When the registration process is finished and all packages have been installed, enable the osad (Open Source Architecture Daemon). On SUSE Linux Enterprise Server 12 systems and later, it can be achieved by running the following commands as user root:

service rhnsd stop
service rhnsd disable
service osad enable
service osad start
Important
Important: osadTogether with rhnsd

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 SUSE Manager, this long interval ensures a certain level of load balancing since not all clients act on a scheduled action at the same time.

For setting the time interval, see <<[[bp.systems.management>>.

However, when managing VM Guests, you usually want actions like rebooting a VM Guest to be carried out immediately, which can be done by adding osad. The osad daemon receives commands over the jabber protocol from SUSE Manager 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).

11.1.3 Autoinstalling VM Guest s

When all requirements on the SUSE Manager and the VM Host Server are met, you can start to autoinstall VM Guests on the host. Note that VM Guests will not be automatically registered with SUSE Manager, 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 Guests need to be registered to manage them with SUSE Manager. Proceed as follows to autoinstall a VM Guest:

Important
Important: No parallel Autoinstallations on VM Host Server

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 SUSE Manager 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.

  1. Log in to the SUSE Manager Web interface and click the Systems tab.

  2. Click the VM Host Server 's name to open its System Status page.

  3. Open the form for creating a new VM Guest by clicking Virtualization › Provisioning . 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 Advanced Options .

  4. Finish the configuration by clicking Schedule Autoinstallation and Finish › ] . The menu:Session Status[ page opens for you to monitor the autoinstallation process.

Note
Note: Checking the Installation Log

To view the installation log, click Events › History on the Session Status › ] page. On the menu:System History Event[ page you can click a Summary entry to view a detailed log.

In case an installation has failed, you can Reschedule 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 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.

11.2 Managing VM Guest s

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 SUSE Manager 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 SUSE Manager.

In addition, if you want to see the profile of the VM Guest, install packages, etc., you must also register it with SUSE Manager.

All actions can be triggered in the SUSE Manager Web UI from the Virtualization › ] page of the VM Host Server . Navigate to this page by clicking the menu:Systems[ tab. On the resulting page, click the VM Host Server 's name and then on Virtualization . This page lists all VM Guest s for this host, known to SUSE Manager .

11.2.1 Displaying a VM Guest 's Profile

Click the name of a VM Guest on the VM Host Server 's Virtualization page to open its profile page with detailed information about this guest. For details, refer to Book “Reference Manual”, 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).

11.2.2 Starting, Stopping, Suspending and Resuming a VM Guest

To start, stop, restart, suspend, or resume a VM Guest , navigate to the VM Host Server 's Virtualization › ] page. Check one or more menu:Guests[ listed in the table and scroll down to the bottom of the page. Choose an action from the drop-down list and click Apply Action › ] . menu:Confirm[ the action on the next page.

Note
Note: Automatically restarting a VM Guest

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 SUSE Manager . Refer to your KVM or Xen documentation. Alternatively, you may use libvirt to enable automatic reboots.

11.2.3 Changing the CPU or RAM allocation of a VM Guest

To change the CPU or RAM allocation of a VM Guest navigate to the VM Host Server 's Virtualization › ] page. Check one or more menu:Guests[ from the table and scroll down to the bottom of the page. Choose an action from the Set › ] drop-down list and provide a new value. Confirm with menu:Apply Changes[ followed by Confirm .

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.

11.2.4 Deleting a VM Guest

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 Delete Systems › ] followed by menu:Apply Action[ and Confirm .

Print this page