Sunday, September 29, 2013

android phonegap developer log

1.add one ad in phonegap in android

FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT);

params.gravity = Gravity.BOTTOM;

LinearLayout layout = super.root;
layout.addView(new AdView(this, AdSize.BANNER, AdMob_Ad_Unit),params);




see here:PhoneGap-Android-Native-AdMob


2.add one splashscreen in phonegap


when java onCreate

super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 10000);

when javascript hide splashscreen:

if(navigator.splashscreen)
navigator.splashscreen.hide();




see here: Splashscreen


3.java startActivity in phonegap

Intent intent = new Intent();
intent.setClassName(packageName, className);
startActivity(intent);

check has app:

public static Boolean hasApp(String packageName, String className) {
Boolean f = false;
try {
if ((null != className) && (className.length() > 0)) {
if (null != PkrssActivity.s_pkrss.getPackageManager().getPackageInfo(packageName, 0))
f = true;
return f;
}

try {
PackageInfo pi = PkrssActivity.s_pkrss.getPackageManager().getPackageInfo(packageName, 0);

Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null);
resolveIntent.addCategory(Intent.CATEGORY_LAUNCHER);
resolveIntent.setPackage(pi.packageName);

List<ResolveInfo> apps = PkrssActivity.s_pkrss.getPackageManager().queryIntentActivities(resolveIntent, 0);

ResolveInfo ri = apps.iterator().next();
if (ri != null) {
if (ri.activityInfo.name == className)
return true;
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {

}
return f;
}

Monday, September 23, 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.

New-SCHardwareProfile

The New-SCHardwareProfile cmdlet creates a hardware profile for use in System Center Virtual Machine Manager (VMM) that stores hardware configuration information. You can create a standalone hardware profile or customize a template or virtual machine to include hardware profile settings. New-SCHardwareProfile stores the new hardware profile object in the VMM library.

Set-SCVMTemplate

Changes one or more properties of a virtual machine template used in a System Center Virtual Machine Manager (VMM) environment.

Properties that you can change include settings for the name of the template, its description, owner, organization name, time zone, operating system, and product key; BIOS boot order; CPU number and characteristics; the amount memory on the host that is assigned to a virtual machine; the amount of bandwidth on the host's network available to a virtual machine; whether a virtual machine created with this template will be highly available (i.e., deployed on a host that is part of a host cluster); values for domain or workgroup as well as domain credentials; a point quota that specifies how many new virtual machines self-service users can create; custom fields; and other options.

Changes that you make to a template affect only the template. Changes do not affect any existing virtual machines that were previously created by using this template.

3.implement – code and result

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

code:

$AppProfile = New-SCApplicationProfile -Name "SvcWebAppProfile01" -Owner "cloud\administrator"

result:


image image




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


code:

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



Result,and above "SCVMM.cloud.com" is from bellow:

image 

3.3 create hardware profile (创建硬件配置)


code:

$HWProfile = New-SCHardwareProfile -Name "NewHWProfile01" -CPUCount 1 -MemoryMB 512 -CPUMax 100 -Owner "cloud\administrator" -HighlyAvailable $True
result:
image image 

3.4 create vm template (添加虚拟机模板)


code:

$OS = Get-SCOperatingSystem -VMMServer "SCVMM.cloud.com" | where {$_.Name -eq "64-bit Edition of Windows Server 2008 R2 Datacenter"}
$VHD = Get-SCVirtualHardDisk -VMMServer "SCVMM.cloud.com" | where { $_.Name -eq "empty-small.vhd" -and $_.LibraryServer.Name -eq "SCVMM.cloud.com" }
$HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
New-SCVMTemplate -Name "VMTemplate01" -VirtualHardDisk $VHD -OperatingSystem $OS –NoCustomization -HardwareProfile $HWProfile



result:

image image 

3.5 remove vm template (删除虚拟机模板)

$Template = Get-SCVMTemplate -VMMServer "SCVMM.cloud.com" | where { $_.Name -eq "VMTemplate01" }
Remove-SCVMTemplate -VMTemplate $Template





4.ask – answer


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

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.

New-SCHardwareProfile

The New-SCHardwareProfile cmdlet creates a hardware profile for use in System Center Virtual Machine Manager (VMM) that stores hardware configuration information. You can create a standalone hardware profile or customize a template or virtual machine to include hardware profile settings. New-SCHardwareProfile stores the new hardware profile object in the VMM library.

Set-SCVMTemplate

Changes one or more properties of a virtual machine template used in a System Center Virtual Machine Manager (VMM) environment.

Properties that you can change include settings for the name of the template, its description, owner, organization name, time zone, operating system, and product key; BIOS boot order; CPU number and characteristics; the amount memory on the host that is assigned to a virtual machine; the amount of bandwidth on the host's network available to a virtual machine; whether a virtual machine created with this template will be highly available (i.e., deployed on a host that is part of a host cluster); values for domain or workgroup as well as domain credentials; a point quota that specifies how many new virtual machines self-service users can create; custom fields; and other options.

Changes that you make to a template affect only the template. Changes do not affect any existing virtual machines that were previously created by using this template.

3.implement – code and result

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

code:

$AppProfile = New-SCApplicationProfile -Name "SvcWebAppProfile01" -Owner "cloud\administrator"

result:


image image




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


code:

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



Result,and above "SCVMM.cloud.com" is from bellow:

image 

3.3 create hardware profile (创建硬件配置)


code:

$HWProfile = New-SCHardwareProfile -Name "NewHWProfile01" -CPUCount 1 -MemoryMB 512 -CPUMax 100 -Owner "cloud\administrator" -HighlyAvailable $True
result:
image image 

3.4 create vm template (添加虚拟机模板)


code:

$OS = Get-SCOperatingSystem -VMMServer "SCVMM.cloud.com" | where {$_.Name -eq "64-bit Edition of Windows Server 2008 R2 Datacenter"}
$VHD = Get-SCVirtualHardDisk -VMMServer "SCVMM.cloud.com" | where { $_.Name -eq "empty-small.vhd" -and $_.LibraryServer.Name -eq "SCVMM.cloud.com" }
$HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
New-SCVMTemplate -Name "VMTemplate01" -VirtualHardDisk $VHD -OperatingSystem $OS –NoCustomization -HardwareProfile $HWProfile



result:

image image 

3.5 remove vm template (删除虚拟机模板)

$Template = Get-SCVMTemplate -VMMServer "SCVMM.cloud.com" | where { $_.Name -eq "VMTemplate01" }
Remove-SCVMTemplate -VMTemplate $Template





4.ask – answer


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

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

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

Wednesday, September 18, 2013

microsoft system center 2012 sp1 – used experience 2 vmm powershell

1.todo

program with vmm powershell

2.analyze

vmm powershell:

wmic process where caption="powershell.exe" get caption,commandline /value




output:

Caption=powershell.exe
CommandLine="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoExit
-Command $ep = Get-ExecutionPolicy; if ( $ep -eq ([Microsoft.PowerShell.Executio
nPolicy]::Restricted) ) { Set-ExecutionPolicy RemoteSigned -Scope Process -Force
} "Import-Module 'D:\Program Files\Microsoft System Center 2012\Virtual Machine
Manager\Bin\psModules\virtualmachinemanager\virtualmachinemanager.psd1'; cd $ho
me; $host.UI.RawUI.WindowTitle = 'Windows PowerShell - Virtual Machine Manager';
$vmmserver_VAR=Get-SCVMMServer localhost -UserRoleName '管理员';"





desktop powershell:

power shell: wmic process where caption="powershell.exe" get cap
tion,commandline /value




output:

Caption=powershell.exe
CommandLine="C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe"



3.test cmdline


3.1.in desktop powershell

PS C:\Users\administrator.CLOUD> New-SCVirtualMachine
New-SCVirtualMachine : 无法将“New-SCVirtualMachine”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼
写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ New-SCVirtualMachine
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-SCVirtualMachine:String) [], CommandNotFoundException




3.2.desktop powershell build vmm environment

PS C:\Users\administrator.CLOUD> $ep = Get-ExecutionPolicy;
PS C:\Users\administrator.CLOUD> if ( $ep -eq ([Microsoft.PowerShell.ExecutionPolicy]::Restricted) ) { Set-ExecutionPoli
cy RemoteSigned -Scope Process -Force }
PS C:\Users\administrator.CLOUD> Import-Module 'D:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\Bi
n\psModules\virtualmachinemanager\virtualmachinemanager.psd1'
; cd $home; $host.UI.RawUI.WindowTitle = 'Windows PowerShel
l - Virtual Machine Manager'
; $vmmserver_VAR=Get-SCVMMServer localhost -UserRoleName '管理员';
PS C:\Users\administrator.CLOUD>

3.3 continue test

PS C:\Users\administrator.CLOUD> New-SCVirtualMachine
New-SCVirtualMachine : 无法使用指定的命名参数解析参数集。
所在位置 行:1 字符: 1
+ New-SCVirtualMachine
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [New-SCVirtualMachine],ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.NewVmCmdlet



3.4 result


pass this step!


4. c# code test


4.1 todo


c# code call powershell script to create virtual machine instance


4.2 Form1.cs

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TestVMM1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

public static void InvokeSystemPS(string cmd)
{
List<String> ps = new List<String>();
ps.Add("Set-ExecutionPolicy Unrestricted");
ps.Add("Set-ExecutionPolicy -ExecutionPolicy Unrestricted");
ps.Add("& " + cmd);
Runspace runspace = RunspaceFactory.CreateRunspace();
runspace.Open();
Pipeline pipeline = runspace.CreatePipeline();
foreach (var scr in ps)
{
pipeline.Commands.AddScript(scr);
}
try
{
pipeline.Invoke();//Execute the ps script
runspace.Close();
}
catch (Exception ex)
{
throw ex;
}
}

public static Pipeline prepareInvokeVMMPS(List<String> psOther = null)
{
RunspaceConfiguration rconfig = RunspaceConfiguration.Create();
PSSnapInException Pwarn = new PSSnapInException();

Runspace runspace = RunspaceFactory.CreateRunspace(rconfig);
runspace.Open();

RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace);
scriptInvoker.Invoke(@"Set-ExecutionPolicy Unrestricted -Scope Process -Force;");
scriptInvoker.Invoke(@"Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force;");
scriptInvoker.Invoke(@"Import-Module -Name virtualmachinemanager;");


//pipeline.Commands.AddScript(@"$ep = Get-ExecutionPolicy;");
//pipeline.Commands.AddScript(@"if ( $ep -eq ([Microsoft.PowerShell.ExecutionPolicy]::Restricted) ) { Set-ExecutionPolicy RemoteSigned -Scope Process -Force };");
//pipeline.Commands.AddScript("Set-ExecutionPolicy Unrestricted -Scope Process -Force;");
//pipeline.Commands.AddScript("Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -Force;");
//pipeline.Commands.AddScript(@"Import-Module -Name virtualmachinemanager;");
//pipeline.Commands.AddScript(@"$vmmserver_VAR=Get-SCVMMServer localhost -UserRoleName '管理员';"); // Administrator
if ((psOther != null) && psOther.Count > 0)
{
Pipeline pipeline = runspace.CreatePipeline();
foreach (var i in psOther)
{
pipeline.Commands.AddScript(i);
}
var results = pipeline.Invoke();
}
Pipeline result;
try
{
result = runspace.CreatePipeline();
if ((psOther != null) && psOther.Count > 0)
{
foreach (var i in psOther)
{
result.Commands.AddScript(i);
}
}
}
catch (Exception ex)
{
throw ex;
}
return result;
}

