From 652509f261cb1170961e79409ef7133dcaec171d Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Mon, 25 Jul 2011 03:38:47 +0000 Subject: [PATCH] the implementation of supporting sync LPAR name git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10146 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/FSPUtils.pm | 2 +- xCAT-client/pods/man1/chvm.1.pod | 14 +++++++++++ xCAT-client/pods/man1/lsvm.1.pod | 42 ++++++++++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/perl-xCAT/xCAT/FSPUtils.pm b/perl-xCAT/xCAT/FSPUtils.pm index 388e09b55..afc47c99a 100644 --- a/perl-xCAT/xCAT/FSPUtils.pm +++ b/perl-xCAT/xCAT/FSPUtils.pm @@ -152,7 +152,7 @@ sub fsp_api_action { $cmd = "$fsp_api -a $action -T $tooltype -f $parameter -t $type:$fsp_ip:$id:$node_name:"; } else { if( defined($parameter) ) { - if ($action =~ /^(set_frame_name|set_cec_name)$/) { + if ($action =~ /^set_(frame|cec|lpar)_name$/) { $cmd = "$fsp_api -a $action -n $parameter -T $tooltype -t $type:$fsp_ip:$id:$node_name:"; } else { $cmd = "$fsp_api -a $action -T $tooltype -t $type:$fsp_ip:$id:$node_name:$parameter"; diff --git a/xCAT-client/pods/man1/chvm.1.pod b/xCAT-client/pods/man1/chvm.1.pod index 82afec4dc..56be6192f 100644 --- a/xCAT-client/pods/man1/chvm.1.pod +++ b/xCAT-client/pods/man1/chvm.1.pod @@ -18,6 +18,8 @@ B [B<-V>| B<--verbose>] I I=I [I=I...] B I [B<-p> I] +B I [B={B<*>|B}] + B I B<-i id> [B<-m> I] B<-r> I =head2 VMware/KVM specific: @@ -110,6 +112,10 @@ The octants configuration value for one Octant could be B<1>, B<2>, B<3>, B<4>, Name of I/O slots assignment profile. +=item B={B<*>|B} + +Set LPAR name for the specified lpars. If '*' specified, it means to get names from xCAT database and then set them for the specified lpars. If a string is specified, it only supports single node and the string will be set for the specified lpar. The user can use lsvm to check the lparnames for lpars. + =back =head2 VMware/KVM specific: @@ -246,6 +252,14 @@ then run the command: chvm lpar1-lpar8 -p /tmp/lparfile +6. To change the LPAR name, enter: + + chvm lpar1 lparname=test_lpar01 + +Output is similar to: + + lpar1: Success + =head2 VMware/KVM specific: chvm vm1 -a 8,16 --mem 512 --cpus 2 diff --git a/xCAT-client/pods/man1/lsvm.1.pod b/xCAT-client/pods/man1/lsvm.1.pod index 5da9f058e..a9b74cb18 100644 --- a/xCAT-client/pods/man1/lsvm.1.pod +++ b/xCAT-client/pods/man1/lsvm.1.pod @@ -14,7 +14,7 @@ B [B<-a>| B<--all>] I =head2 For PPC (using Direct FSP Management): -B I +B [B<-l>| B<--long>] I =head1 DESCRIPTION @@ -43,6 +43,10 @@ B<-a> List all the profiles for one partition +B<-l> + +Show lparnames for lpars. + =head1 RETURN VALUE 0 The command completed successfully. @@ -63,7 +67,7 @@ Output is similar to: lsvm cec01 -Output is similar to: +g Output is similar to: cec01: name=10-B7D1G,lpar_name=10-B7D1G,lpar_id=1,os_type=vioserver,all_resources=0,min_mem=512, desired_mem=2048,max_mem=2048,proc_mode=shared,min_proc_units=0.10,desired_proc_units=0.40, max_proc_units=4.00,min_procs=1,desired_procs=4,max_procs=4,sharing_mode=uncap,uncap_weight=128, "io_slots=21010002/none/0,21010003/none/0,21010004/none/0,21020003/none/0,21020004/none/0,21030003/none/0,21030004/none/0,21040003/none/0,21040004/none/0",lpar_io_pool_ids=none,max_virtual_slots=48, "virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1,10/client/0/2/lp2/0/0,12/client/0/3/lp3/0/0,14/client/0/4/lp4/0/0","virtual_scsi_adapters=11/server/2/lp2/2/0,13/server/3/lp3/2/0,15/server/4/lp4/2/0","virtual_eth_adapters=3/0/1//1/0,4/0/2//1/0,5/0/3//1/0,6/0/4//1/0",boot_mode=norm,conn_monitoring=0,auto_start=0,power_ctrl_lpar_ids=none name=lp2,lpar_name=lp2,lpar_id=2,os_type=aixlinux,all_resources=0,min_mem=128,desired_mem=1024,max_mem=1024,proc_mode=shared,min_proc_units=0.10,desired_proc_units=0.10,max_proc_units=4.00,min_procs=1,desired_procs=1,max_procs=4,sharing_mode=uncap,uncap_weight=128,io_slots=none,lpar_io_pool_ids=none,max_virtual_slots=6, "virtual_serial_adapters=0/server/1/any//any/1,1/server/1/any//any/1",virtual_scsi_adapters=2/client/1/10-7D1G/11/1,virtual_eth_adapters=4/0/1//0/0,boot_mode=norm,conn_monitoring=0,auto_start=0,power_ctrl_lpar_ids=none @@ -79,6 +83,15 @@ Output is similar to: 1: 513/U78A9.001.0123456-P1-C15/0x21010201/2/1 1: 512/U78A9.001.0123456-P1-C16/0x21010200/2/1 +To list the lparname of lpars, enter: + + lsvm lpar1 -l + +Output is similar to: + lpar1: 1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1 + lpar1: 1: 513/U78A9.001.0123456-P1-C15/0x21010201/2/1 + lpar1: 1: 512/U78A9.001.0123456-P1-C16/0x21010200/2/1 + 4. For Power 775, to list the I/O slot information and octant configuration of cec1, enter: lsvm cec1 @@ -104,6 +117,31 @@ Output is similar to: 9: 528/U78A9.001.0123456-P1-C12/0x21010210/2/9 cec1: PendingPumpMode=1,CurrentPumpMode=1,OctantCount=8:OctantID=0,PendingOctCfg=5,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=1,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=2,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=3,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=4,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=5,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2; +To list the lparname of lpars, enter: + + lsvm cec1 -l + +Output is similar to: + + lpar1: 1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1 + lpar1: 1: 513/U78A9.001.0123456-P1-C15/0x21010201/2/1 + lpar1: 1: 512/U78A9.001.0123456-P1-C16/0x21010200/2/1 + lpar13: 13: 537/U78A9.001.0123456-P1-C9/0x21010219/2/13 + lpar13: 13: 536/U78A9.001.0123456-P1-C10/0x21010218/2/13 + lpar17: 17: 545/U78A9.001.0123456-P1-C7/0x21010221/2/17 + lpar17: 17: 544/U78A9.001.0123456-P1-C8/0x21010220/2/17 + lpar21: 21: 553/U78A9.001.0123456-P1-C5/0x21010229/2/21 + lpar21: 21: 552/U78A9.001.0123456-P1-C6/0x21010228/2/21 + lpar24: 25: 569/U78A9.001.0123456-P1-C1/0x21010239/2/25 + lpar25: 25: 561/U78A9.001.0123456-P1-C3/0x21010231/2/25 + lpar25: 25: 560/U78A9.001.0123456-P1-C4/0x21010230/2/25 + lpar29: 29: 568/U78A9.001.0123456-P1-C2/0x21010238/2/29 + lpar5: 5: 521/U78A9.001.0123456-P1-C13/0x21010209/2/5 + lpar5: 5: 520/U78A9.001.0123456-P1-C14/0x21010208/2/5 + lpar9: 9: 529/U78A9.001.0123456-P1-C11/0x21010211/2/9 + lpar9: 9: 528/U78A9.001.0123456-P1-C12/0x21010210/2/9 + cec1: PendingPumpMode=1,CurrentPumpMode=1,OctantCount=8:OctantID=0,PendingOctCfg=5,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=1,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=2,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=3,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=4,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=5,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=6,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2;OctantID=7,PendingOctCfg=1,CurrentOctCfg=1,PendingMemoryInterleaveMode=2,CurrentMemoryInterleaveMode=2; + =head1 FILES /opt/xcat/bin/lsvm