SlideShare a Scribd company logo
SUSE Linux Enterprise Server - Rapid Deployment of Instances
1
Satheesh Thomas
Guide to Clone SLES
Instances for Quick
Deployments
Satheesh Thomas – satheeshthomas@in.ibm.com
SUSE Linux Enterprise Server - Rapid Deployment of Instances
2
Satheesh Thomas
Contents
Introduction......................................................................................................................... 3
Deployment Scenarios ........................................................................................................ 3
Gold Image Preparation ...................................................................................................... 3
Deploy New Instance – Flash Copy Method ...................................................................... 5
Deploy New Instance – LVM & VSCSI Method ............................................................... 5
Reset RMC configuration & SSH Keys.............................................................................. 6
References........................................................................................................................... 6
SUSE Linux Enterprise Server - Rapid Deployment of Instances
3
Satheesh Thomas
Introduction
Different methods are available for deploying SLES instances. Cloud manager, auto-
mation tools, autoyast are some of them. Usually a gold copy of instance is created
with all required software packages and this image is replicated to new LPARs.
Autoyast or other tools require additional configurations including setting up install
servers or management servers etc. before images can be replicated to new LPARs.
This document describes a different approach to clone the gold copy without the need
for any install servers and by using minimal efforts for faster deployments
Deployment Scenarios
This method can be used in any of the following scenarios
 LPAR Boot disk is SAN based and Storage Copy Services are enabled (Flash
Copy)
 LPAR Boot disk is VSCSI and backing device is a Logical Volume in VIOS
Note: Unlike the other automation tools where post deployment configurations can be
automated or can be part of the deployment process itself, this method require manual
efforts for post implementation configurations like IP Address and other system
changes
Note: Ensure that the Gold image LPAR’s IP address is down during new de-
ployments unless gold image network config file is edited for new VM build.
The cloned image will have same IP address and can cause undesirable ef-
fects due to IP duplication
The methods are tested on the following cases
SLES 11 SP4
IBM Storvise V5010 storage used for SAN boot with NPIV virtualization
VSCSI based deployment using interval SAS disks on VIOS
Gold Image Preparation
Prepare an existing SLES instance as a gold image for deployment. This can be a new
install using traditional methods.
The following activities to be performed during initial setup only.
OS Preparation
 Tune the instance as per IBM best practices (multipath, I/O scheduler, LVM
filter, ulimit etc.)
 Install additional packages (IBM Tools, Additional bundles, Application related
files etc.)
 Configure required servers (NTP, DNS etc.)
 Delete or clean up log files
SUSE Linux Enterprise Server - Rapid Deployment of Instances
4
Satheesh Thomas
Boot Devices
 Configure boot device to use by-name and root devices to use UUID
o Root device change is not required if LVM is used for root
 Modify /etc/lilo.conf and change boot device from by-id to by-name represen-
tation
 Edit /etc/lilo.conf, making the root line correspond to the device UUID, and the
boot line correspond to the device name.
The following example shows what the lines may look like before you edit them:
boot = /dev/disk/by-id/scsi-360050768028180ee380000000000603c-part1
In this example, you would change those lines so they refer to the specific device
names, as follows:
boot = /dev/sda1
Sample /etc/lilo.conf
 Run lilo command
 Run mkinitrd command
Network Devices
 Change the network device rule file so that new image will create network
adapter as eth0. Otherwise cloned images will create a new network device like
eth1
 Edit /etc/udev/rules.d/70-persistent-net.rules and remove HW address binding
to eth0 as follows
SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{ad-
dress}=="ea:8e:37:f5:11:0c",ATTR{dev_id}=="0x0",ATTR{type}=="1",
KERNEL=="eth*",NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{ad-
dress}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KER-
NEL=="eth*", NAME="eth0"
IP Address Change (Optional) – Changes must be undone
This change must be made every time before deploying a new VM. If omitted cloned
LPAR will be activated with the same IP as of Gold Image LPAR
 Edit /etc/sysconfig/network file and change IP address to the desired IP address
SUSE Linux Enterprise Server - Rapid Deployment of Instances
5
Satheesh Thomas
Hostname Change (Optional) - Changes must be undone
Update hostname for new VM
 Update /etc/hosts file and /etc/HOSTNAME file