public static Collection<PSObject> testCallGetVm01()
{
Collection<PSObject> result;
Pipeline pipe = prepareInvokeVMMPS();
try
{
if (pipe == null)
return null;
//Get-VM -Name vm001
Command cmd = new Command("Get-VM");
cmd.Parameters.Add("Name", "VM01");
pipe.Commands.Add(cmd);
result = pipe.Invoke();
}
catch (Exception ex)
{
throw ex;
}
return result;
}

private void CreateVm(string vmname)
{
Collection<PSObject> result;
List<string> otherparams = new List<string>();
Pipeline pipe = prepareInvokeVMMPS(otherparams);
try
{
if (pipe == null)
return;
Command cmd = new Command("D:/share/soft/createVM.ps1");
cmd.Parameters.Add(@"VMNAME", vmname);
pipe.Commands.Add(cmd);
result = pipe.Invoke();
}
catch (Exception ex)
{
throw ex;
}
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
testCallGetVm01();
}

private void button2_Click(object sender, EventArgs e)
{
CreateVm("VM02");
}
}
}



4.3 createVM.ps1

param (
[string]$VMNAME = "VM01"
)

$VHD = Get-SCVirtualHardDisk -Name "empty-small.vhd"
$VMHost = Get-SCVMHost -ComputerName "SCVMM.cloud.com"
New-SCVirtualMachine -Name $VMNAME -VirtualHardDisk $VHD -VMHost $VMHost -Path "D:\virtvm" -RunAsynchronously

microsoft system center 2012 sp1 – used experience 2 vmm operator

1.run powershell in vmm

start vmm,then click powershell,like this:

image

2.create VMHost

This step can create one "scvmm" instance in bellow result image:

image

2.1 create one account

$Creds = Get-Credential  // here need type your current system account and password
$RunAsAccount = New-SCRunAsAccount -Name "RunAsAcct01" -Credential $Creds



// your can see: New-SCRunAsAccount


2.2 create one vmhome

$RunAsAccount = Get-SCRunAsAccount -Name "RunAsAcct01"
Add-SCVMHost "SCVMM.cloud.com" -Description "This is a new host" -RemoteConnectEnabled $True -RemoteConnectPort 5900 -Credential $RunAsAccount

3. create one vm virtual machine


This step can create one "VM01" instance in bellow result image:


image


3.1 prepare VirtualHardDisk


bellow is drafts,i leave for langch


one


then,code bollow in powershell of vmm console:

$VHD = Get-SCVirtualHardDisk -Name "empty-small.vhd"
$VMTemplate = Get-SCVMTemplate | where {$_.Name -eq "VMTemplate01"}
New-SCVirtualDiskDrive -VMTemplate $VMTemplate -IDE -Bus 1 -Lun 1 -VirtualHardDisk $VHD



