Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.



Similar documents
Linux Template Creation Guide. How to build your own Linux VM templates for deployment in Cloudturk.

Linux - CentOS 6 Install Guide

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

PARALLELS SERVER 4 BARE METAL README

IT6204 Systems & Network Administration. (Optional)

Oracle VM Server Recovery Guide. Version 8.2

How to install software on VMware ESXi 4.0/4.1

Partek Flow Installation Guide

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

Server Installation/Upgrade Guide

How to Restore a Linux Server Using Bare Metal Restore

SUSE Cloud Installation: Best Practices Using an Existing SMT and KVM Environment

PARALLELS SERVER BARE METAL 5.0 README

Red Hat Certifications: Red Hat Certified System Administrator (RHCSA)

Linux System Administration on Red Hat

Preparing for the Installation

ServerPronto Cloud User Guide

Cloud Server. Parallels. Key Features and Benefits. White Paper.

How to Install Windows on Xen TM 3.0

Operating System Installation Guide

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

How to Use? SKALICLOUD DEMO

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Parallels Server Bare Metal 5.0

SUSE Cloud Installation: Best Practices Using a SMT, Xen and Ceph Storage Environment

ThinkServer RD540 and RD640 Operating System Installation Guide

II. Installing Debian Linux:

PowerPanel Business Edition Installation Guide

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

CS197U: A Hands on Introduction to Unix

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

readme_asm.txt README.TXT

Moving to Plesk Automation 11.5

QuickDNS 4.6 Installation Instructions

Parallels Virtuozzo Containers 4.7 for Linux

VMTurbo Operations Manager 4.5 Installing and Updating Operations Manager

Virtualization Management the ovirt way

Quick Start Guide for VMware and Windows 7

Migrating to ESXi: How To

How to Backup XenServer VM with VirtualIQ

Land Information New Zealand (LINZ) SALT Database. Migration from original hardware to virtualised hardware: Process Documentation

Plexxi Control Installation Guide Release 2.1.0

Required Virtual Interface Maps to... mgmt0. virtual network = mgmt0 wan0. virtual network = wan0 mgmt1. network adapter not connected lan0

Using Red Hat Enterprise Linux with Georgia Tech's RHN Satellite Server Installing Red Hat Enterprise Linux

Backup of ESXi Virtual Machines using Affa

Abstract. Microsoft Corporation Published: November 2011

13.1 Backup virtual machines running on VMware ESXi / ESX Server

QuickStart Guide for Managing Computers. Version 9.2

Migrating LAMP stack from x86 to Power using the Server Consolidation Tool

Team Foundation Server 2010, Visual Studio Ultimate 2010, Team Build 2010, & Lab Management Beta 2 Installation Guide

Operating System Installation Guidelines

Reboot the ExtraHop System and Test Hardware with the Rescue USB Flash Drive

Team Foundation Server 2012 Installation Guide

Ahsay Offsite Backup Server and Ahsay Replication Server

Installing Microsoft SQL Server Linux ODBC Driver For Use With Kognitio Analytical Platform

Using VMware Player. VMware Player. What Is VMware Player?

Required Virtual Interface Maps to... mgmt0. bridge network interface = mgmt0 wan0. bridge network interface = wan0 mgmt1

Local Caching Servers (LCS): User Manual

Configuring Virtual Blades

Preparation Guide. How to prepare your environment for an OnApp Cloud v3.0 (beta) deployment.

October Gluster Virtual Storage Appliance User Guide

Linux Integration Services 3.4 for Hyper-V Readme

Installation Guide for FTMS and Node Manager 1.6.0

Virtuozzo 7 Technical Preview - Virtual Machines Getting Started Guide

USB 2.0 Flash Drive User Manual

RedHat (RHEL) System Administration Course Summary

Parallels Cloud Server 6.0 Readme

About This Document 3. About the Migration Process 4. Requirements and Prerequisites 5. Requirements... 5 Prerequisites... 5