Deploy New Instance – Flash Copy Method
Complete the following pre-requisites for Flash Copy base deployment
 Create a new LPAR
 Complete NPIV mappings
 Complete SAN Zoning for new LPAR
Deploy the new LPARs by
 Take flash copy of the gold image disk using Storage GUI or CLI methods with
auto delete option
 Assign flash copy disk to the new LPAR
 Boot the LPAR
 Select boot device and set bootlist in SMS in case LPAR is not detecting the
boot disk automatically
Perform post deployment validation
 Set IP address and hostname (if required)
 Reboot and validate
Note: Flash Copy creation and attaching the Flash Copy is out of scope of this
document
Deploy New Instance – LVM & VSCSI Method
This method is used for environments where Logical volumes are used as backing
device for client rootvg disks. They use VSCSI Mappings on VIOS. In this scenario the
Gold Image LPAR is also booted on a LVM backed device and the new LPAR boot device
will be created on the same volume group as of the gold image rootvg disk
This method is most suited for new deployments since this require downtime for the
Gold Image LPAR and the LVM copy process is relatively slow
Complete the following pre-requisites for new deployment
 Create a new LPAR
Prepare the Gold Image LPAR for Copy
 Shutdown the Gold Image LPAR
 Detach / Remove vhost mapping rootvg disk of Gold Image LPAR
SUSE Linux Enterprise Server - Rapid Deployment of Instances
6
Satheesh Thomas
 Ensure volume group is having sufficient space to accommodate the new disk
 Initiate LVM copy using cplv
In this example a new LV name dr-ecpr_root will be created by copying from
LV dr-bwep_root
 Map the new LV to the new LPAR created
 Boot the LPAR
 Select boot device and set bootlist in SMS in case LPAR is not detecting the
boot disk automatically
 Re-Map rootvg disk of Gold Image LPAR and boot Gold Image LPAR (After all
deployments completed)
Perform post deployment validation
 Set IP address and hostname (if required)
 Reboot and validate
Reset RMC configuration & SSH Keys
Reconfigure RMC and recreate SSH Keys after the new VM is created
 Reset RMC by running /usr/sbin/rsct/install/recfgct
Cloud-init for automating post implementation
Activation engine and cloud-init are technologies that take user input and configure
the operating system and software on deployed virtual machines. Cloud-init is a script
that enables virtual machine activation and initialization, and is widely used for Open-
Stack.
Follow the below steps for cloud-init based deployment
 Complete pre-capture preparation on the gold image LPAR such as
o deleting or cleaning up log files
o change the devices so that they are mounted by UUID (Refer: Boot
Devices section above)
 Install the appropriate cloud-init RPM on the Gold Image VM
SUSE Linux Enterprise Server - Rapid Deployment of Instances
7
Satheesh Thomas
SUSE Linux 11: cloud-init-0.7.4-2.4.ppc64.rpm
SUSE Linux 12: cloud-init-0.7.5-8.10.ppc64le.rpm
Download cloud-init and its dependencies from
ftp://ftp.unicamp.br/pub/linuxpatch/cloud-init-ppc64/sles11/
Note: These are PowerVC version of the RPM.
 Modify the cloud.cfg file available at /etc/cloud/cloud.cfg with the following val-
ues:
Remove the following field:
users: -root
Add the following fields:
ssh_pwauth: true
ssh_deletekeys: true
disable_ec2_metadata: True
datasource_list: ['ConfigDrive']
Run the following commands.
chkconfig -s cloud-init-local on
chkconfig -s cloud-init on
chkconfig -s cloud-config on
chkconfig -s cloud-final on
Cloud-init is a script that enables virtual machine activation and initialization, and is widely
used for OpenStack Cloud-init is a script that enables virtual machine activation and ini-
tialization, and is widely used for OpenStackCloud-init is widely used in OpenStack.
Cloud-init is the Reconfigure RMC and recreate SSH Keys after the new VM is created
References
References used in this document given below
Changing devices to be mounted by UUID (SUSE Linux only) -
https://www.ibm.com/support/knowledgecenter/en/SSXK2N_1.2.3/com.ibm.powerv
c.standard.help.doc/powervc_changing_devices_hmc.html
Cloned machine does not boot up properly -
SUSE Linux Enterprise Server - Rapid Deployment of Instances
8
Satheesh Thomas
https://www.novell.com/support/kb/doc.php?id=3048119
How to rename Ethernet devices through udev
https://www.novell.com/support/kb/doc.php?id=3012993

