Modify manpage for mkvm, lsvm, rmvm. And checking if parition is disabled.

This commit is contained in:
zhaoertao 2013-09-05 01:07:45 -07:00
parent 371c4c79a9
commit ec4622a096
4 changed files with 130 additions and 6 deletions

View File

@ -1499,7 +1499,10 @@ sub query_cec_info_actions {
foreach my $action (@$action_array) {
#$data .= "======> ret info for $action:\n";
my $values = xCAT::FSPUtils::fsp_api_action($request, $name, $td, $action);
chomp(@$values[1]);
chomp(@$values[1]);
if ($action eq "part_get_partition_cap" and (@$values[1] =~ /Error:/i or @$values[2] ne 0)) {
return ([[@$values]]);
}
if (@$values[1] =~ /^$/) {
next;
}

View File

@ -16,6 +16,8 @@ B<lsvm> [B<-a>| B<--all>] I<noderange>
B<lsvm> [B<-l>| B<--long>] I<noderange>
B<lsvm> [B<-p>| B<--part>] I<noderange>
=head2 For zVM:
B<lsvm> I<noderange>
@ -73,6 +75,9 @@ B<-l>
Show lparnames for lpars.
B<-p|--part>
Show detailed information for lpars, such as processor, memory, physical IO slot, hugepage, BSR, etc.
=head1 RETURN VALUE
@ -190,7 +195,6 @@ Output is similar to:
Page Size(in GB): 16
Maximum huge page memory(in pages): 24
Requested huge page memory(in pages): 15
=======
Number of BSR arrays: 256,Bytes per BSR array: 4096,Available BSR array: 0;
Available huge page memory(in pages): 0
Configurable huge page memory(in pages): 12
@ -208,6 +212,59 @@ Output is similar to:
gpok3: INCLUDE LNXDFLT
gpok3: COMMAND SET VSWITCH VSW2 GRANT LNX3
6. For normal power machine, list out the detailed resource information:
lsvm cec -p
Output is similar to:
cec: HYP Configurable Processors: 16, Avail Processors: 16.
HYP Configurable Memory:32.00 GB(128 regions).
HYP Available Memory: 31.25 GB(125 regions).
HYP Memory Region Size: 0.25 GB(256 MB).
cec: All Physical I/O info:
65535,519,U78AA.001.WZSGVU7-P1-C7,0x21010207,0,0,0xffff(Empty Slot)
65535,518,U78AA.001.WZSGVU7-P1-C6,0x21010206,0,0,0xffff(Empty Slot)
65535,517,U78AA.001.WZSGVU7-P1-C5,0x21010205,0,0,0xffff(Empty Slot)
65535,516,U78AA.001.WZSGVU7-P1-C4,0x21010204,0,0,0xffff(Empty Slot)
65535,514,U78AA.001.WZSGVU7-P1-C19,0x21010202,0,0,0xffff(Empty Slot)
65535,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0,0,0xc03(USB Controller)
65535,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0,0,0x104(RAID Controller)
cec: Huge Page Memory
Available huge page memory(in pages): 2
Configurable huge page memory(in pages): 2
Page Size(in GB): 16
Maximum huge page memory(in pages): 4
Requested huge page memory(in pages): 2
cec: Barrier Synchronization Register(BSR)
Number of BSR arrays: 256
Bytes per BSR array: 4096
Available BSR array: 256
For partition on normal power machine, list out the detailed information:
lsvm lpar1 -p
Output is similar to:
lpar1: Lpar Processor Info:
Curr Processor Min: 1.
Curr Processor Req: 16.
Curr Processor Max: 16.
lpar1: Lpar Memory Info:
Curr Memory Min: 0.25 GB(1 regions).
Curr Memory Req: 30.75 GB(123 regions).
Curr Memory Max: 32.00 GB(128 regions).
lpar1: 1,519,U78AA.001.WZSGVU7-P1-C7,0x21010207,0,0,0xffff(Empty Slot)
lpar1: 1,518,U78AA.001.WZSGVU7-P1-C6,0x21010206,0,0,0xffff(Empty Slot)
lpar1: 1,517,U78AA.001.WZSGVU7-P1-C5,0x21010205,0,0,0xffff(Empty Slot)
lpar1: 1,516,U78AA.001.WZSGVU7-P1-C4,0x21010204,0,0,0xffff(Empty Slot)
lpar1: 1,514,U78AA.001.WZSGVU7-P1-C19,0x21010202,0,0,0xffff(Empty Slot)
lpar1: 1,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0,0,0xc03(USB Controller)
lpar1: 1,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0,0,0x104(RAID Controller)
lpar1: 1/2/2
lpar1: 256.
=head1 FILES
/opt/xcat/bin/lsvm

View File

@ -10,7 +10,7 @@ B<mkvm> [B<-h>| B<--help>]
B<mkvm> [B<-v>| B<--version>]
=head2 For PPC (with HMC):
=head2 For PPC (with HMC) specific:
B<mkvm> [B<-V>| B<--verbose>] I<noderange> B<-i> I<id> B<-l> I<singlenode>
@ -18,6 +18,11 @@ B<mkvm> [B<-V>| B<--verbose>] I<noderange> B<-c> I<destcec> B<-p> I<profile>
B<mkvm> [B<-V>| B<--verbose>] I<noderange> B<--full>
=head2 For PPC (using Direct FSP Management) specific:
B<mkvm> [I<noderange> B<--full> B<--part>]
=head2 For KVM:
B<mkvm> I<noderange> [B<-m|--master> I<mastername>] [B<-s|--size> I<disksize>] [B<--mem> I<memsize>] [B<--cpus> I<cpucount>] [B<-f|--force>]
@ -34,9 +39,7 @@ B<mkvm> I<noderange> [I<source_virtual_machine>] [B<pool=> I<disk_pool>]
=head1 DESCRIPTION
=head2 For PPC:
For PPC (with HMC) specific:
=head2 For PPC (with HMC) specific:
The first form of mkvm command creates new partition(s) with the same profile/resources as the partition specified by I<singlenode>. The -i and I<noderange> specify the starting numeric partition number and the I<noderange> for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition.
@ -46,6 +49,12 @@ Please make sure the nodes in the I<noderange> is defined in the I<nodelist> tab
Please note that the mkvm command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server.
=head2 For PPC (using Direct FSP Management) specific:
With option I<full>, a partition using all the resources on a normal power machine will be created.
With option I<part>, a partition using the parameters specified with attributes such as 'vmcpus', 'vmmory', 'vmphyslots', 'vmothersetting' will be created.
=head2 For KVM and Vmware:
The mkvm command creates new virtual machine(s) with the I<disksize> size of hard disk, I<memsize> size of memory and I<cpucount> number of cpu.
@ -78,6 +87,10 @@ The cpu count which will be created for the kvm/vmware virtual machine.
Request to create a new full system partition for each CEC.
=item B<--part>
Request to create a partition with the specified parameters.
=item B<-f|--force>
If B<-f|--force> is specified, the storage will be destroyed first if it existed.
@ -221,6 +234,42 @@ Output is similar to:
mkvm vm1 -s 10G --mem 2048 --cpus 2
8. To create a full partition on normal power machine.
First, define a node object:
mkdef -t node -o lpar1 mgt=fsp cons=fsp nodetype=ppc,osi id=1 hcp=cec parent=cec hwtype=lpar groups=lpar,all
Then, create the partion on the specified cec.
mkvm lpar1 --full
The output is similar to:
lpar1: Done
To query the resources allocated to node 'lpar1', please reference L<lsvm(1)|lsvm.1>.
Note: The 'parent' attribute for node 'lpar1' is the object name of physical power machine that the full partition will be created on.
9. To create a partition using some of the resources on normal power machine.
After a node object is defined, the resources that will be used for the partition shall be specified like this:
chdef lpar1 vmcpus=1/4/16 vmmemory=1G/4G/32G vmphyslots=0x21010201,0x21010200 vmothersetting=bsr:128,hugepage:2
Then, create the partion on the specified cec.
mkvm lpar1 --part
The outout is similar to:
lpar1: Done
To query the resources allocated to node 'lpar1', please reference L<lsvm(1)|lsvm.1>.
Note: The 'vmplyslots' specify the drc index of the physical slot device. Every drc index shall be delimited with ','. The 'vmothersetting' specify two kinds of resource, bsr(Barrier Synchronization Register) specified the num of BSR arrays, hugepage(Huge Page Memory) specified the num of pages.
=head1 FILES
/opt/xcat/bin/mkvm

View File

@ -15,6 +15,10 @@ I<rmvm [-V| --verbose] noderange [-r] [--service]>
I<rmvm [-p] [-f]>
=head2 PPC (using Direct FSP Management) specific:
I<rmvm noderange> I<-p|--part>
=head1 DESCRIPTION
The rmvm command removes the partitions specified in noderange. If noderange is an CEC, all the partitions associated with that CEC will be removed. Note that removed partitions are automatically removed from the xCAT database. For IVM-managed systems, care must be taken to not remove the VIOS partition, or all the associated partitions will be removed as well.
@ -34,6 +38,8 @@ B<--service> Remove the service partitions of the specified CECs.
B<-p> Purge the existence of the VM from persistant storage. This will erase all storage related to the VM in addition to removing it from the active virtualization configuration.
B<-p|--part> Remove the specified partiton on normal power machine.
B<-f> Force remove the VM, even if the VM appears to be online. This will bring down a live VM if requested.
=head1 RETURN VALUE
@ -87,6 +93,15 @@ Output is similar to:
gpok4: Deleting virtual server LNX4... Done
6. To remove a partition on normal power machine.
I<rmvm lpar1 -p>
Output is similar to:
lpar1: Done
=head1 FILES
/opt/xcat/bin/rmvm