Implementing Red Hat Enterprise Linux 6 on HP ProLiant servers

Xen Virtualization Software

Retrospect 7.7 User s Guide Addendum

RHCSA 7RHCE Red Haf Linux Certification Practice

Advanced Linux System Administration on Red Hat

Parallels Cloud Server 6.0

Lenovo ThinkServer Solution For Apache Hadoop: Cloudera Installation Guide

Parallels Cloud Server 6.0

Professional Xen Visualization

The Linux System. o Updating without touching the user's files and configurations.

Oracle VM Manager Template. An Oracle White Paper February 2009

Parallels Cloud Server 6.0

Syncplicity On-Premise Storage Connector

How To Migrate To Redhat Enterprise Linux 4

IBM Cloud Manager with OpenStack

Installation Guide. Copyright (c) 2015 The OpenNMS Group, Inc. OpenNMS SNAPSHOT Last updated :19:20 EDT

Options in Open Source Virtualization and Cloud Computing. Andrew Hadinyoto Republic Polytechnic

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

Cautions When Using BitLocker Drive Encryption on PRIMERGY

Understanding MySQL storage and clustering in QueueMetrics. Loway

NETFORT LANGUARDIAN INSTALLING LANGUARDIAN ON MICROSOFT HYPER V

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

OS Installation Guide Red Hat Linux 9.0

Cloud Implementation using OpenNebula

ThinkServer RD550 and RD650 Operating System Installation Guide

Author A.Kishore/Sachin VNC Background

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

Acronis Backup & Recovery 10 Advanced Server SBS Edition. Installation Guide

Transcription:

Windows Template Creation Guide How to build your own Windows VM templates for deployment in Cloudturk.

TABLE OF CONTENTS 1. Preparing the Server... 2 2. Installing Windows... 3 3. Creating a Template... 4 4. Naming Conventions... 5 5. Generate Template SQL... 6 Appendix A: Installing Xen Hypervisor... 9 1