More Related Content

PDF
Deploying an open source private cloud on a shoe string budget presentation
PDF
Freenas Tutorial EuroBSDCon 2012
PDF
Installing and Configuring Domino 10 on CentOS 7
PDF
Domino9on centos6
PDF
Fedora Atomic Workshop handout for Fudcon Pune 2015
DOCX
BASSET_README
PDF
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
PDF
Oracle11g On Fedora14
Deploying an open source private cloud on a shoe string budget presentation
Freenas Tutorial EuroBSDCon 2012
Installing and Configuring Domino 10 on CentOS 7
Domino9on centos6
Fedora Atomic Workshop handout for Fudcon Pune 2015
BASSET_README
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
Oracle11g On Fedora14

What's hot (19)

PDF
Freeradius edir
DOCX
Component pack 6006 install guide
PDF
Instalar MySQL CentOS
PDF
Installation CentOS 6.3
DOCX
Installation of ESX Server
PDF
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
PDF
Habilitar repositorio EPEL RHEL
PDF
Install Solaris 11.1 on a Virtualbox VM
KEY
the NML project
PDF
Connect Amazon EC2 Linux Instance
PDF
Netxms install guide
PDF
SystemD Usage Guide
PDF
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7
PDF
Star wind iscsi-san-software-handson-review-1-eng
PDF
Command reference nos-v3_5
PDF
How To Install OpenFire in CentOS 7
PDF
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
PDF
Oracle 12c r1 installation on solaris 11.1
PDF
How To Install and Configure AWS CLI on RHEL 7
Freeradius edir
Component pack 6006 install guide
Instalar MySQL CentOS
Installation CentOS 6.3
Installation of ESX Server
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Habilitar repositorio EPEL RHEL
Install Solaris 11.1 on a Virtualbox VM
the NML project
Connect Amazon EC2 Linux Instance
Netxms install guide
SystemD Usage Guide
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7
Star wind iscsi-san-software-handson-review-1-eng
Command reference nos-v3_5
How To Install OpenFire in CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
Oracle 12c r1 installation on solaris 11.1
How To Install and Configure AWS CLI on RHEL 7
Ad

Similar to Guide to clone_sles_instances (20)

PPTX
Open stack implementation
ODP
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
PDF
Dru lavigne servers-tutorial
ODP
System Imager.20051215
PDF
Volume Encryption In CloudStack
ODP
Practical Tips for Novell Cluster Services
PPTX
Salt Cloud vmware-orchestration
PPTX
Presentation linux on power
DOCX
Kl 031.30 eng_class_setup_guide_1.2
PDF
Installation
PDF
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
PDF
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
PPTX
Baylisa - Dive Into OpenStack
PDF
Oracle api gateway installation as cluster and single node
PDF
grate techniques
PDF
Your first dive into systemd!
PDF
Xen time machine
PDF
Introduction to Stacki - World's fastest Linux server provisioning Tool
ODP
X64 Workshop Linux Information Gathering
PDF
Bare Metal to OpenStack with Razor and Chef
Open stack implementation
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Dru lavigne servers-tutorial
System Imager.20051215
Volume Encryption In CloudStack
Practical Tips for Novell Cluster Services
Salt Cloud vmware-orchestration
Presentation linux on power
Kl 031.30 eng_class_setup_guide_1.2
Installation
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Baylisa - Dive Into OpenStack
Oracle api gateway installation as cluster and single node
grate techniques
Your first dive into systemd!
Xen time machine
Introduction to Stacki - World's fastest Linux server provisioning Tool
X64 Workshop Linux Information Gathering
Bare Metal to OpenStack with Razor and Chef
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Electronic commerce courselecture one. Pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Electronic commerce courselecture one. Pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Big Data Technologies - Introduction.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Teaching material agriculture food technology
Cloud computing and distributed systems.

