SUSE Manager allows you to autoinstall and manage Xen and KVM{vmguest} s 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 Guest s registered with SUSE Manager can be managed like “regular” machines. In addition, basic VM Guest management 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 read-only.
Autoinstalling and managing VM Guest
s 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 Guest
s, but cannot be managed from within SUSE Manager
.
With SUSE Manager you can automatically deploy Xen and KVM{vmguest} s using AutoYaST or Kickstart profiles. It is also possible to automatically register the VM Guest s, so they can immediately be managed by 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.
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 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 SUSE Manager
(e.g.
by executing remote scripts), the package rhncfg-actions
needs to be installed as well.
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:
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 SUSE Manager Web interface 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 , go to › › and click on a . Make the desired changes and save your settings by clicking .
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.
Log in to the SUSE Manager 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 from the drop-down menu. If no 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 from the drop-down menu. KVM and Xen (para-virtualized and fully-virtualized) are available. Do not choose here.
Scroll down to the dialog, click 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 . Make the desired changes and save your settings by clicking .
If you are changing the of an existing Kickstart profile, it may also modify the bootloader and partition options, potentially overwriting any user customizations. Be sure to review 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.3.1, “Uploading an Autoinstallation Profile”.
Log in to the SUSE Manager 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 channel is the package source for non-SUSE installations and must match the . This field is mandatory.
Choose an from the drop-down menu. If no 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 from the drop-down menu. KVM and Xen (para-virtualized and fully-virtualized) are available. Do not choose here.
Click the button.
Select the location of the distribution files for the installation of your VM Guest s. There should already be a filled out and selected for you on this screen. Click the 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 SUSE Manager :
Create a bootstrap script for VM Guest s on the SUSE Manager as described in 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).
Log in to the SUSE Manager 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 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><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 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
.
Make sure either KVM or Xen is properly set up.
Make sure the libvirtd is running.
Register the VM Host Server with SUSE Manager :
Create a bootstrap script on the SUSE Manager 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 .
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 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.
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 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).
+
Once all requirements on the SUSE Manager 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 SUSE Manager , therefore we strongly recommend to modify the autoinstallation profile as described in Section 11.1.1.3.3, “Adding a Registration Script to the Autoinstallation Profile”. VM Guest s need to be registered to manage them with SUSE Manager . 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 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.
Log in to the SUSE Manager 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 . The page opens for you to monitor the autoinstallation process.
To view the installation log, click › on the page. 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 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 and VM Guest must be registered with SUSE Manager .
All actions can be triggered in the SUSE Manager Web interface from the page of the VM Host Server . Navigate to this page by clicking 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 SUSE Manager .
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 Section 7.1, “Overview Conventions”.
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 page. Check one or more 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 SUSE Manager
.
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 page. Check one or more from the table and scroll down to the bottom of the page. Choose an action from the drop-down list and provide a new value. Confirm with 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 followed by and .