3.2 prepare VMTemplate


image


3.3 create one vm Virtual Machine instance


Code bollow in powershell of vmm console:

$VHD = code it in powershell of vmm console:Get-SCVirtualHardDisk -Name "empty-small.vhd"
$VMHost = Get-SCVMHost -ComputerName "SCVMM.cloud.com"
New-SCVirtualMachine -Name "VM01" -VirtualHardDisk $VHD -VMHost $VMHost -Path "D:\virtvm" -RunAsynchronously

microsoft system center 2012 sp1 – used experience 1 appendix

 

Appendix

1.download

System Center 2012 Service Pack 1 – Orchestrator – Evaluation (VHD)

<http://www.microsoft.com/en-us/download/details.aspx?id=36426>

2.Architecture

6012.System-Center-Component-Diagram

3.Deploy

VMM

  machine name:SCVMM.cloud.com ip:192.168.100.37 account:administrator domain:cloud.com

  install software:VMM of system center, hyper-v

Tuesday, September 17, 2013

=B7=D6=B3=C9=D5=CB=B5=A5

------=_Part_1707_22336774.1379424489669
Content-Type: text/html;charset=GB2312
Content-Transfer-Encoding: quoted-printable




=B7=D6=B3=C9=D5=CB=B5=A5

body{font-size:12px;text-align:center;}
#wrap img{border:none;}
#wrap a{color:#094faa;text-decoration:none;}
#wrap *{padding:0;margin:0;}
#wrap i{font-style:normal;}
#wrap .left{float:left;width:402px;}
#wrap .right{float:left;width:185px;padding-top:93px;}
#wrap .right a{margin-bottom:21px;display: block;}
#wrap .left dl{padding:119px 0 0 41px;}
#wrap .left h3{background:url(http://u5.mm-img.com/rs/res/publish/settlemen=
t/images/h3bg.jpg) no-repeat;color:#0a4a85;font-size:12px;height:25px;paddi=
ng:22px 0 14px 43px;margin-top: 12px;}
#wrap .left dt{padding-bottom:13px;}
#wrap .left dt i{font-size:14px;font-weight:bold;color:#004395;}
#wrap .left dd{line-height:20px;width:305px;text-indent:24px;}
#wrap .left dd i{font-weight:bold;font-size:14px;color:#fe0000;}
#wrap{width:598px;border:1px solid #e0e0e0;background:url(http://u5.mm-img.=
com/rs/res/publish/settlement/images/topbg.jpg) top no-repeat;padding-botto=
m:22px;margin:0 auto;text-align:left;}