Guide to clone_sles_instances

  • 1. SUSE Linux Enterprise Server - Rapid Deployment of Instances 1 Satheesh Thomas Guide to Clone SLES Instances for Quick Deployments Satheesh Thomas – satheeshthomas@in.ibm.com
  • 2. SUSE Linux Enterprise Server - Rapid Deployment of Instances 2 Satheesh Thomas Contents Introduction......................................................................................................................... 3 Deployment Scenarios ........................................................................................................ 3 Gold Image Preparation ...................................................................................................... 3 Deploy New Instance – Flash Copy Method ...................................................................... 5 Deploy New Instance – LVM & VSCSI Method ............................................................... 5 Reset RMC configuration & SSH Keys.............................................................................. 6 References........................................................................................................................... 6
  • 3. SUSE Linux Enterprise Server - Rapid Deployment of Instances 3 Satheesh Thomas Introduction Different methods are available for deploying SLES instances. Cloud manager, auto- mation tools, autoyast are some of them. Usually a gold copy of instance is created with all required software packages and this image is replicated to new LPARs. Autoyast or other tools require additional configurations including setting up install servers or management servers etc. before images can be replicated to new LPARs. This document describes a different approach to clone the gold copy without the need for any install servers and by using minimal efforts for faster deployments Deployment Scenarios This method can be used in any of the following scenarios  LPAR Boot disk is SAN based and Storage Copy Services are enabled (Flash Copy)  LPAR Boot disk is VSCSI and backing device is a Logical Volume in VIOS Note: Unlike the other automation tools where post deployment configurations can be automated or can be part of the deployment process itself, this method require manual efforts for post implementation configurations like IP Address and other system changes Note: Ensure that the Gold image LPAR’s IP address is down during new de- ployments unless gold image network config file is edited for new VM build. The cloned image will have same IP address and can cause undesirable ef- fects due to IP duplication The methods are tested on the following cases SLES 11 SP4 IBM Storvise V5010 storage used for SAN boot with NPIV virtualization VSCSI based deployment using interval SAS disks on VIOS Gold Image Preparation Prepare an existing SLES instance as a gold image for deployment. This can be a new install using traditional methods. The following activities to be performed during initial setup only. OS Preparation  Tune the instance as per IBM best practices (multipath, I/O scheduler, LVM filter, ulimit etc.)  Install additional packages (IBM Tools, Additional bundles, Application related files etc.)  Configure required servers (NTP, DNS etc.)  Delete or clean up log files
  • 4. SUSE Linux Enterprise Server - Rapid Deployment of Instances 4 Satheesh Thomas Boot Devices  Configure boot device to use by-name and root devices to use UUID o Root device change is not required if LVM is used for root  Modify /etc/lilo.conf and change boot device from by-id to by-name represen- tation  Edit /etc/lilo.conf, making the root line correspond to the device UUID, and the boot line correspond to the device name. The following example shows what the lines may look like before you edit them: boot = /dev/disk/by-id/scsi-360050768028180ee380000000000603c-part1 In this example, you would change those lines so they refer to the specific device names, as follows: boot = /dev/sda1 Sample /etc/lilo.conf  Run lilo command  Run mkinitrd command Network Devices  Change the network device rule file so that new image will create network adapter as eth0. Otherwise cloned images will create a new network device like eth1  Edit /etc/udev/rules.d/70-persistent-net.rules and remove HW address binding to eth0 as follows SUBSYSTEM=="net",ACTION=="add",DRIVERS=="?*",ATTR{ad- dress}=="ea:8e:37:f5:11:0c",ATTR{dev_id}=="0x0",ATTR{type}=="1", KERNEL=="eth*",NAME="eth0" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{ad- dress}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KER- NEL=="eth*", NAME="eth0" IP Address Change (Optional) – Changes must be undone This change must be made every time before deploying a new VM. If omitted cloned LPAR will be activated with the same IP as of Gold Image LPAR  Edit /etc/sysconfig/network file and change IP address to the desired IP address
  • 5. SUSE Linux Enterprise Server - Rapid Deployment of Instances 5 Satheesh Thomas Hostname Change (Optional) - Changes must be undone Update hostname for new VM  Update /etc/hosts file and /etc/HOSTNAME file Deploy New Instance – Flash Copy Method Complete the following pre-requisites for Flash Copy base deployment  Create a new LPAR  Complete NPIV mappings  Complete SAN Zoning for new LPAR Deploy the new LPARs by  Take flash copy of the gold image disk using Storage GUI or CLI methods with auto delete option  Assign flash copy disk to the new LPAR  Boot the LPAR  Select boot device and set bootlist in SMS in case LPAR is not detecting the boot disk automatically Perform post deployment validation  Set IP address and hostname (if required)  Reboot and validate Note: Flash Copy creation and attaching the Flash Copy is out of scope of this document Deploy New Instance – LVM & VSCSI Method This method is used for environments where Logical volumes are used as backing device for client rootvg disks. They use VSCSI Mappings on VIOS. In this scenario the Gold Image LPAR is also booted on a LVM backed device and the new LPAR boot device will be created on the same volume group as of the gold image rootvg disk This method is most suited for new deployments since this require downtime for the Gold Image LPAR and the LVM copy process is relatively slow Complete the following pre-requisites for new deployment  Create a new LPAR Prepare the Gold Image LPAR for Copy  Shutdown the Gold Image LPAR  Detach / Remove vhost mapping rootvg disk of Gold Image LPAR
  • 6. SUSE Linux Enterprise Server - Rapid Deployment of Instances 6 Satheesh Thomas  Ensure volume group is having sufficient space to accommodate the new disk  Initiate LVM copy using cplv In this example a new LV name dr-ecpr_root will be created by copying from LV dr-bwep_root  Map the new LV to the new LPAR created  Boot the LPAR  Select boot device and set bootlist in SMS in case LPAR is not detecting the boot disk automatically  Re-Map rootvg disk of Gold Image LPAR and boot Gold Image LPAR (After all deployments completed) Perform post deployment validation  Set IP address and hostname (if required)  Reboot and validate Reset RMC configuration & SSH Keys Reconfigure RMC and recreate SSH Keys after the new VM is created  Reset RMC by running /usr/sbin/rsct/install/recfgct Cloud-init for automating post implementation Activation engine and cloud-init are technologies that take user input and configure the operating system and software on deployed virtual machines. Cloud-init is a script that enables virtual machine activation and initialization, and is widely used for Open- Stack. Follow the below steps for cloud-init based deployment  Complete pre-capture preparation on the gold image LPAR such as o deleting or cleaning up log files o change the devices so that they are mounted by UUID (Refer: Boot Devices section above)  Install the appropriate cloud-init RPM on the Gold Image VM
  • 7. SUSE Linux Enterprise Server - Rapid Deployment of Instances 7 Satheesh Thomas SUSE Linux 11: cloud-init-0.7.4-2.4.ppc64.rpm SUSE Linux 12: cloud-init-0.7.5-8.10.ppc64le.rpm Download cloud-init and its dependencies from ftp://ftp.unicamp.br/pub/linuxpatch/cloud-init-ppc64/sles11/ Note: These are PowerVC version of the RPM.  Modify the cloud.cfg file available at /etc/cloud/cloud.cfg with the following val- ues: Remove the following field: users: -root Add the following fields: ssh_pwauth: true ssh_deletekeys: true disable_ec2_metadata: True datasource_list: ['ConfigDrive'] Run the following commands. chkconfig -s cloud-init-local on chkconfig -s cloud-init on chkconfig -s cloud-config on chkconfig -s cloud-final on Cloud-init is a script that enables virtual machine activation and initialization, and is widely used for OpenStack Cloud-init is a script that enables virtual machine activation and ini- tialization, and is widely used for OpenStackCloud-init is widely used in OpenStack. Cloud-init is the Reconfigure RMC and recreate SSH Keys after the new VM is created References References used in this document given below Changing devices to be mounted by UUID (SUSE Linux only) - https://www.ibm.com/support/knowledgecenter/en/SSXK2N_1.2.3/com.ibm.powerv c.standard.help.doc/powervc_changing_devices_hmc.html Cloned machine does not boot up properly -
  • 8. SUSE Linux Enterprise Server - Rapid Deployment of Instances 8 Satheesh Thomas https://www.novell.com/support/kb/doc.php?id=3048119 How to rename Ethernet devices through udev https://www.novell.com/support/kb/doc.php?id=3012993