1. Preparing the Server To create a Windows VM template for Xen/KVM hypervisors you ll need a separate Open Source Xen 3/4 or KVM box on which to create your template. You can t create templates from scratch within Cloudturk! To prepare a physical box: 1. Install XEN or KVM hypervisor. For detailed instructions, refer to Appendix A. Installing XEN hypervisor of this document. 2. Install the latest version of Virtual Manager (see http://virtmanager.org/download.html) 3. Install ntfs 3g and ntfs fuse: # yum install fuse-ntfs-3g 4. Create Logical Volume Manager (LVM). There s a useful how to article here: http://www.walkernews.net/2007/07/02/how- to- create- linux- lvm- in- 3- minutes/ 5. Create disks using the LVM. Disk size depends on the version of Windows required for the template: Windows 2008: 20GB Windows 2003: 10GB 6. Using Virtual Manager, create a new virtual machine based on the partition created earlier in LVM. 2

2. Installing Windows The next step is installing Windows OS to the virtual machine we ve just created. To do so: 1. Add a DVD/CD ISO to the virtual machine you ve just created, and install the required Windows version. 2. Add the native Windows startup script to this VM: a. Go to Computer Settings > Windows Settings > Scripts (Startup/Shutdown) b. On the pane that appears, double- click Startup. c. Point the script to C:\cloudturk.bat For more detailed instructions, refer to the Microsoft documentation here: http://technet.microsoft.com/en- us/library/cc770556.aspx 3. If you re using Xen, install the Xen PV drivers and disable large sent offload for eth interface (see http://www.meadowcourt.org/downloads/). Skip this step for KVM. 4. Install SNMP services in a regular way. 5. Install Copssh into C:\cossh 6. Shut down your VM. The shutdown method depends on which version of Windows you just installed: Windows 2003/XP/2008 run sysprep in shutdown mode. See http://support.microsoft.com/kb/892778/en- us for details. Windows 2008R2 - shut down the VM in the normal way. 3

3. Creating a Template To create a Cloudturk Windows template, perform the following steps on your physical server: 1. Go to the location where you plan to store a template. 2. Run the following script to create a template from that node (see below for more details): echo "sh create-image 5 win03_x64_ent" echo kpartx -a /dev/vg0/lvol$1 mount -t ntfs-3g /dev/mapper/lvol$1p1 /mnt/l$1 rm -f /mnt/l$1/pagefile.sys umount /mnt/l$1 echo echo "Executing ntfsclone -s -o./$2.img /dev/mapper/lvol$1p1 " echo ntfsclone -s -O./$2.img /dev/mapper/lvol$1p1 echo echo kpartx -d /dev/vg0/lvol$1 dd if=/dev/vg0/lvol$1 of=./$2.img.mbr count=1 bs=512 tar -czvf $2.tar.gz $2.img $2.img.mbr cd - Where the highlighted parameters mean: /dev/vg0/lvol - the path to LVM 4

5 the number of the partition created in LVM. win03_x64_ent the name of the template you are creating with this script As a result, the.tar.gz archive will be created at the location where you run the script. The archive will include the.img and img.mbr files 4. Naming Conventions Cloudturk Windows templates should follow this naming convention: <DISTRIBUTION>_<ARCH>_<EDITION>[-SOFT][-TEMPLATEVERSION][- <VIRTUALIZATION>].tar.gz Required parameters: DISTRIBUTION - distribution short name and the version, e.g. WIN08 or WIN03 ARCH hardware platform (x64 or x86) EDITION Windows OS edition (STD Standard, ENT Enterprise, WEB web, PRO professional and DC Data center) Optional parameters: SOFT add this tag if you installed any additional software to the VM. TEMPLATEVERSION version of the current template (verx.x format) VIRTUALIZATION the virtualization platform the template is compatible with. Available value is kvm. If none specified, it means XEN is used. 5

Examples: win08_x64_std- ver2.1- kvm.img (Windows 2008 Standard Edition x64 for KVM, template version 2.1) win08_x86_std- ver2.2.img (Windows 2008 Standard Edition x86 for XEN, template version 2.2) 5. Generate Template SQL We have created a script to generate the SQL needed to add templates to the Cloudturk Control Panel. 1. Download the script: # wget http://templates.repo.cloudturk.com/generatecloudturk-templates-sql.sh 2. Run the script: For example, to get the SQL for Cloudturk CP version 2.3.2: # sh ~/generate-cloudturk-templates-sql.sh -v 2.3.2 -m SQL -d /data/templates/windows/ -t win08_x64_std_r2-ver3.1-kvm.img And the result will be: INSERT INTO `templates` (label, created_at, version, file_name, operating_system, operating_system_distro, allowed_swap, state, checksum, allow_resize_without_reboot, min_disk_size, template_size, operating_system_arch, operating_system_edition, operating_system_tail, allowed_hot_migrate, virtualization) VALUES ('Windows 2008 Standard Edition x86', NOW(), '3.1', 'win08_x64_std-ver3.1- kvm.img', 'windows','2008', 0, 'active', 6

'fe520abaff0b0fbe85b3a359c50e7027', 0, 20,'312468', 'x64', STD, R2, 0, 'kvm'); Where: label the optional template label version your template version file_name the file name of your template operating_system for Windows templates it would be windows operating_system_distro the particular distribution (2008 or 2003) allowed_swap there is no swap for Windows templates, so it is always 0 state active or inactive checksum the generated checksum. allow_resize_without_reboot 1 if the resize without reboot is allowed, otherwise 0 min_disk_size the amount of GB required for this template (20GB for Windows 2008, 10GB for Windows 2003) template_size the size of a template operating_system_arch x64 or x86 operating_system_edition this can be STD Standard, ENT Enterprise, WEB web, PRO - professional and DC Data center. operating_system_tail R2 if this is a Release 2 version, otherwise NULL allowed_hot_migrate 1 if hot migration is allowed, otherwise 0 virtualization for KVM this would be kvm (taken from the filename of the template in the script). If none specified in the filename, it means XEN is used and xen will be stated in the script output. 7