#wrap .list{text-align:center;width:309px;margin-left: 38px;border-bottom:1=
px solid #7ec0f6;padding-bottom:4px;}
#wrap .list th{color:#4f4f4f;font-weight:normal;margin-bottom:-1px;}
#wrap .list .title{background:#f2f7fb url(http://u5.mm-img.com/rs/res/publi=
sh/settlement/images/thbg.jpg) no-repeat top left;height:30px;line-height:3=
0px;}
#wrap .list td{height:30px;line-height:30px;border-top:1px solid #eee;}
#wrap .list td a{text-decoration: underline;}
#wrap .txt{background:url(http://u5.mm-img.com/rs/res/publish/settlement/im=
ages/bottombg.jpg) left bottom no-repeat;width:385px;margin:0 0 12px 8px;li=
ne-height:20px;}
#wrap .txt p{padding:15px 40px 20px 41px;}
#wrap .txt a{font-size:14px;font-weight:bold;text-decoration:underline;}
#wrap .clearboth{height:0;clear:both;display:block;}
#wrap .tip{padding:19px 0 0 18px;background:url(http://u5.mm-img.com/rs/res=
/publish/settlement/images/tipbg.jpg) no-repeat 387px -10px;}
#wrap .tip h2{color:#f00;font-size:14px;padding-bottom:9px;}
#wrap .tip .brief{text-indent:24px;width:360px;line-height:20px;padding-bot=
tom:12px;}
#wrap .tipdetail{border:1px solid #aec5e3;width:558px;background:url(http:/=
/u5.mm-img.com/rs/res/publish/settlement/images/line.jpg) repeat-x bottom;p=
adding:12px 1px 20px 9px;margin-bottom:12px;}
#wrap .tipdetail .bd{margin:0 15px;border-top:1px dashed #a9c2e3;}
#wrap .tipdetail dd{line-height:24px;}
#wrap .tipdetail dd a{ text-decoration:underline;}
#wrap .tipdetail i{color:#f00;font-weight:bold;}
#wrap .pl12{padding-left:12px;}
#wrap .link1{float:left;display:inline;margin:0 0 0 9px;}
#wrap .link2{float:right;display:inline;margin:22px 12px 0 0;}






=09

=09
=C1=AC=B5=C2=C1=C1 =A3=AC=C4=E3=BA=C3=A3=BA

=09

=C4=FA=D4=DA=D2=C6=B6=AF=D3=A6=D3=C3=C9=CC=B3=A1=A3=A8Mobile =
Market=A3=A9 2013=C4=EA08=D4=C2=B5=C4=B7=D6=B3=C9=BD=E1=CB=E3=CA=D5=
=C8=EB=BA=CF=BC=C6=CE=AA=A3=BA23.1 =D4=AA=A1=A3=C8=E7=C4=FA=B1=
=BE=C6=DA=BD=E1=CB=E3=CA=D5=C8=EB=B5=BD=B4=EF5000=D4=AA=BB=F2=D2=D4=C9=CF=
=A3=AC=C7=EB=C4=FA=B0=B4=D5=D5=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8=C9=CF=B5=C4=BD=
=D3=CA=D5=B7=A2=C6=B1=B0=B2=C5=C5=B9=AB=B8=E6=A3=AC=CD=EA=B3=C9=B7=A2=C6=B1=
=B5=C4=CC=E1=BD=BB=A1=A3=D0=BB=D0=BB=A3=A1

=09

•=B7=D6=B3=C9=D5=CB=B5=A5=C3=F7=CF=B8•








=09=09=09
=D3=A6=D3=C3=C3=FB=B3=C6 =D2=B5=CE=F1=B4=FA=C2=EB =CA=D5=C8=EB
=D3=EF=D2=F4=C9=E8=D6=C3=BB=CA227=
1932701
23.1


=09

=C8=E7=D0=E8=B2=E9=D1=AF=C9=CF=D4=C2=BD=E1=CB=E3=CA=D5=C8=EB=
=A3=AC=C7=EB=B5=E3=BB=F7=B4=CB=B4=A6=B5=C7=C2=BD=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8=
=D7=D4=B7=FE=CE=F1=C7=F8=B2=E9=D1=AF=A1=A3






=09
=09
=09
=09



=09

=CE=C2=DC=B0=CC=E1=CA=BE:


=C8=E7=D0=E8=CC=E1=B3=F6=B6=D4=D5=CB=C9=EA=C7=EB=
=A3=AC=C7=EB=D3=EB=BD=E1=CB=E3=B5=A5=B7=A2=B2=BC=B5=C430=B8=F6=D7=D4=C8=BB=
=C8=D5=C4=DA=A3=AC=B5=C7=C2=BD=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8=D7=D4=B7=FE=CE=
=F1=C7=F8=B5=C4=BD=E1=CB=E3=B5=A5=B2=E9=D1=AF=BD=F8=D0=D0=C9=EA=C7=EB=A1=A3=



