Sunday, September 22, 2013

microsoft system center 2012 sp1 – used experience 3 vmm template

1.todo

添加、修改、删除套餐模板(参数为cpu,内存,硬盘等)

Add, modify, delete package template (parameter cpu, memory, hard drives, etc.)

2.appnix

New-SCApplicationProfile

The New-SCApplicationProfile cmdlet creates an application profile. Application profiles define the applications that will be installed during virtual machine deployment and servicing.

Add-SCOperatingSystem   

The Add-SCOperatingSystem cmdlet adds an operating system to an application profile object. Setting the operating system for an application profile determines which operating systems the profile is compatibile with. If no operating system is set, by default the profile is compatible with all operating systems.

Copy-SCVirtualHardDisk

The Copy-SCVirtualHarkDisk cmdlet copies a VMware virtual hard disk file (a .vmdk file) to a Windows-based virtual hard disk file (a .vhd file) and converts the virtual hard disk for use in a System Center Virtual Machine Manager (VMM) environment. The disk's contents are preserved by this copy operation.

VMware virtual hard disks, stored in .vmdk files, contain the virtual machine's guest operating system, applications, and data.

New-SCVMTemplate

The New-SCVMTemplate cmdlet creates a virtual machine template that administrators or self-service users can use to create virtual machines managed by System Center Virtual Machine Manager (VMM). A template stores hardware configuration and guest operating system information so that a specific template can be used repeatedly to create new virtual machines. The New-SCVMTemplate cmdlet stores the new template object in the VMM library.

You can create a template based on an existing virtual hard disk, an existing template, or from a virtual machine currently deployed on a virtual machine host. If you specify no parameters, VMM creates a default template object.

3.code

3.1 add one new application profile (添加应用程序配置)

$AppProfile = New-SCApplicationProfile -Name "SvcWebAppProfile01" -Owner "Contoso\Katarina"

3.2 add one operation system (添加操作系统配置)

$AppProfile = Get-SCApplicationProfile -Name "SvcWebAppProfile01"
$OS = Get-SCOperatingSystem -VMMServer "VMMServer01.Contoso.com" | where {$_.Name -eq "64-bit edition of Windows Server 2008 R2 Enterprise"}
Add-SCOperatingSystem -ApplicationProfile $AppProfile -OperatingSystem $OS

3.3 create vm template (添加)

$OS = Get-SCOperatingSystem -VMMServer "VMMServer01.Contoso.com" | where {$_.Name -eq "64-bit Edition of Windows Server 2008 R2 Datacenter"}
$VHD = Get-SCVirtualHardDisk -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -eq "VHD01.vhd" -and $_.LibraryServer.Name -eq "LibServer01.Contoso.com" }
New-SCVMTemplate -Name "VMTemplate01" -VirtualHardDisk $VHD -OperatingSystem $OS –NoCustomization

4.ask – answer


Creating Linux VM Templates with System Center 2012 SP1 – Virtual Machine Manager

No comments: