Power VM-VIO-LPAR-NIM手记完整版本
- 格式:xls
- 大小:5.63 MB
- 文档页数:1
PowerVM学习笔记虚拟化的一些概念SEA Share Ethernet AdapterVSCSI 虚拟SCSI适配器PowerVM的安装配置VIOS的安装配置创建VIO分区创建VIO分区,分配适当的CPU和内存给VIO,分配磁盘和物理IO设备给VIO;添加虚拟网卡适配器和虚拟SCSI适配器安装VIOS安装过程就是mksysb的恢复过程,安装后使用padmin padmin登录,运行license -accept切换到root用户oem_setup_env配置微分区,主要是配置好虚拟网卡和虚拟存储;配置虚拟网卡的方式使用SEA的方式配置虚拟网卡非VLAN tagged网卡1、创建虚拟网卡;2、填写Port VLAN ID (PVID),PVID允许网卡和具有相同PVID的网卡通信;3、不选择IEEE 802.1兼容的网卡,这种方式下,如果想要连接多个VLAN ID,需要创建多个虚拟网卡;4、如果需要访问外部网络,勾选上;5、在VIOS上创建SEA,其中ent0 ent1为物理网卡,ent2 ent3为虚拟网卡,创建出sea网卡ent4mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 16、使用mktcpip配置sea网卡ent4的地址mktcpip -hostname vio1 -interface en3 -inetaddr xx.xx.xx.xx -netmask 255.255.255.0-gateway xx.xx.xx.xx -start非VLAN tagged网卡双VIO配置多创建一个虚拟网卡ent3mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1 -attr ha_mode=auto ctl_chan=ent3 其他配置同上VLAN tagged 网卡1、创建虚拟网卡;2、填写Port VLAN ID (PVID),PVID允许网卡和具有相同PVID的网卡通信;3、选择IEEE 802.1兼容的网卡,将需要访问的VLAN都添加进去;4、访问外部网络,勾选上5、创建sea网卡ent4$ mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1$ ent4 available6、创建sea网卡的VLAN网卡$ mkdev -vlan ent4 -tagid 222$ ent5 available7、使用mktcpip配置sea vlan 网卡ent5的地址mktcpip -hostname vio1 -interface en5 -inetaddr xx.xx.xx.xx -netmask 255.255.255.0-gateway xx.xx.xx.xx -startVLAN tagged 网卡双VIO配置多创建一个虚拟网卡ent3$ mkvdev -sea ent0 -vadapter ent2 -default ent2 -defaultid 1 -attr ha_mode=auto ctl_chan=ent3其他配置同上使用IVE的方式配置虚拟网卡IVE网卡不需要通过VIO,可以分配给LPAR或者微分区使用;当物理网卡不够时可以使用sea over ive配置,即混合模式;虚拟SCSI配置映射LV给客户机创建LV rootvg1_client01mkvdev -vdev rootvg1_client01 -vadapter vhost0 -dev cl01_rootvg1映射PV给客户机mkvdev -vdev hdisk2 -vadapter vhost0 -dev cl01_rootvg1微分区光盘挂载方式在VIOS中挂载物理光驱给客户机使用mkvdev -vdev cd0 -vadapter vhost0 -dev vcdrmdev -dev vcd在VIOS中挂载ISO给客户机使用mkrep -sp rootvg -size 10Glsrepmkvopt -name aix6104 -dev /soft/aix610004.iso -romkvdev -fbo -vadapter vhost0loadopt -vtd vtopt0 -disk aix6104。
VMware PowerCLI User's GuideVMware PowerCLI 6.5.4VMware PowerCLI User's GuideYou can find the most up-to-date technical documentation on the VMware website at:https:///If you have comments about this documentation, submit your feedback todocfeedback@VMware, Inc.3401 Hillview Ave.Palo Alto, CA 94304Copyright © 1998–2017 VMware, Inc. All rights reserved. Copyright and trademark information.ContentsVMware PowerCLI User's Guide81Introduction to VMware PowerCLI9Microsoft PowerShell Basics9PowerShell Command-Line Syntax10PowerShell Pipelines10PowerShell Wildcards10PowerShell Common Parameters10PowerCLI Concepts11PowerCLI Modules12Interoperability Between the PowerCLI and vCloud Director PowerCLI Modules13Selecting Objects in PowerCLI14Providing Login Credentials15Running PowerCLI Cmdlets Asynchronously15Managing Default Server Connections16Customization Specification Objects in PowerCLI16Using ESXCLI with PowerCLI16PowerCLI Inventory Provider17PowerCLI Datastore Provider17PowerCLI About Articles172Installing VMware PowerCLI19Supported Operating Systems20Supported VMware Products20Supported Windows PowerShell Versions20Prerequisites for Installing and Running PowerCLI20Install PowerCLI20Allow Execution of Local Scripts21Update a PowerCLI Module21Uninstall PowerCLI223Configuring VMware PowerCLI23Scoped Settings of PowerCLI23Configuring the Scope of the PowerCLI Settings23Priority of Settings Scopes in PowerCLI24PowerCLI Configuration Files24Using Custom Scripts to Extend the Operating System Support for PowerCLI Cmdlets254Configuring Customer Experience Improvement Program26Categories of Information That VMware Receives26Join the Customer Experience Improvement Program in PowerCLI265Sample Scripts for Managing vSphere with VMware PowerCLI27 Connect to a vCenter Server System31Manage Virtual Machines on vSphere32Add a Standalone Host to a vCenter Server System33Set the License Key for a Host on vCenter Server33Activate Maintenance Mode for a Host on vCenter Server34Create vSphere Inventory Objects34Create Virtual Machines on vCenter Server Using an XML Specification File36Manage Virtual Machine Templates on vCenter Server36Create and Use Snapshots on vCenter Server37Update the Resource Configuration Settings of a Virtual Machine on vCenter Server38Get a List of Hosts on a vCenter Server System and View Their Properties38Change the Host Advanced Configuration Settings on vCenter Server39Move a Virtual Machine to a Different Host Using VMware vSphere vMotion40Move a Virtual Machine to a Different Datastore Using VMware vSphere Storage vMotion40 Create a Host Profile on a vCenter Server System41Apply a Host Profile to a Host on vCenter Server41Manage Statistics and Statistics Intervals on vCenter Server42Modify the Settings of the NIC Teaming Policy for a Virtual Switch43Create a vApp on vCenter Server43Modify the Properties of a vApp44Export or Import vApps44Create an iSCSI Host Storage45Add Passthrough Devices to a Host and Virtual Machine45Create a Custom Property Based on an Extension Data Property46Create a Script-Based Custom Property for a vSphere Object46Apply a Customization Object to a Cloned Virtual Machine47Modify the Default NIC Mapping Object of a Customization Specification48Modify Multiple NIC Mapping Objects of a Customization Specification48Create Multiple Virtual Machines that Use Static IP Addresses49Create Multiple Virtual Machines with Two Network Adapters51Create a vSphere Role and Assign Permissions to a User52View the Action Triggers for an Alarm on vCenter Server53Create and Modify Alarm Actions and Alarm Triggers on vCenter Server53Remove Alarm Actions and Triggers54Create and Modify Advanced Settings for a Cluster55Modify the vCenter Server Email Configuration55Modify the vCenter Server SNMP Configuration56Use Esxtop to Get Information on the Virtual CPUs of a Virtual Machine56Filter vSphere Objects with Get-View57Populate a View Object with Get-View58Update the State of a Server-Side Object58Reboot a Host with Get-View59Modify the CPU Levels of a Virtual Machine with Get–View and Get–VIObjectByVIView60 Browse the Default Inventory Drive60Create a New Custom Inventory Drive61Manage Inventory Objects Through Inventory Drives61Browse the Default Datastore Drives62Create a New Custom Datastore Drive63Manage Datastores Through Datastore Drives63Modify the Timeout Setting for Web Tasks64Using Tags65Retrieve a Tag and Save It into a Variable65Retrieve a Tag Category and Save It into a Variable66Create a Tag Category and a Tag66Assign a Tag to Virtual Machines66Retrieve Objects by Tag67Generate Tags Automatically by Using a Script67Add an Entity Type to a Tag Category68Retrieve Tag Assignments68Network Management with vSphere Distributed Switches69Create a Distributed Switch and Configure Networking69Configure a Distributed Switch70Migrate Virtual Machine Networking Configuration from a vSphere Standard Switch to a vSphere Distributed Switch70Migrate Physical and Virtual NICs to a vSphere Standard Switch71Migrate Physical and Virtual NICs to a vSphere Distributed Switch72Configure the Traffic Shaping Policy73Configure the Security Policy73Create a Virtual Machine from a Content Library Item73Create a vApp from a Content Library Item74Create a New VM-VM DRS Rule74Create a New VM-VMHost DRS Rule756Sample Scripts for Managing vSphere Policy-Based Storage with VMware PowerCLI77Create a Tag-Based Storage Policy77Create a Capability-Based Storage Policy78Associate a Storage Policy with a Virtual Machine and Its Hard Disk79Disassociate a Storage Policy Associated with a Virtual Machine and Its Hard Disk80Enable SPBM on a Cluster and Verify that It Is Enabled80Remove a Storage Policy81Edit a Storage Policy81Export and Import a Storage Policy82Create a Virtual Machine in a Datastore Compatible with Storage Policy82Create a vSAN Datastore84Modify a vSAN Datastore85Create a vSAN Stretched Cluster86Create an NFS 4.1 Datastore87Add a VASA Provider and Create a Policy88Invoke a Planned Failover on a Replication Group and Reverse the Replication90Attach a Flat VDisk to a Virtual Machine927Sample Scripts for Managing VMware Site Recovery Manager with VMware PowerCLI93Connect to an SRM Server93Protect a Virtual Machine94Create a Report of the Protected Virtual Machines94Create a Report of the Virtual Machines Associated with All Protection Groups958Sample Scripts for Managing the vSphere Automation SDK withVMware PowerCLI97Create a Local Content Library on an Existing Datastore979Sample Scripts for Managing vCloud Director with VMware PowerCLI99 Connect to a vCloud Director Server100Create and Manage Organizations101Create and Manage Organization Virtual Data Centers101Filter and Retrieve Organization Virtual Data Center Networks102Import a vApp Template from the Local Storage103Create a vApp Template from a vApp103Import a vApp from vSphere104Create and Modify a vApp105Manage Virtual Machines with vApps105Manage Virtual Machines and Their Guest Operating Systems106Retrieve a List of the Internal and External IP Addresses of Virtual Machines in vApps107 Create and Manage Access Control Rules108Filter and Retrieve vApp Networks108Create vApp Networks for a Selected vApp109Create an Isolated vApp Network109Create an NAT Routed vApp Network110Create a Direct vApp Network110Modify or Remove vApp Networks11110Sample Scripts for Managing vCloud Air with VMware PowerCLI113 Connect to a vCloud Air Server113Retrieve vApps from a Data Center114Retrieve vApps from a Compute Instance114Running vCloud Director Scripts Against vCloud Air11511Sample Scripts for Managing vSphere Update Manager with VMware PowerCLI116Connect to a vCenter Server System116Create Patch Baselines117Attach and Detach Baselines118Scan a Virtual Machine118Check Virtual Machine Baseline Status119Stage Patches119Remediate a Virtual Machine120Upgrade Virtual Machine Hardware120Remediate a Cluster120Remediate a Host121Download Patches and Scan Objects12112Sample Scripts for Managing vRealize Operations Manager with VMware PowerCLI123Connect to a vRealize Operations Manager Server123Check Memory Waste Levels124Get Remediation Recommendations124Change Alert Ownership125Create a Report for Problematic Hosts125VMware PowerCLI User's GuideThe VMware PowerCLI User's Guide provides information about installing and using theVMware PowerCLI cmdlets (pronounced “commandlets”) for managing, monitoring, automating, and handling operations for VMware® vSphere, VMware Site Recovery Manager, vSphere Automation SDK, vCloud Director, vCloud Air, vSphere Update Manager, vRealize Operations Manager, VMware Horizon, NSX-T, and VMware Cloud on AWS components.To help you start with PowerCLI, this documentation includes descriptions of specific PowerCLI concepts and features. In addition, this documentation provides a set of use case examples and sample scripts.Intended AudienceThis guide is intended for anyone who wants to install and use PowerCLI. This documentation is written for administrators and developers who are familiar with virtual machine technology and Windows PowerShell.n Basic administrators can use cmdlets included in PowerCLI to manage their vSphere, VMware Site Recovery Manager, vSphere Automation SDK, vCloud Director, vCloud Air,vSphere Update Manager, vRealize Operations Manager, VMware Horizon, NSX-T, andVMware Cloud on AWS infrastructure from the command line.n Advanced administrators can develop PowerShell scripts that other administrators can reuse or integrate into other applications.Introduction toVMware PowerCLI1VMware PowerCLI contains modules of cmdlets based on Microsoft PowerShell for automating vSphere, VMware Site Recovery Manager, vSphere Automation SDK, vCloud Director, vCloud Air,vSphere Update Manager, vRealize Operations Manager, VMware Horizon, NSX-T, andVMware Cloud on AWS administration. VMware PowerCLI provides a PowerShell interface to the VMware product APIs.n Microsoft PowerShell BasicsPowerCLI is based on Microsoft PowerShell and uses the PowerShell basic syntax and concepts.n PowerCLI ConceptsPowerCLI cmdlets are created to automate VMware environments administration and to introduce some specific features in addition to the PowerShell concepts.Microsoft PowerShell BasicsPowerCLI is based on Microsoft PowerShell and uses the PowerShell basic syntax and concepts. Microsoft PowerShell is both a command-line and scripting environment, designed for Windows. It uses the .NET object model and provides administrators with system administration and automation capabilities. To work with PowerShell, you run commands, named cmdlets.n PowerShell Command-Line SyntaxPowerShell cmdlets use a consistent verb-noun structure, where the verb represents the action and the noun represents the object to operate on.n PowerShell PipelinesA pipeline is a series of commands separated by the pipe operator |.n PowerShell WildcardsPowerShell has a number of pattern-matching operators named wildcards that you can use tosubstitute one or more characters in a string, or substitute the complete string.n PowerShell Common ParametersThe Windows PowerShell engine retains a set of parameter names, referred to as commonparameters. All PowerShell cmdlets, including the PowerCLI cmdlets, support them.VMware PowerCLI User's GuidePowerShell Command-Line SyntaxPowerShell cmdlets use a consistent verb-noun structure, where the verb represents the action and the noun represents the object to operate on.PowerShell cmdlets follow consistent naming patterns, ensuring that construction of a command is easy if you know the object that you want to work with.All command categories take parameters and arguments. A parameter starts with a hyphen and is used to control the behavior of the command. An argument is a data value consumed by the command.A simple PowerShell command has the following syntax:command -parameter1 -parameter2 argument1, argument2PowerShell PipelinesA pipeline is a series of commands separated by the pipe operator |.Each command in the pipeline receives an object from the previous command, performs some operation on it, and then passes it to the next command in the pipeline. Objects are output from the pipeline as soon as they become available.PowerShell WildcardsPowerShell has a number of pattern-matching operators named wildcards that you can use to substitute one or more characters in a string, or substitute the complete string.All wildcard expressions can be used with the PowerCLI cmdlets. For example, you can view a list of all files with a .txt extension by running dir *.txt. In this case, the asterisk * operator matches any combination of characters.With wildcard patterns you can indicate character ranges as well. For example, to view all files that start with the letter S or T and have a .txt extension, you can run dir [st]*.txt.You can use the question mark ? wildcard to match any single character within a sequence of characters. For example, to view all .txt files with names that consist of string and one more character at the end, run dir string?.txt.PowerShell Common ParametersThe Windows PowerShell engine retains a set of parameter names, referred to as common parameters. All PowerShell cmdlets, including the PowerCLI cmdlets, support them.Some of the PowerShell common parameters are Verbose, Debug, ErrorAction, ErrorVariable, OutVariable, and OutBuffer. For a full list of the common parameters and more details on their usage, run Get-Help about_CommonParameters.PowerShell offers two risk mitigation parameters: WhatIf and Confirm.WhatIf Displays the effects of a command without running it.Confirm Prompts for confirmation before running a command that stops a programor service, or deletes data.PowerCLI ConceptsPowerCLI cmdlets are created to automate VMware environments administration and to introduce some specific features in addition to the PowerShell concepts.n PowerCLI ModulesVMware PowerCLI 6.5.4 consists of multiple modules that you can install and use according to your needs and environments.n Interoperability Between the PowerCLI and vCloud Director PowerCLI Modules With the RelatedObject parameter of PowerCLI cmdlets, you can retrieve vSphere inventory objects from cloud resources. This interoperability between the PowerCLI andvCloud Director PowerCLI modules expands cloud administration, automation, reporting, andtroubleshooting options for provider administrators.n Selecting Objects in PowerCLIIn PowerCLI, you can pass strings and wildcards to all parameters that take inventory objects,datastores, OSCustomizationSpec objects, and VIServer objects as arguments. This PowerCLI approach is named Object-by-Name (OBN) selection.n Providing Login CredentialsWhen you provide login credentials in the command prompt or in a script file, a PowerShell limitation might prevent PowerCLI from processing non-alphanumeric characters correctly. To prevent login problems, escape the non-alphanumeric characters in your credentials.n Running PowerCLI Cmdlets AsynchronouslyBy default, PowerCLI cmdlets return an output only after completion of the requested tasks. If you want a cmdlet to return to the command line immediately, without waiting for the tasks to complete, you can use the RunAsync parameter.n Managing Default Server ConnectionsBy default, PowerCLI and PowerCLI cmdlets run on the vCenter Server systems or vCloud Director servers you are connected to, if no target servers can be determined from the provided parameters.n Customization Specification Objects in PowerCLIPowerCLI provides two types of objects for customization specification: persistent andnonpersistent.n Using ESXCLI with PowerCLIPowerCLI provides you the capability to use ESXCLI through its console.n PowerCLI Inventory ProviderThe Inventory Provider is designed to expose an unfiltered inventory view of the inventory items from a server.n PowerCLI Datastore ProviderThe Datastore Provider is designed to provide access to the contents of one or more datastores.n PowerCLI About ArticlesYou can learn more about some PowerCLI concepts and features from the built-in help articlesnamed about articles. You can access them through a running PowerCLI process.PowerCLI ModulesVMware PowerCLI 6.5.4 consists of multiple modules that you can install and use according to your needs and environments.The following table lists all official VMware PowerCLI modules.VMware.PowerCLI Provides a root module which other modules are dependent on.This module ensures the PowerCLI product can be installed,upgraded, and removed as a complete package if needed.VMware.VimAutomation.Core Provides cmdlets for automated administration of the vSphereenvironment.mon Provides functionality that is common to all PowerCLI modules.This module has no cmdlets, but is required for other modules tofunction correctly.VMware.VimAutomation.Sdk Provides SDK functionality that is needed by all PowerCLImodules. This module has no cmdlets, but is required for othermodules to function correctly.VMware.VimAutomation.Vds Provides cmdlets for managing vSphere distributed switchesand distributed port groups.VMware.VimAutomation.Cis.Core Provides cmdlets for managing vSphere Automation SDKservers.VMware.VimAutomation.Storage Provides cmdlets for managing vSphere policy-based storage. VMware.VimAutomation.StorageUtility Provides utility scripts for storage.VMware.VimAutomation.HA Provides the Get-DrmInfo cmdlet for managing High Availabilityfunctionality.VMware.VimAutomation.License Provides the Get-LicenseDataManager cmdlet for managingVMware License components.VMware.ImageBuilder Provides cmdlets for managing depots, image profiles, andVIBs.VMware.DeployAutomation Provides cmdlets that provide an interface to VMware AutoDeploy for provisioning physical hosts with ESXi software. VMware.VimAutomation.Cloud Provides cmdlets for automating vCloud Director features.VMware.VimAutomation.PCloud Provides cmdlets for automating vCloud Air features.VMware.VumAutomation Provides cmdlets for automating vSphere Update Managerfeatures.VMware.VimAutomation.vROps Provides cmdlets for automating vRealize Operations Managerfeatures.VMware.VimAutomation.Srm Provides cmdlets for managing VMware Site Recovery Managerfeatures.VMware.VimAutomation.HorizonView Provides cmdlets for automating VMware Horizon features. VMware.VimAutomation.Nsxt Provides cmdlets for managing NSX-T servers.VMware.VimAutomation.Vmc Provides cmdlets for automating VMware Cloud on AWSfeatures.Interoperability Between the PowerCLI andvCloud Director PowerCLI ModulesWith the RelatedObject parameter of PowerCLI cmdlets, you can retrieve vSphere inventory objects from cloud resources. This interoperability between the PowerCLI and vCloud Director PowerCLI modules expands cloud administration, automation, reporting, and troubleshooting options for provider administrators.Note To use the interoperability feature, you must install the PowerCLI and vCloud Director PowerCLI modules, and connect both to a vCloud Director server and a vCenter Server system.Retrieving vSphere Inventory Objects from Cloud ResourcesProvider administrators can use the RelatedObject parameter of PowerCLI cmdlets to retrieve vSphere inventory objects from vCloud Director objects. Passing the retrieved objects to the cmdlets of the VMware.VimAutomation.Core and VMware.VimAutomation.VDS modules, extends administration options.Important Use of the VMware.VimAutomation.Core and VMware.VimAutomation.VDS modules to modify the configuration of objects that are managed by vCloud Director might result in unpredictable behavior of the cloud environment.Table 1‑1. List of Supported vSphere Inventory Objects You Can Retrieve from Cloud ObjectsTable 1‑1. List of Supported vSphere Inventory Objects You Can Retrieve from Cloud Objects (Continued)ExternalNetwork VDPortgroupGet-ExternalNetwork -Name'MyExternalNetwork' | Get-VDPortGroupSelecting Objects in PowerCLIIn PowerCLI, you can pass strings and wildcards to all parameters that take inventory objects, datastores, OSCustomizationSpec objects, and VIServer objects as arguments. This PowerCLI approach is named Object-by-Name (OBN) selection.Instead of assigning an object name to a cmdlet parameter, users can pass the object through a pipeline or a variable. For example, the following three commands are interchangeable:n Remove-VM -VM "Win 7 SP1"n Get-VM -Name "Win 7 SP1" | Remove-VMn Remove-VM -VM (Get-VM -Name "Win 7 SP1")Note In PowerCLI, passing strings as pipeline input is not supported.If you provide a non-existing object name, an OBN failure occurs. In such cases, PowerCLI generates a non-terminating error and runs the cmdlet ignoring the invalid name.For more details about OBN, run help about_OBN.Example: An OBN failureThis example illustrates the occurrence of an OBN failure.Set-VM –VM “VM1”, “VM2”, “VM3” –Server $server1, $server2 –MemoryGB 4If the VM2 virtual machine does not exist on either of the selected servers, PowerCLI generates a non-terminating error and applies the command only on the VM1 and VM3 virtual machines.Providing Login CredentialsWhen you provide login credentials in the command prompt or in a script file, a PowerShell limitation might prevent PowerCLI from processing non-alphanumeric characters correctly. To prevent login problems, escape the non-alphanumeric characters in your credentials.To escape non-alphanumeric characters in PowerCLI, you need to place the expression that contains them in single quotes (').Note When you provide your login credentials in the Specify Credential dialog box, you do not need to escape non-alphanumeric characters.Example: Connecting to a vCenter Server SystemThis example illustrates how to escape non-alphanumeric characters when connecting to a selected vCenter Server instance with the Adminis!ra!or user name and the pa$$word password.Connect-VIServer -Server 10.23.112.235 -Protocol https -Username 'Adminis!ra!or' -Password 'pa$$word'Running PowerCLI Cmdlets AsynchronouslyBy default, PowerCLI cmdlets return an output only after completion of the requested tasks. If you want a cmdlet to return to the command line immediately, without waiting for the tasks to complete, you can use the RunAsync parameter.When you use the RunAsync parameter, the cmdlet returns Task objects instead of its usual output. The Status property of a returned Task object contains a snapshot of the initial state of the task. This state is not updated automatically and has the values Error, Queued, Running, or Success. You can refresh a task state by retrieving the task object with the Get-Task cmdlet. If you want to observe the progress of a running task and wait for its completion before running other commands, use the Wait-Task cmdlet.Note In PowerCLI, the RunAsync parameter affects only the invocation of a cmdlet and does not control whether the initiated tasks run consecutively or in parallel. For example, the Remove-VM cmdlet might remove the selected virtual machines simultaneously or consecutively depending on the internal design of PowerCLI. To make sure that tasks initiated by a cmdlet run consecutively, run the cmdlet in a loop, each time applying it to a single object.Example: Running Remove-VM with and without the RunAsync parameter Remove-VM $vmListThe command returns no output when all virtual machines stored in the $vmList variable are removed, irrespective of whether they are removed simultaneously.Remove-VM $vmList -RunAsyncThe command returns an output that consists of one or more Task objects immediately.Managing Default Server ConnectionsBy default, PowerCLI and PowerCLI cmdlets run on the vCenter Server systems or vCloud Director servers you are connected to, if no target servers can be determined from the provided parameters.When you connect to a vCenter Server system by using Connect-VIServer, the server connection is stored in the $DefaultVIServers array variable. This variable contains all connected servers for the current PowerCLI session. To remove a server from the $DefaultVIServers variable, you can either use Disconnect-VIServer to close all active connections to this server, or modify the value of $DefaultVIServers manually.When you connect to a vCloud Director system by using Connect-CIServer, the server connection is stored in the $DefaultCIServers array variable. This variable contains all connected servers for the current session. To remove a server from the $DefaultCIServers variable, you can either use Disconnect-CIServer to close all active connections to this server, or modify the value of $DefaultCIServers manually.Customization Specification Objects in PowerCLIPowerCLI provides two types of objects for customization specification: persistent and nonpersistent.Persistent CustomizationPersistent customization specification objects are stored on the vSphere server. All persistent customization specifications created by using vSphere Client or VMware PowerCLI 4.1 or later are encrypted. Encrypted customization specifications can be applied only by the server that has encrypted them.Nonpersistent CustomizationNonpersistent customization specification objects exist only inside the current PowerShell process. Nonpersistent customization specification objects are not encrypted, but cloning them to a vSphere server encrypts them.Using ESXCLI with PowerCLIPowerCLI provides you the capability to use ESXCLI through its console.PowerCLI provides two approaches for working with ESXCLI:n Through the Get-ESXCli cmdlet, which provides direct access to the ESXCLI namespaces, applications, and commands.n Through .NET methods, which you use to create managed objects that correspond to specific ESXCLI applications. To access the ESXCLI, you can call methods on these managed objects.Note To call a method of an ESXCLI object, you must provide values for all parameters. If you want to omit a given parameter, pass $null as its argument.PowerCLI Inventory ProviderThe Inventory Provider is designed to expose an unfiltered inventory view of the inventory items from a server.It enables navigation and file-style management of the VMware vSphere inventory. By creating a PowerShell drive based on a managed object (such as a data center), you can obtain a view of its contents and the relationships between the items. In addition, you can move, rename, or delete objects by running commands from the PowerShell console.When you connect to a server with Connect-VIServer, the cmdlet builds two default inventory drives: vi and vis. The vi inventory drive shows the inventory on the last connected server. The vis drive contains the inventory of all vSphere servers connected within the current PowerCLI session.You can use the default inventory drives or create custom drives based on the default ones.PowerCLI Datastore ProviderThe Datastore Provider is designed to provide access to the contents of one or more datastores.The items in a datastore are files that contain configuration, virtual disk, and the other data associated with a virtual machine.When you connect to a server with Connect-VIServer, the cmdlet builds two default datastore drives: vmstore and vmstores. The vmstore drive provides a list of the datastores available on the vSphere server that you last connected to.Note If you establish multiple connections to the same vSphere server, the vmstore drive is not updated.The vmstores drive contains all datastores available on all vSphere servers that you connected to within the current PowerCLI session.You can use the default datastore drives or create custom drives based on the default ones.PowerCLI About ArticlesYou can learn more about some PowerCLI concepts and features from the built-in help articles named about articles. You can access them through a running PowerCLI process.Running Help About_* lists all built-in Windows PowerShell and VMware PowerCLI about articles.。
VIO server 配置--- 微分区的共享资源设置VIO server 为有限制的AIX 操作系统,不允许root 登录,用户名为padmin,缺省口令无。
通过oem_setup_env 进入AIX 的环境,可以很方便的使用我们熟悉的AIX 命令达到大多数操作相同的效果,下面会混合使用2 个环境的命令。
接受许可第一次开启VIO server,利用oem_setup_env 进入AIX 环境必须接受license 许可。
login: padmin$ oem_setup_envThe I/O Server license must be accepted before running this command.Only the chlang command may be run before accepting the license.To view the license, run the license command with the -view option.If the -lang flag is not specified the license will be displayed inthe current locale (set by the chlang command). If the license is notavailable in the language selected, English will be the default.To accept the license, run the license command with the -accept option.Locale currently set to: "en_US".Usage: license {[-view] [-accept]} [-lang Name]license [-ls]。
IBM Cloud Infrastructure(云架构 ) 之 “服务器虚拟化 PowerVM”云架构 L3 级课程© Copyright IBM Corporation 2010L3级课程云架构“PowerCloud 之虚拟化 PowerVM” 内容安排ØPowerVM 虚拟化概述 ØPowerVM 虚拟化技术特点 ØPowerVM 高级虚拟化(LPM,AMS) ØPowerVM 虚拟化优势Page 2L3级课程云架构PowerVM 虚拟化概述Page 3L3级课程云架构IBM 虚拟化的领导者A 40+ year tradition continues with PowerVM™1967IBM develops hypervisor that would become VM on the mainframe1973IBM announces first machines to do physical partitioning1987IBM announces LPAR on the mainframe1999IBM announces LPAR on POWER™2004IBM intro’s POWER Hypervisor™ for System p™ and System i™200720082009IBM announces POWER6™, the first UNIX® servers with Live Partition MobilityIBM announces PowerVMPowerVM is the leading virtualization platform for UNIX, IBM i and Linux® clientsü üUnify virtualization branding & technology for AIX®, i and Linux Exploit 40 years of IBM virtualization leadershipPage 4L3级课程云架构什么是 PowerVM?为IBM Power系统提供基于AIX, i, Linux操作系统的业界领先的统一虚拟化平台PowerVM 提供如下功能: 微分区 虚拟 I/O 服务器 集成虚拟化管理器 活动分区迁移 主动内存共享 Lx86 SupportMicro-Partitioning™ SubsystemsWorkload Partitions Live Application Mobility动态逻辑分区Page 5L3级课程云架构PowerVM虚拟化架构工作负载管理和控制AIX Partitions 分区 硬件 管理 控制台Linux Partitions 分区i5/OS i Partitions 分区虚拟 I/O 服务器 虚拟 适配器 虚拟 磁盘Unassigned 没有分配的 On Demand 随需应变的 Resources 资源POWER Hypervisor 固件 POWER 服务器 硬件 服务 子系统虚拟网络 虚拟处理器 处理器 内存 I/O 扩展槽 本地设备和存储 虚拟内存网络和网络存储Page 6L3级课程云架构PowerVM 的三种版本ExpressPowerVM 版本Standard JS12/22/23/43 Power560/570/ 770*/595/780 10 per core (up to 1000) VMControl IVM, HMC ü Enterprise JS12/22/23/43 Power560/570/ 770/595*/780* 10 per core (up to 1000) VMControl IVM, HMC ü ü ü System i*, System p* ü AIX / Linux / i ü ü AIX / Linux / i ü System i*, System p* ü AIX / Linux / i üPowerVM 提供如下功能: 微分区 虚拟 I/O 服务器服务器Power 520/550/750 PS700/701* 2 per server + VIOS VMControl IVM ü最大分区数 管理平台集成虚拟化管理器 活动分区迁移 Lx86 量身定制虚拟IO服务器 分区在线迁移 动态内存共享 多CPU共享池 共享专有分区 客户分区支持 Lx86Multiple Shared Processor Pools are supported by POWER6 and HMC managed environments Live Partition Mobility works with AIX V5.3 and above and Linux on POWERPage 7* POWER6 processor-based servers onlyL3级课程云架构PowerVM的功能与PowerVM版本,处理器以及操作系统的兼容性Feature LPAR Licensed by All Editions (limited on Express) Processor support POWER4,5 and 6 Operating System supporta AIX 5.3 and 6.1 SLES 9, 10 for POWER (not POWER4) RHEL 4, 5 for POWER (not POWER4 AIX 5.3 and 6.1 SLES 9, 10 for POWER RHEL 4, 5 for POWER (5.1 for POWER6) AIX 5.3 and 6.1 SLES 9, 10 for POWER RHEL 4, 5 for POWER AIX 5.3 and 6.1 SLES 10 update 1 for POWER RHEL 5.1 for POWER AIX 5.3 and 6.1 SLES 10 for POWER6 RHEL 5.1 for POWER6 Virtual I/O Server Integrated Virtualization Manager AIX 5.3 and 6.1 SLES 10 for POWER RHEL 4, 5, 5.1 for POWER AIX 5.3 and 6.1 SLES 9 for POWER (10 for POWER6) RHEL 4, 5 for POWER (5.1 for POWER6) AIX 6.1 AIX 6.1 TL3 No AIX 5.3 support SUSE Linux Enterprise Server 11 IBM i 6.1 plus PTF SI32798 AIX 5.3 and 6.1 SLES 10 update 1 for POWER RHEL 5.1 for POWERCapacity Upgrade on DemandAll Editions (specific models)POWER4, 5 and 6Micro-PartitioningAll EditionsPOWER5 and 6Shared Dedicated CapacityAll EditionsPOWER6Multiple Shared Processor Pools Virtual I/O Server IVM Virtual SCSIPowerVM SE and EE All Editions PowerVM Express, SE and EE All EditionsPOWER6 with HMC POWER5 and 6 POWER5 and 6 POWER5 and 6Virtual EthernetAll EditionsPOWER5 and 6 POWER4, 5 and 6Workload Partitions (WPARs)Workload Partitions managerActive memory sharingPowerVM Enterprise EditionPOWER6Live Partition Page Mobility 8PowerVM Enterprise EditionPOWER6L3级课程云架构PowerVM 虚拟化技术特点Page 9L3级课程云架构PowerVM 技术特点概览灵活动态逻辑分区/微分区/WPAR Shared Dedicated Processor1 1 CPU CPU Virtual I/O server Virtual I/O server partition partitionIVM IVM Storage sharing Storage sharing Ethernet sharing Ethernet sharingLive Partition Mobility / Live Application Mobility 分区迁移 / 应用迁移4 4 CPUs CPUs4 4 CPU CPU1 1 CPUs CPUs4 4 CPUs CPUsLinux LinuxLinux LinuxAIX AIXAIX AIXAIX AIX22Hypervisor HypervisorVirtual I/O paths Virtual I/O pathsAIX AIXAIX AIXApp1 App2 3App3 App1 App2 App336 6 CPUs CPUs Micro-Partitioning Micro-PartitioningApp4 App4VIOS Virtual SCSI/FC/Ethernet SupportActive Memory Sharing 活动内存共享x86 Linux的支持IBM Systems Director VMControl 简化IT操作/降低成本Page 10A I X 5L V 5.3Dedicated processor partition (LPar)2 CPUsAIX 5L V5.3LinuxAIX6V6.1VIOS IVMIntegrated Virtualization ManagerIntegrated Virtualization MgrP P P Dedicated / SharedDedicatedProcessorsPlanned Dedicated Shared ProcessorsDonation option enabled, a dedicated partition donates its excesscycles to the uncapped partitions. Unused processor cycles are utilized.提高系统使用率Dedicated CoreShared Core2 partitions§Uncapped§Evenly weighted1 partitionTwo evenly weighted 1-way uncapped partitions ( 100% Utilized )Unused processor cycles in dedicated partition are wasted usedoverL3级课程云架构专用和共享资源的转换Development/Test/QA DB-Server ProductionDB-Server Test 1 Test 2 Permantenly load balancing within the shared poolApp 1App 2App 3Shared Pool Move dedicated resources to the shared poolDynamic movement of resources from/to dedicated LPARsPage 21QAL3级课程云架构虚拟I/O服务器虚拟 I/O服务器* AIX 或 Linux AIX 或 Linux 虚拟 I/O服务器*虚拟 SCSI 功能虚拟以太网功 能以太网FC以太网BB’虚拟以太网功 能虚拟 SCSI 功能Hypervisor以太网 B A 以太网 B’Ø 虚拟I/O架构l lØ 优势l l虚拟及/或物理设备的组合 支持多个VIO服务器*减少适配器、I/O抽屉和端口数量 加快部署速度Ø 虚拟SCSIl l lØ 虚拟以太网l l l虚拟 SCSI、光纤通道和DVD 逻辑和物理卷虚拟磁盘 多路径和冗余选项VLAN和链路汇聚支持 LPAR之间的虚拟局域网 高可用性选项* 通过PowerVM特性在Power Systems上提供。
PowerVM 分区快速划分配置工具的使用方法 在 PowerVM 虚拟化配置实施时,管理员经常要面对数十台物理服务器,数百个分区,如果采取手工配置与实施,工作量大、繁琐,且会造成大量的重复劳动。
针对这种情况,IBM 系统科技实验室服务部推出了 PowerVM 分区快速划分与配置工具:PowerVM Provisioning Toolkit. 该工具提供在 Power6 与 Power7 服务器上快速部署 VIOS 与 LPAR 的功能。
使用 PowerVM Provisioning Toolkit 带来的益处在 Power 服务器上配置实施 PowerVM(VIOS 与 LPAR)是一项十分复杂的工作,尤其是涉及到 SEA(shared Ethernet adapter)、VLAN、多个处理器资源池、NPIV、在线分区迁移(LPM)等虚拟化技术时。
因此,IBM 系统科技实验室服务部(STG Lab Services & Training)开发了一套工具来完成基于 Power 服务器虚拟化的快速部署,该工具目前可以通过购买 license 来使用,支持所有基于 HMC 管理的 Power5 以上的 Power 服务器,该工具运行环境为 AIX 系统,且易于迁移到 Linux 上。
更多请参考 /systems/services/labservices。
•集中快速部署一到多台服务器主机。
•一致性的管理与配置多台 VIOS 服务器分区与普通分区。
•集中存放主机部署信息到配置文件,方便验证配置信息以及方便复制以备以后的部署。
•快速的完成 VIOS 配置,包括网络(SEA,HEA)、存储(NPIV,VSCSI)。
•更快更有效、标准化的、可重复的部署虚拟化到所有的 Power 服务器。
PowerVM Provisioning Toolkit 使用方法说明PowerVM provisioning toolkit 为基于 ksh 编写的脚本工具集,有着使用方法简单、易于部署(不需要特殊的开发编译环境)、易于迁移的特性。
PowerVM常用命令手册目录目录 (1)1. 基本操作 (3)2. 创建VIOS分区 (3)3. VIOS配置 (7)3.1 创建共享以太网卡SEA(Shared Ethernet Adapter) (7)3.2 创建VSCSI虚拟磁盘 (7)3.3 NPIV配置 (12)3.4 参数调整 (16)3.5 VIO测试 (18)3.6 设置VIO Server分区自动启动 (19)4. VIOS巡检工作 (21)5. 虚拟资源的调整 (22)6. VIOS、VIOC配置实例 (25)7. WPAR技术 (32)7.1 创建Application WPAR (33)7.2 创建System WPAR (34)7.3 如何确定当前是在Global Environment中还是在WPAR中 (36)7.4如何关闭WPAR (36)7.5 如何重启WPAR (37)7.6修改WPAR的名字 (39)7.7 WPAR的状态 (39)7.8 删除WPAR (40)7.9 WPAR中的文件系统管理 (41)7.10 同步WPAR配置 (45)7.11备份、恢复、克隆WPAR (45)7.12 WPAR用户和组管理 (46)7.13 恢复WPAR中的用户口令 (46)7.14修改MPIO磁盘的hcheck_interval属性 (47)8. 存在多个VLAN ID的TCP/IP网络 (47)9. Active Memory Expansion(AME)技术 (50)10. 备份和恢复VIO Server (53)10.1 备份VIO Server (53)10.2 恢复VIO Server (55)11. 故障处理 (56)11.1 收集虚拟资源配置信息 (56)11.2更换VIO Server的SEA物理网卡 (56)12. topas性能监控 (58)1. 基本操作默认用户:padmin默认无密码默认用户环境为受限的Korn Shell切换到AIX root用户环境命令:oem_setup_env安装VIOS系统installios接受VIOS License文件命令:license -accept升级VIOS版本命令:updateios -commitupdateios -accept -install -dev /dev/cd0ioslevelshutdown -restart备份VIOS的配置:viosbr -backup -file /home/padmin/<backupfile_name>恢复VIOS的配置:viosbr -restore -file <backupfile_name>.tar.gz备份VIOS系统backupiosroot用户环境下输入VIOS配置命令:/usr/ios/cli/ioscli lsmap -all查看分区的CPU、内存配置lparstat -i2. 创建VIOS分区一个shared、uncapped Processor分区作为VIOS分区即可,在同一台服务器上可以部署多个VIOS分区,例如在网络IO和磁盘IO都很繁忙的应用环境,可以部署四个VIOS分区,其中两个VIOS负责处理Virtual Ethernet,另外两个VIOS负责处理Virtual Disk。