=09

=C8=E7=B9=FB=C4=FA=D3=D0=C8=CE=BA=CE=D2=C9=CE=CA,=C7=EB=
=C1=AA=CF=B5=BF=CD=B7=FE=D7=C9=D1=AF

=C1=AA=CF=B5=B7=BD=CA=BD=C8=E7=CF=C2=A3=BA

•=D6=D0=B9=FA=D2=C6=B6=AF=BF=AA=B7=A2=D5=DF=C9=E7=
=C7=F8=B7=FE=CE=F1=D3=CA=CF=E4=A3=BAapservice@chinamobile.com=A3=BB


•=B7=C9=D0=C5=BF=CD=B7=FE=BA=C5=A3=BA855552270=A3=BB


•139=CB=B5=BF=CD=B7=FE=CE=F1=A3=BA

1=A1=A2=B1=E0=BC=AD=B6=CC=D0=C5=A3=AC=B7=
=A2=CB=CD=A1=B0T=A1=B1=D6=C1106581039952228058=BC=B4=BF=C9=A1=A3

2=A1=A2=B5=C7=C2=BC139=CB=B5=BF=CD=A3=AC=
=D4=DA=D3=D2=B2=E0=B5=C4=A1=B0=B2=E9=D5=D2=CB=B5=BF=CD=A1=B1=D6=D0=CA=E4=C8=
=EB =A1=B0=BF=AA=B7=A2=D5=DF=BF=CD=B7=FE=A1=B1=BD=F8=D0=D0=B2=E9=D5=D2=A3=
=AC=C8=BB=BA=F3=B5=E3=BB=F7=A1=B0=CC=FDTA=CB=B5=A1=B1=BC=B4=BF=C9=A1=A3

3=A1=A2=B5=C7=C2=BC139=CB=B5=BF=CD=A3=AC=
=D4=DA=D3=D2=B2=E0=B5=C4=A1=B0=B2=E9=D5=D2=CB=B5=BF=CD=A1=B1=D6=D0=CA=E4=C8=
=EB =A1=B0=BF=AA=B7=A2=D5=DF=BF=CD=B7=FE=A1=B1=BD=F8=D0=D0=B2=E9=D5=D2=A3=
=AC=C8=BB=BA=F3=B5=E3=BB=F7=A1=B0=CC=FDTA=CB=B5=A1=B1=BC=B4=BF=C9=A1=A3



=B8=D0=D0=BB=C4=FA=
=B6=D4=D2=C6=B6=AF=D3=A6=D3=C3=C9=CC=B3=A1(Mobile Market)=B9=D8=D7=A2=D3=EB=
=D6=A7=B3=D6=A3=A1

=D6=D0=B9=FA=D2=C6=
=B6=AF=BF=AA=B7=A2=D5=DF=C9=E7=C7=F8







------=_Part_1707_22336774.1379424489669--

Thursday, September 12, 2013

New version of pkrssv2 in the Android Market

Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit






































Hello lian deliang,
You've just released the 2.06 version of your "pkrssv2" app on the official Android Market.

You've uploaded the 2.05 version to AndroidPIT. Please upload the latest version to AndroidPIT, so that AndroidPIT users can also install the latest version of your app.

Just click on "Upload upgrade" on your developer page for the "pkrssv2" app.

Access your developer page here:
http://www.androidpit.com/developer/3433529/lian-deliang

Best,
Your AndroidPIT Team









NOTICE:
You've received this e-mail because you've uploaded the "pkrssv2" app to the www.androidpit.com website and you have recently released a new version of this app on the official Android Market.







Home  | 
About us  | 
Terms & Conditions  | 
Privacy Policy

Wednesday, September 11, 2013

Download our new AndroidPIT app now

Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit






































Download our new AndroidPIT app now



Good news!


As of right now, the brand new AndroidPIT App version 2.0 is ready to install. It won't just offer a completely new design, but also many improvements from the old version. Try it out yourself!



Download now:












You are receiving this e-mail because you have registered at www.androidpit.com.
You can unsubscribe from our Breaking News here.







Home  | 
About us  | 
Terms & Conditions  | 
Privacy Policy