3. Insert the record generated into your database: Connect to your Control Panel server using SSH: ssh root@x.x.x.x (x.x.x.x stands for the server IP) Go to the directory where Cloudturk config file is located: cd /cloudturk/interface/config Find the database password and name: cat database.yml Log in as root to your database: mysql -u root -p [database name] Go to your database: use [database name]; Insert the record: INSERT INTO `templates` (label, created_at, version, file_name, operating_system, operating_system_distro, allowed_swap, state, checksum, allow_resize_without_reboot, min_disk_size, template_size, operating_system_arch, operating_system_edition, operating_system_tail, allowed_hot_migrate, virtualization) VALUES ('Windows 2008 Standard Edition x86', NOW(), '3.1', 'win08_x64_stdver3.1-kvm.img', 'windows', '2008', 0, 'active', 'fe520abaff0b0fbe85b3a359c50e7027', 0, 20, '312468', 'x64', STD, R2, 0, 'kvm') Press Enter. 4. Place the.img and img.mbr files to the location where you store templates. 8

Appendix A: Installing Xen Hypervisor Instructions for a basic Xen hypervisor installation: 1. Install OS for Xen Hypervisor: Cloudturk supports the following operating systems for Xen Hypervisor: CentOS release 5.x (x86_64) Red Hat Enterprise Linux Server release 5 (x86_64) 2. Partition the Xen hypervisor box: The disk can be partitioned any way you like, with one exception: you must create a separate partition with LVM. This will be used to deploy block devices as hard disks for virtual machines. 3. Install essential utilities on the Xen Hypervisor box: We recommend the following software is preinstalled on the Xen Hypervisor box: vim command- line editor. This guide uses vim in examples where files need to be edited. GNU tar utility and GNU zip archive tool. They are used to pack the template. X window system. We will use it to run some GUI applications. Apache web server. It will be used to run local distributive mirrors, and access KickStart files during installation. virt- manager. Not mandatory, but sometimes it makes creating VMs easier. vncviewer. Used for connecting to VMs via VNC. LVM utilities. All of them will be required while creating VMs and templates for Cloudturk. 4. Add YUM repository: An extra YUM repository is used to get the Xen Hypervisor installed manually. 9

Please download extra repository configuration file and place it into standard YUM repositories configuration files location (/etc/yum.repos.d/): # wget http://www.gitco.de/repo/gitco-xen3.4.3_x86_64.repo -O /etc/yum.repos.d/ GITCO-XEN3.4.3_x86_64.repo 5. Install Xen Hypervisor: a) Clean YUM meta- data: # yum -y -q clean all b) Remove old Xen if installed: # yum remove xen c) Install the latest Xen from GITCO: # yum install xen d) Remove i386 libvirt: # yum remove libvirt.i386 xen-libs.i386 e) Configure xend service to start on system boot: # chkconfig --add xend # chkconfig xend on f) Install Xen Hypervisor (Dom0) kernel: # yum install kernel-xen g) Verify the kernel- xen package is installed, and determine the version: 10

# rpm q kernel-xen h) Configure GRUB boot loader to use Xen kernel as default (check GRUB s configuration file): # vim /boot/grub/grub.conf It should look like the following image: The default option value must be the number of the title, which includes Xen kernel. There are two title sections on the image above: title CentOS (2.6.18-194.32.1.el5xen) title CentOS (2.6.18-194.32.1.el5) Titles are numbered starting from 0. So the first has number 0, and the second, number 1. The default option value should be the number of title with Xen kernel. In the example here it is number 0 (the first title). i) Reboot the box: 11

# shutdown r now j) Check if Xen Hypervisor is running when the box boots: # xm info If Xen is running, this should display a range of information about the system. 12