enhancement of supporting partition on IBM power 7R1/7R2 machines.
This commit is contained in:
parent
ce0d0e18f7
commit
35479c4cf9
@ -51,6 +51,8 @@ sub parse_args {
|
||||
sub chvm_parse_extra_options {
|
||||
my $args = shift;
|
||||
my $opt = shift;
|
||||
# Partition used attributes #
|
||||
my @support_ops = qw(vmcpus vmmemory vmphyslots vmothersetting);
|
||||
if (ref($args) ne 'ARRAY') {
|
||||
return "$args";
|
||||
}
|
||||
@ -71,7 +73,20 @@ sub chvm_parse_extra_options {
|
||||
# if ($value !~ /^\d+\/\d+\/\d+$/) {
|
||||
# return "'$value' invalid";
|
||||
# }
|
||||
} else {
|
||||
} elsif (grep(/^$cmd$/, @support_ops)) {
|
||||
if (exists($opt->{p775})) {
|
||||
return "'$cmd' doesn't work for Power 775 machines.";
|
||||
} elsif ($cmd eq "vmothersetting") {
|
||||
if ($value =~ /hugepage:\s*(\d+)/i) {
|
||||
$opt->{huge_page} = $1;
|
||||
}
|
||||
if ($value =~ /bsr:\s*(\d+)/i) {
|
||||
$opt->{bsr} = $1;
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
} else {
|
||||
return "'$cmd' not support";
|
||||
}
|
||||
$opt->{$cmd} = $value;
|
||||
@ -109,7 +124,7 @@ sub chvm_parse_args {
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
|
||||
if ( !GetOptions( \%opt, qw(V|verbose p=s i=s m=s r=s ) )) {
|
||||
if ( !GetOptions( \%opt, qw(V|verbose p=s i=s m=s r=s p775) )) {
|
||||
return( usage() );
|
||||
}
|
||||
####################################
|
||||
@ -126,8 +141,11 @@ sub chvm_parse_args {
|
||||
# return(usage( "Configuration file or attributes not specified" ));
|
||||
# }
|
||||
#}
|
||||
|
||||
if (exists($opt{p775})) {
|
||||
my @cfgdata ;
|
||||
if ((exists ($opt{p}) || defined($request->{stdin})) && !exists($opt{p775}) ) {
|
||||
return(usage("Profile just work for Power 775"));
|
||||
}
|
||||
if ( exists( $opt{p})) {
|
||||
|
||||
if ( exists( $opt{i} ) || exists( $opt{r}) || exists( $opt{m} ) ) {
|
||||
@ -302,6 +320,7 @@ sub chvm_parse_args {
|
||||
$request->{node} = [$other_p];
|
||||
$request->{noderange} = $other_p;
|
||||
}
|
||||
}
|
||||
####################################
|
||||
# Check for an extra argument
|
||||
####################################
|
||||
@ -347,21 +366,23 @@ sub mkvm_parse_args {
|
||||
#############################################
|
||||
# Process command-line arguments
|
||||
#############################################
|
||||
if ( !defined( $args )) {
|
||||
return(usage( "No command specified" ));
|
||||
}
|
||||
#if ( !defined( $args )) {
|
||||
# return(usage( "No command specified" ));
|
||||
#}
|
||||
#############################################
|
||||
# Checks case in GetOptions, allows opts
|
||||
# to be grouped (e.g. -vx), and terminates
|
||||
# at the first unrecognized option.
|
||||
#############################################
|
||||
@ARGV = @$args;
|
||||
if (defined($args)) {
|
||||
@ARGV = @$args;
|
||||
}
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
# if ( !GetOptions( \%opt, qw(V|verbose ibautocfg ibacap=s i=s l=s c=s p=s full) )) {
|
||||
# if ( !GetOptions( \%opt, qw(V|verbose ibautocfg ibacap=s i=s l=s c=s p=s m=s r=s full) )) {
|
||||
# return( usage() );
|
||||
# }
|
||||
if ( !GetOptions( \%opt, qw(V|verbose i=s m=s r=s full part vios) )) {
|
||||
if ( !GetOptions( \%opt, qw(V|verbose full vios) )) {
|
||||
return( usage() );
|
||||
}
|
||||
####################################
|
||||
@ -370,7 +391,37 @@ sub mkvm_parse_args {
|
||||
if ( grep(/^-$/, @ARGV )) {
|
||||
return(usage( "Missing option: -" ));
|
||||
}
|
||||
if (!exists($opt{p775})) {
|
||||
my @unsupport_ops = ();
|
||||
foreach my $tmpop (keys %opt) {
|
||||
if ($tmpop !~ /full|vios|V/) {
|
||||
push @unsupport_ops, $tmpop;
|
||||
}
|
||||
}
|
||||
my @support_ops = qw(vmcpus vmmemory vmphyslots vmothersetting);
|
||||
if (defined(@ARGV[0]) and defined($opt{full})) {
|
||||
return(usage("Option 'full' shall be used alone."));
|
||||
} elsif (defined(@ARGV[0])) {
|
||||
foreach my $arg (@ARGV) {
|
||||
my ($cmd,$val) = split (/=/,$arg);
|
||||
if (!grep(/^$cmd$/, @support_ops)) {
|
||||
push @unsupport_ops, $cmd;
|
||||
} elsif (!defined($val)) {
|
||||
return(usage("The option $cmd need specific parameters."));
|
||||
} else {
|
||||
$opt{$cmd} = $val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (@unsupport_ops) {
|
||||
my $tmpops = join(",",@unsupport_ops);
|
||||
return(usage( "The options $tmpops can only work(s) with Power 775 machines."));
|
||||
}
|
||||
} else {
|
||||
if (exists($opt{full}) or exists($opt{vios})) {
|
||||
return(usage( "Option 'p775' only works for Power 775 machines."));
|
||||
}
|
||||
####################################
|
||||
# Check for non-zero integer
|
||||
####################################
|
||||
@ -408,7 +459,7 @@ sub mkvm_parse_args {
|
||||
} else {
|
||||
return(usage( "Invalid entry: $opt{m}.\n For Power 775, the pending memory interleaving mode only could be interleaved(or 1), or non-interleaved(or 2)." ));
|
||||
}
|
||||
} elsif (!exists($opt{full}) && !exists($opt{part}) && !exists($opt{vios})){
|
||||
} elsif (exists($opt{p775})){
|
||||
$opt{m} = 2 ;# non-interleaved, which is the default
|
||||
}
|
||||
|
||||
@ -467,10 +518,10 @@ sub mkvm_parse_args {
|
||||
} #end of if
|
||||
|
||||
|
||||
if ( (!exists( $opt{i} ) || !exists( $opt{r} )) && !exists($opt{full}) && !exists($opt{part}) && !exists($opt{vios})) {
|
||||
if ( (!exists( $opt{i} ) || !exists( $opt{r} )) ) {
|
||||
return(usage());
|
||||
}
|
||||
|
||||
}
|
||||
$opt{target} = \@{$request->{node}};
|
||||
my $ppctab = xCAT::Table->new( 'ppc');
|
||||
unless($ppctab) {
|
||||
@ -495,7 +546,7 @@ sub mkvm_parse_args {
|
||||
return(usage("For Power 775, please make sure the noderange are in one CEC "));
|
||||
}
|
||||
}
|
||||
if (!exists($opt{full}) && !exists($opt{part}) &&!exists($opt{vios})) {
|
||||
if (exists($opt{p775})) {
|
||||
$request->{node} = [$other_p];
|
||||
$request->{noderange} = $other_p;
|
||||
}
|
||||
@ -541,11 +592,11 @@ sub rmvm_parse_args {
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
|
||||
if ( !GetOptions( \%opt, qw(V|verbose service r p|part) )) {
|
||||
if ( !GetOptions( \%opt, qw(V|verbose service r p775) )) {
|
||||
return( usage() );
|
||||
}
|
||||
|
||||
if (!exists($opt{p})) {
|
||||
if (exists($opt{p775})) {
|
||||
return(usage( "rmvm doesn't support for Power 775." ));
|
||||
}
|
||||
|
||||
@ -602,9 +653,12 @@ sub lsvm_parse_args {
|
||||
$Getopt::Long::ignorecase = 0;
|
||||
Getopt::Long::Configure( "bundling" );
|
||||
|
||||
if ( !GetOptions( \%opt, qw(V|verbose l|long p|part) )) {
|
||||
if ( !GetOptions( \%opt, qw(V|verbose l|long p775) )) {
|
||||
return( usage() );
|
||||
}
|
||||
if (exists($opt{l}) && !exists($opt{p775})) {
|
||||
return(usage( "option 'l' only works for Power 775"));
|
||||
}
|
||||
####################################
|
||||
# Check for "-" with no option
|
||||
####################################
|
||||
@ -632,8 +686,9 @@ sub modify {
|
||||
my $request = shift;
|
||||
my $hash = shift;
|
||||
my $usage_string = xCAT::Usage->getUsage($request->{command});
|
||||
return modify_by_prof( $request, $hash) if ( $request->{opt}->{p} || $request->{stdin});
|
||||
return create( $request, $hash) if ( $request->{opt}->{i});
|
||||
return modify_by_prof( $request, $hash) if ( exists($request->{opt}->{p775}) and ($request->{opt}->{p} || $request->{stdin}));
|
||||
return create( $request, $hash) if ( exists($request->{opt}->{p775}) and $request->{opt}->{i});
|
||||
return op_extra_cmds ($request, $hash) if (!exists($request->{opt}->{p775}));
|
||||
return op_extra_cmds ($request, $hash) if ($request->{opt}->{lparname} || $request->{opt}->{huge_page});
|
||||
return ([["Error", "Miss argument\n".$usage_string, 1]]);
|
||||
}
|
||||
@ -641,26 +696,72 @@ sub do_op_extra_cmds {
|
||||
my $request = shift;
|
||||
my $hash = shift;
|
||||
my @values = ();
|
||||
my $action;
|
||||
my $param;
|
||||
if (exists($request->{opt}->{lparname})) {
|
||||
$action = "set_lpar_name";
|
||||
$param = $request->{opt}->{lparname};
|
||||
} elsif (exists($request->{opt}->{huge_page})) {
|
||||
$action = "set_huge_page";
|
||||
$param = $request->{opt}->{huge_page};
|
||||
}
|
||||
my $lparname_para = $request->{opt}->{lparname};
|
||||
|
||||
while (my ($mtms, $h) = each(%$hash)) {
|
||||
my $memhash;
|
||||
while (my($name, $d) = each(%$h)) {
|
||||
my $tmp_value = ($param eq '*') ? $name : $param;
|
||||
xCAT::MsgUtils->verbose_message($request, "$request->{command} $action for node:$name, parm:$tmp_value.");
|
||||
my $value = xCAT::FSPUtils::fsp_api_action($request, $name, $d, $action, 0, $tmp_value);
|
||||
if (@$value[1] && ((@$value[1] =~ /Error/i) && (@$value[2] ne '0'))) {
|
||||
return ([[$name, @$value[1], '1']]) ;
|
||||
} else {
|
||||
push @values, [$name, "Success", '0'];
|
||||
}
|
||||
foreach my $op (keys %{$request->{opt}}) {
|
||||
my $action;
|
||||
my $param = $request->{opt}->{$op};
|
||||
if ($op eq "lparname") {
|
||||
$action = "set_lpar_name";
|
||||
} elsif ($op eq "huge_page") {
|
||||
$action = "set_huge_page";
|
||||
} elsif ($op eq "vmcpus") {
|
||||
$action = "part_set_lpar_pending_proc";
|
||||
} elsif ($op eq "vmphyslots") {
|
||||
$action = "set_io_slot_owner_uber";
|
||||
} elsif ($op eq "vmmemory") {
|
||||
my @td = @$d;
|
||||
@td[0] = 0;
|
||||
$memhash = &query_cec_info_actions($request, $name, \@td, 1, ["part_get_hyp_process_and_mem"]);
|
||||
if (!exists($memhash->{run})) {
|
||||
if ($param =~ /(\d+)([G|M]?)\/(\d+)([G|M]?)\/(\d+)([G|M]?)/i) {
|
||||
my $memsize = $memhash->{mem_region_size};
|
||||
my $min = $1;
|
||||
if ($2 == "G" or $2 == '') {
|
||||
$min = $min * 1024;
|
||||
}
|
||||
$min = $min/$memsize;
|
||||
my $cur = $3;
|
||||
if ($4 == "G" or $4 == '') {
|
||||
$cur = $cur * 1024;
|
||||
}
|
||||
$cur = $cur/$memsize;
|
||||
my $max = $5;
|
||||
if ($6 == "G" or $6 == '') {
|
||||
$max = $max * 1024;
|
||||
}
|
||||
$max = $max/$memsize;
|
||||
$request->{opt}->{$op} ="$min/$cur/$max";
|
||||
$param = $request->{opt}->{$op};
|
||||
} else {
|
||||
return([[$name, "The format of param:$param is incorrect.", 1]]);
|
||||
}
|
||||
$memhash->{run} = 1;
|
||||
}
|
||||
$memhash->{memory} = $param;
|
||||
$memhash->{lpar_used_regions} = 0;
|
||||
my $ret = &deal_with_avail_mem($request, $name, $d, $memhash);
|
||||
if (ref($ret) eq "ARRAY") {
|
||||
return ([[@$ret]]);
|
||||
}
|
||||
$param = $memhash->{memory};
|
||||
$action = "part_set_lpar_pending_mem";
|
||||
} elsif ($op eq "bsr") {
|
||||
$action = "set_lpar_bsr";
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
my $tmp_value = ($param eq '*') ? $name : $param;
|
||||
xCAT::MsgUtils->verbose_message($request, "$request->{command} $action for node:$name, parm:$tmp_value.");
|
||||
my $value = xCAT::FSPUtils::fsp_api_action($request, $name, $d, $action, 0, $tmp_value);
|
||||
if (@$value[1] && ((@$value[1] =~ /Error/i) && (@$value[2] ne '0'))) {
|
||||
return ([[$name, @$value[1], '1']]) ;
|
||||
} else {
|
||||
push @values, [$name, "Success", '0'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return \@values;
|
||||
@ -1459,7 +1560,7 @@ sub parse_part_get_info {
|
||||
$hash->{process_units_avail} = $2;
|
||||
} elsif ($line =~ /Authority Lpar id:(\w+)/i) {
|
||||
$hash->{service_lparid} = $1;
|
||||
} elsif ($line =~ /(\d+),(\d+),[^,]*,(\w+),[^,]*,[^,]*,\w*\(([\w| |-|_]*)\)/) {
|
||||
} elsif ($line =~ /(\d+),(\d+),[^,]*,(\w+),\w*\(([\w| |-|_]*)\)/) {
|
||||
$hash->{bus}->{$3}->{cur_lparid} = $1;
|
||||
$hash->{bus}->{$3}->{bus_slot} = $2;
|
||||
$hash->{bus}->{$3}->{des} = $4;
|
||||
@ -1471,10 +1572,15 @@ sub parse_part_get_info {
|
||||
#$hash->{logic_drc_phydrc}->{$5}->{$1} = [$2,$3,$4];
|
||||
}
|
||||
#} elsif ($line =~ /lpar 0:: Curr Memory::min: 1,cur: (\d+),max:/i) {
|
||||
} elsif ($line =~ /HYP Reserved Memory Regions:(\d+), Min Required Regions:(\d+)/i) {
|
||||
$hash->{lpar0_used_mem} = $1;
|
||||
$hash->{phy_min_mem_req} = $2;
|
||||
} elsif ($line =~ /HYP Reserved Memory Regions:([-]?)(\d+), Min Required Regions:(\d+)/i) {
|
||||
if ($1 eq '-') {
|
||||
$hash->{lpar0_used_dec} = 1;
|
||||
}
|
||||
$hash->{lpar0_used_mem} = $2;
|
||||
$hash->{phy_min_mem_req} = $3;
|
||||
#print "===>lpar0_used_mem:$hash->{lpar0_used_mem}.\n";
|
||||
} elsif ($line =~ /Curr Memory Req:[^\(]*\((\d+)\s*regions\)/) {
|
||||
$hash->{lpar_used_regions} = $1;
|
||||
} elsif ($line =~ /Available huge page memory\(in pages\):\s*(\d+)/) {
|
||||
$hash->{huge_page_avail} = $1;
|
||||
} elsif ($line =~ /Available BSR array:\s*(\d+)/) {
|
||||
@ -1501,7 +1607,8 @@ sub query_cec_info_actions {
|
||||
#$data .= "======> ret info for $action:\n";
|
||||
my $values = xCAT::FSPUtils::fsp_api_action($request, $name, $td, $action);
|
||||
chomp(@$values[1]);
|
||||
if ($action eq "part_get_partition_cap" and (@$values[1] =~ /Error:/i or @$values[2] ne 0)) {
|
||||
#if ($action eq "part_get_partition_cap" and (@$values[1] =~ /Error:/i or @$values[2] ne 0)) {
|
||||
if (@$values[1] =~ /Error:/i or @$values[2] ne 0) {
|
||||
return ([[@$values]]);
|
||||
}
|
||||
if (@$values[1] =~ /^$/) {
|
||||
@ -1629,21 +1736,38 @@ sub deal_with_avail_mem {
|
||||
my $max_required_regions;
|
||||
if ($lparhash->{memory} =~ /(\d+)\/(\d+)\/(\d+)/) {
|
||||
my ($min,$cur,$max);
|
||||
my $used_regions = 0;
|
||||
my $cur_avail = 0;
|
||||
$min = $1;
|
||||
$cur = $2;
|
||||
$max = $3;
|
||||
my $values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_get_hyp_res_mem_regions", 0, $3);
|
||||
my %tmphash;
|
||||
my $values;
|
||||
if (exists($lparhash->{lpar_used_regions})) {
|
||||
$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_get_lpar_memory");
|
||||
&parse_part_get_info(\%tmphash, @$values[1]);
|
||||
if (exists($tmphash{lpar_used_regions})) {
|
||||
$used_regions = $tmphash{lpar_used_regions};
|
||||
}
|
||||
}
|
||||
$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_get_hyp_res_mem_regions", 0, $3);
|
||||
&parse_part_get_info(\%tmphash, @$values[1]);
|
||||
if (exists($tmphash{lpar0_used_mem}) && exists($tmphash{phy_min_mem_req})) {
|
||||
if ($min < $tmphash{phy_min_mem_req}) {
|
||||
$min = $tmphash{phy_min_mem_req};
|
||||
}
|
||||
if ($lparhash->{hyp_avail_mem} - $tmphash{lpar0_used_mem} < $min) {
|
||||
return([$name, "Parse reserverd regions failed, no enough memory, availe:$lparhash->{hyp_avail_mem}.", 1]);
|
||||
}
|
||||
if ($cur > $lparhash->{hyp_avail_mem} - $tmphash{lpar0_used_mem}) {
|
||||
my $new_cur = $lparhash->{hyp_avail_mem} - $tmphash{lpar0_used_mem};
|
||||
|
||||
if (exists($lparhash->{lpar0_used_dec})) {
|
||||
$cur_avail = $lparhash->{hyp_avail_mem} + $used_regions + $tmphash{lpar0_used_mem};
|
||||
} else {
|
||||
$cur_avail = $lparhash->{hyp_avail_mem} + $used_regions - $tmphash{lpar0_used_mem};
|
||||
}
|
||||
xCAT::MsgUtils->verbose_message($request, "====****====used:$used_regions,avail:$cur_avail,($min:$cur:$max).");
|
||||
if ($cur_avail < $min) {
|
||||
return([$name, "Parse reserverd regions failed, no enough memory, available:$lparhash->{hyp_avail_mem}.", 1]);
|
||||
}
|
||||
if ($cur > $cur_avail) {
|
||||
my $new_cur = $cur_avail;
|
||||
$lparhash->{memory} = "$min/$new_cur/$max";
|
||||
}
|
||||
} else {
|
||||
@ -1669,7 +1793,7 @@ sub create_lpar {
|
||||
}
|
||||
$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "set_lpar_name", 0, $name);
|
||||
if (@$values[2] ne 0) {
|
||||
$values = &set_lpar_undefined($request, $name, $d);
|
||||
&set_lpar_undefined($request, $name, $d);
|
||||
return ([$name, @$values[1], @$values[0]]);
|
||||
}
|
||||
xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_set_lpar_shared_pool_util_auth");
|
||||
@ -1679,7 +1803,7 @@ sub create_lpar {
|
||||
$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "set_io_slot_owner_uber", 0, $lparhash->{physlots});
|
||||
#$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "set_io_slot_owner", 0, join(",",@phy_io_array));
|
||||
if (@$values[2] ne 0) {
|
||||
$values = &set_lpar_undefined($request, $name, $d);
|
||||
&set_lpar_undefined($request, $name, $d);
|
||||
return ([$name, @$values[1], @$values[2]]);
|
||||
}
|
||||
if (exists($lparhash->{phy_hea})) {
|
||||
@ -1707,7 +1831,7 @@ sub create_lpar {
|
||||
#print "======>cpus:$lparhash->{cpus}.\n";
|
||||
$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_set_lpar_pending_proc", 0, $lparhash->{cpus});
|
||||
if (@$values[2] ne 0) {
|
||||
$values = &set_lpar_undefined($request, $name, $d);
|
||||
&set_lpar_undefined($request, $name, $d);
|
||||
return ([$name, @$values[1], @$values[2]]);
|
||||
}
|
||||
$values = &deal_with_avail_mem($request, $name, $d,$lparhash);
|
||||
@ -1719,7 +1843,7 @@ sub create_lpar {
|
||||
#print "======>memory:$lparhash->{memory}.\n";
|
||||
$values = xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_set_lpar_pending_mem", 0, $lparhash->{memory});
|
||||
if (@$values[2] ne 0) {
|
||||
$values = &set_lpar_undefined($request, $name, $d);
|
||||
&set_lpar_undefined($request, $name, $d);
|
||||
return ([$name, @$values[1], @$values[2]]);
|
||||
}
|
||||
xCAT::FSPUtils::fsp_api_action($request, $name, $d, "part_set_lpar_comp_modes");
|
||||
@ -1742,6 +1866,7 @@ sub create_lpar {
|
||||
sub mkspeclpar {
|
||||
my $request = shift;
|
||||
my $hash = shift;
|
||||
my $opt = $request->{opt};
|
||||
my $values;
|
||||
my @result = ();
|
||||
my $vmtab = xCAT::Table->new( 'vm');
|
||||
@ -1760,25 +1885,37 @@ sub mkspeclpar {
|
||||
$memhash->{run} = 1;
|
||||
}
|
||||
my $tmp_ent = $ent->{$name}->[0];
|
||||
if (exists($opt->{vmcpus})) {
|
||||
$tmp_ent->{cpus} = $opt->{vmcpus};
|
||||
}
|
||||
if (exists($opt->{vmmemory})) {
|
||||
$tmp_ent->{memory} = $opt->{vmmemory};
|
||||
}
|
||||
if (exists($opt->{vmphyslots})) {
|
||||
$tmp_ent->{physlots} = $opt->{vmphyslots};
|
||||
}
|
||||
if (exists($opt->{vmothersetting})) {
|
||||
$tmp_ent->{othersettings} = $opt->{vmothersetting};
|
||||
}
|
||||
if (!defined($tmp_ent) ) {
|
||||
return ([[$name, "Not find params", 1]]);
|
||||
} elsif (!exists($tmp_ent->{cpus}) || !exists($tmp_ent->{memory}) || !exists($tmp_ent->{physlots})) {
|
||||
return ([[$name, "The attribute 'vmcpus', 'vmmemory' and 'vmphyslots' are all needed to be specified.", 1]]);
|
||||
}
|
||||
if ($tmp_ent->{memory} =~ /(\d+)(G|M)\/(\d+)(G|M)\/(\d+)(G|M)/i) {
|
||||
if ($tmp_ent->{memory} =~ /(\d+)([G|M]?)\/(\d+)([G|M]?)\/(\d+)([G|M]?)/i) {
|
||||
my $memsize = $memhash->{mem_region_size};
|
||||
my $min = $1;
|
||||
if ($2 == "G") {
|
||||
if ($2 == "G" or $2 == '') {
|
||||
$min = $min * 1024;
|
||||
}
|
||||
$min = $min/$memsize;
|
||||
my $cur = $3;
|
||||
if ($4 == "G") {
|
||||
if ($4 == "G" or $4 == '') {
|
||||
$cur = $cur * 1024;
|
||||
}
|
||||
$cur = $cur/$memsize;
|
||||
my $max = $5;
|
||||
if ($6 == "G") {
|
||||
if ($6 == "G" or $6 == '') {
|
||||
$max = $max * 1024;
|
||||
}
|
||||
$max = $max/$memsize;
|
||||
@ -1858,17 +1995,14 @@ sub mkvm {
|
||||
# decide if issuing mkvm with the option '-f'.
|
||||
# if yes, mklpar will be invoked to
|
||||
# create a full system partition for each CECs managed by the HMC.
|
||||
if ( exists($opt->{full})) {
|
||||
return( mkfulllpar(@_) );
|
||||
} elsif (exists($opt->{part})){
|
||||
return (mkspeclpar(@_));
|
||||
} elsif (exists($opt->{vios})) {
|
||||
return (mkspeclpar(@_));
|
||||
}
|
||||
else {
|
||||
# if no, it will execute the original function.
|
||||
return( create(@_) );
|
||||
}
|
||||
if (exists($opt->{p775})) {
|
||||
return (create(@_));
|
||||
}
|
||||
if (exists($opt->{full})) {
|
||||
return (mkfulllpar(@_));
|
||||
} else {
|
||||
return (mkspeclpar(@_));
|
||||
}
|
||||
}
|
||||
|
||||
##########################################################################
|
||||
@ -1885,10 +2019,10 @@ sub chvm {
|
||||
sub rmvm {
|
||||
my $request = $_[0];
|
||||
my $opt = $request->{opt};
|
||||
if (exists($opt->{p})) {
|
||||
return( remove(@_) );
|
||||
} else {
|
||||
if (exists($opt->{p775})) {
|
||||
return ([["lpar","rmvm only support Power Partitioning.", 1]]);
|
||||
} else {
|
||||
return( remove(@_) );
|
||||
}
|
||||
# return( remove(@_) );
|
||||
}
|
||||
@ -1900,10 +2034,10 @@ sub lsvm {
|
||||
my $request = shift;
|
||||
my $hash = shift;
|
||||
my $args = $request->{opt};
|
||||
if (exists($args->{p})) {
|
||||
return (query_cec_info($request, $hash));
|
||||
} else {
|
||||
if (exists($args->{p775})) {
|
||||
return( list($request, $hash) );
|
||||
} else {
|
||||
return (query_cec_info($request, $hash));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,13 +222,13 @@ vm => {
|
||||
'vncport' => 'Tracks the current VNC display port (currently not meant to be set',
|
||||
'textconsole' => 'Tracks the Psuedo-TTY that maps to the serial port or console of a VM',
|
||||
'powerstate' => "This flag is used by xCAT to track the last known power state of the VM.",
|
||||
'othersettings' => "This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware.",
|
||||
'othersettings' => "This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'.",
|
||||
'guestostype' => "This allows administrator to specify an identifier for OS to pass through to virtualization stack. Normally this should be ignored as xCAT will translate from nodetype.os rather than requiring this field be used\n",
|
||||
'beacon' => "This flag is used by xCAT to track the state of the identify LED with respect to the VM.",
|
||||
'datacenter' => "Optionally specify a datacenter for the VM to exist in (only applicable to VMWare)",
|
||||
'cluster' => 'Specify to the underlying virtualization infrastructure a cluster membership for the hypervisor.',
|
||||
'vidproto' => "Request a specific protocol for remote video access be set up. For example, spice in KVM.",
|
||||
'physlots' => "Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'.",
|
||||
'physlots' => "Specify the physical slots drc index that will assigned to the partition, the delimiter is ',', and the drc index must started with '0x'. For more details, please reference to manpage of 'lsvm'.",
|
||||
'vidmodel' => "Model of video adapter to provide to guest. For example, qxl in KVM",
|
||||
'vidpassword' => "Password to use instead of temporary random tokens for VNC and SPICE access",
|
||||
'storagecache' => "Select caching scheme to employ. E.g. KVM understands 'none', 'writethrough' and 'writeback'",
|
||||
|
@ -204,7 +204,9 @@ my %usage = (
|
||||
mkvm noderange -c destcec -p profile [-V|--verbose]
|
||||
mkvm noderange --full [-V|--verbose]
|
||||
PPC (using Direct FSP Management) specific:
|
||||
mkvm noderange <--full|--part>
|
||||
mkvm noderange [--full]
|
||||
mkvm noderange [vmcpus=min/req/max] [vmmemory=min/req/max]
|
||||
[vmphyslots=drc_index1,drc_index2...] [vmothersetting=hugepage:N,bsr:N]
|
||||
For KVM
|
||||
mkvm noderange -m|--master mastername -s|--size disksize -f|--force
|
||||
For zVM
|
||||
@ -218,7 +220,8 @@ my %usage = (
|
||||
PPC (with HMC) specific:
|
||||
lsvm <noderange> [-a|--all]
|
||||
PPC (using Direct FSP Management) specific:
|
||||
lsvm <noderange> [-l|--long] [-p|--part]
|
||||
lsvm <noderange> [-l|--long] --p775
|
||||
lsvm <noderange>
|
||||
zVM specific:
|
||||
lsvm noderange
|
||||
lsvm noderange --getnetworknames
|
||||
@ -233,9 +236,11 @@ my %usage = (
|
||||
chvm <noderange> [-p profile][-V|--verbose]
|
||||
chvm <noderange> <attr>=<val> [<attr>=<val>...]
|
||||
PPC (using Direct FSP Management) specific:
|
||||
chvm <noderange> [-p <profile>]
|
||||
chvm <noderange> --p775 [-p <profile>]
|
||||
chvm <noderange> --p775 -i <id> [-m <memory_interleaving>] -r <partition_rule>
|
||||
chvm <noderange> [lparname=<*|name>]
|
||||
chvm <noderange> -i <id> [-m <memory_interleaving>] -r <partition_rule>
|
||||
chvm <noderange> [vmcpus=min/req/max] [vmmemory=min/req/max]
|
||||
[vmphyslots=drc_index1,drc_index2...] [vmothersetting=hugepage:N,bsr:N]
|
||||
VMware specific:
|
||||
chvm <noderange> [-a size][-d disk][-p disk][--resize disk=size][--cpus count][--mem memory]
|
||||
zVM specific:
|
||||
@ -268,7 +273,7 @@ my %usage = (
|
||||
rmvm [-h|--help|-v|--version],
|
||||
rmvm [-p] [-f]
|
||||
PPC (using Direct FSP Management) specific:
|
||||
rmvm <noderange> [-p|--part]",
|
||||
rmvm <noderange>",
|
||||
"lsslp" =>
|
||||
"Usage: lsslp [-h|--help|-v|--version]
|
||||
lsslp [<noderange>][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s FRAME|CEC|MM|IVM|RSA|HMC|CMM|IMM2|FSP]
|
||||
|
@ -1,6 +1,6 @@
|
||||
=head1 NAME
|
||||
|
||||
B<chvm> - Changes HMC-, IVM-, and zVM-managed partition profiles or virtual machines. For Power 775, chvm could be used to change the octant configuration values for generating LPARs; change the I/O slots assignment to LPARs within the same CEC.
|
||||
B<chvm> - Changes HMC-, DFM-, IVM-, and zVM-managed partition profiles or virtual machines. For Power 775, chvm could be used to change the octant configuration values for generating LPARs; change the I/O slots assignment to LPARs within the same CEC.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@ -16,11 +16,14 @@ B<chvm> [B<-V>| B<--verbose>] I<noderange> I<attr>=I<val> [I<attr>=I<val>...]
|
||||
|
||||
=head2 PPC (using Direct FSP Management) specific:
|
||||
|
||||
B<chvm> I<noderange> [B<-p> I<profile>]
|
||||
B<chvm> I<noderange> I<--p775> [B<-p> I<profile>]
|
||||
|
||||
B<chvm> I<noderange> I<--p775> B<-i id> [B<-m> I<memory_interleaving>] B<-r> I<partition_rule>
|
||||
|
||||
B<chvm> I<noderange> [B<lparname>={B<*>|B<name>}]
|
||||
|
||||
B<chvm> I<noderange> B<-i id> [B<-m> I<memory_interleaving>] B<-r> I<partition_rule>
|
||||
B<chvm> I<noderange> [B<vmcpus=min/req/max>] [B<vmmemory=min/req/max>]
|
||||
[B<vmphyslots=drc_index1,drc_index2...>] [B<vmothersetting=hugepage:N,bsr:N>]
|
||||
|
||||
=head2 VMware/KVM specific:
|
||||
|
||||
@ -98,12 +101,18 @@ This command also supports to change specific partition attributes by specifying
|
||||
|
||||
=head2 PPC (using Direct FSP Management) specific:
|
||||
|
||||
For Power 755(use option I<--p775> to specify):
|
||||
|
||||
chvm could be used to change the octant configuration values for generating LPARs. chvm is designed to set the Octant configure value to split the CPU and memory for partitions, and set Octant Memory interleaving value. The chvm will only set the pending attributes value. After chvm, the CEC needs to be rebooted manually for the pending values to be enabled. Before reboot the cec, the administrator can use chvm to change the partition plan. If the the partition needs I/O slots, the administrator should use chvm to assign the I/O slots.
|
||||
|
||||
chvm is also designed to assign the I/O slots to the new LPAR. Both the current IO owning lpar and the new IO owning lpar must be powered off before an IO assignment. Otherwise, if the I/O slot is belonged to an Lpar and the LPAR is power on, the command will return an error when trying to assign that slot to a different lpar.
|
||||
|
||||
The administrator should use lsvm to get the profile content, and then edit the content, and add the node name with ":" manually before the I/O which will be assigned to the node. And then the profile can be piped into the chvm command, or changed with the -p flag.
|
||||
|
||||
For normal power machine:
|
||||
|
||||
chvm could be used to modify the resources assigned to partitions. The admin shall specify the attributes with options I<vmcpus>, I<vmmemory>, I<vmphyslots> and/or I<vmothersetting>. If nothing specified, nothing will be returned.
|
||||
|
||||
=head2 VMware/KVM specific:
|
||||
|
||||
The chvm command modifes the vm specified in noderange. Calling with deregister or purge options at the same time as the resize option is not recommended.
|
||||
@ -150,17 +159,21 @@ Verbose output.
|
||||
|
||||
=over 10
|
||||
|
||||
=item B<--p775>
|
||||
|
||||
Specify the operation is for Power 775 machines.
|
||||
|
||||
=item B<-i>
|
||||
|
||||
Starting numeric id of the newly created partitions. For Power 775 using Direct FSP Management, the id value only could be B<1>, B<5>, B<9>, B<13>, B<17>, B<21>, B<25> and B<29>.
|
||||
Starting numeric id of the newly created partitions. For Power 775 using Direct FSP Management, the id value only could be B<1>, B<5>, B<9>, B<13>, B<17>, B<21>, B<25> and B<29>. Shall work with option B<--p775>.
|
||||
|
||||
=item B<-m>
|
||||
|
||||
memory interleaving. The setting value only could be B<1> or B<2>. B<2> means B<non-interleaved> mode (also 2MC mode), the memory cannot be shared across the processors in an octant. B<1> means B<interleaved> mode (also 8MC mode) , the memory can be shared. The default value is B<1> .
|
||||
memory interleaving. The setting value only could be B<1> or B<2>. B<2> means B<non-interleaved> mode (also 2MC mode), the memory cannot be shared across the processors in an octant. B<1> means B<interleaved> mode (also 8MC mode) , the memory can be shared. The default value is B<1>. Shall work with option B<--p775>.
|
||||
|
||||
=item B<-r>
|
||||
|
||||
partition rule.
|
||||
partition rule. Shall work with option B<--p775>.
|
||||
|
||||
If all the octants configuration value are same in one CEC, it will be " B<-r> B<0-7>:I<value>" .
|
||||
|
||||
@ -176,12 +189,16 @@ The octants configuration value for one Octant could be B<1>, B<2>, B<3>, B<4>,
|
||||
|
||||
=item B<-p> I<profile>
|
||||
|
||||
Name of I/O slots assignment profile.
|
||||
Name of I/O slots assignment profile. Shall work with option B<--p775>.
|
||||
|
||||
=item B<lparname>={B<*>|B<name>}
|
||||
|
||||
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.
|
||||
|
||||
=item B<vmcpus=value> B<vmmemory=value> B<vmphyslots=value> B<vmothersetting=value>
|
||||
|
||||
To specify the parameters that will be modified.
|
||||
|
||||
=back
|
||||
|
||||
=head2 VMware/KVM specific:
|
||||
@ -385,7 +402,7 @@ Output is similar to:
|
||||
|
||||
then:
|
||||
|
||||
chvm lpar1 -i 1 -m 1 -r 0:1
|
||||
chvm lpar1 --p775 -i 1 -m 1 -r 0:1
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -398,7 +415,7 @@ Output is similar to:
|
||||
|
||||
then:
|
||||
|
||||
chvm lpar1-lpar8 -i 1 -m 1 -r 0-7:1
|
||||
chvm lpar1-lpar8 --p775 -i 1 -m 1 -r 0-7:1
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -418,7 +435,7 @@ Output is similar to:
|
||||
|
||||
then:
|
||||
|
||||
chvm lpar1-lpar9 -i 1 -m 1 -r 0:5,1-7:1
|
||||
chvm lpar1-lpar9 --p775 -i 1 -m 1 -r 0:5,1-7:1
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -441,11 +458,11 @@ Output is similar to:
|
||||
|
||||
then run the command:
|
||||
|
||||
cat /tmp/lparfile | chvm lpar4
|
||||
cat /tmp/lparfile | chvm lpar4 --p775
|
||||
|
||||
5. To change the I/O slot profile for lpar1-lpar8 using the configuration data in the file /tmp/lparfile. Users can use the output of lsvm.and remove the cec information, and modify the lpar id before each I/O, and run the command as following:
|
||||
|
||||
chvm lpar1-lpar8 -p /tmp/lparfile
|
||||
chvm lpar1-lpar8 --p775 -p /tmp/lparfile
|
||||
|
||||
6. To change the LPAR name, enter:
|
||||
|
||||
@ -454,6 +471,52 @@ then run the command:
|
||||
Output is similar to:
|
||||
|
||||
lpar1: Success
|
||||
|
||||
7. For Normal Power machine, to modify the resource assigned to a partition:
|
||||
|
||||
Before modify, the resource assigned to node 'lpar1' can be shown with:
|
||||
lsvm lpar1
|
||||
|
||||
The output is similar to:
|
||||
|
||||
lpar1: Lpar Processor Info:
|
||||
Curr Processor Min: 1.
|
||||
Curr Processor Req: 4.
|
||||
Curr Processor Max: 16.
|
||||
lpar1: Lpar Memory Info:
|
||||
Curr Memory Min: 1.00 GB(4 regions).
|
||||
Curr Memory Req: 4.00 GB(16 regions).
|
||||
Curr Memory Max: 32.00 GB(128 regions).
|
||||
lpar1: 1,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0xc03(USB Controller)
|
||||
lpar1: 1,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0x104(RAID Controller)
|
||||
lpar1: 1/2/2
|
||||
lpar1: 128.
|
||||
|
||||
To modify the resource assignment:
|
||||
|
||||
chvm lpar1 vmcpus=1/2/16 vmmemory=1G/8G/32G vmphyslots=0x21010202
|
||||
|
||||
The output is similar to:
|
||||
|
||||
lpar1: Success
|
||||
|
||||
The resource information after modification is similar to:
|
||||
|
||||
lpar1: Lpar Processor Info:
|
||||
Curr Processor Min: 1.
|
||||
Curr Processor Req: 2.
|
||||
Curr Processor Max: 16.
|
||||
lpar1: Lpar Memory Info:
|
||||
Curr Memory Min: 1.00 GB(4 regions).
|
||||
Curr Memory Req: 8.00 GB(32 regions).
|
||||
Curr Memory Max: 32.00 GB(128 regions).
|
||||
lpar1: 1,514,U78AA.001.WZSGVU7-P1-C19,0x21010202,0xffff(Empty Slot)
|
||||
lpar1: 1,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0xc03(USB Controller)
|
||||
lpar1: 1,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0x104(RAID Controller)
|
||||
lpar1: 1/2/2
|
||||
lpar1: 128.
|
||||
|
||||
Note: The physical I/O resources specified with I<vmphyslots> will be appended to the specified partition. The physical I/O resources which are not specified but belonged to the partition will not be removed. For more information about I<vmphyslots>, please refer to L<lsvm(1)|lsvm.1>.
|
||||
|
||||
=head2 VMware/KVM specific:
|
||||
|
||||
@ -520,7 +583,7 @@ Output is similar to:
|
||||
Output is similar to:
|
||||
|
||||
gpok3: Replacing user entry of LNX3... Done
|
||||
|
||||
|
||||
=head1 FILES
|
||||
|
||||
/opt/xcat/bin/chvm
|
||||
|
@ -1,6 +1,6 @@
|
||||
=head1 NAME
|
||||
|
||||
B<lsvm> - Lists partition profile information for HMC-, IVM-, KVM-, Vmware- and zVM-managed nodes. For Power 775, it lists the LPARs' I/O slots information and CEC configuration.
|
||||
B<lsvm> - Lists partition profile information for HMC-, DFM-, IVM-, KVM-, Vmware- and zVM-managed nodes. For Power 775, it lists the LPARs' I/O slots information and CEC configuration.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@ -14,9 +14,9 @@ B<lsvm> [B<-a>| B<--all>] I<noderange>
|
||||
|
||||
=head2 For PPC (using Direct FSP Management):
|
||||
|
||||
B<lsvm> [B<-l>| B<--long>] I<noderange>
|
||||
B<lsvm> [B<-l>| B<--long>] B<--p775> I<noderange>
|
||||
|
||||
B<lsvm> [B<-p>| B<--part>] I<noderange>
|
||||
B<lsvm> I<noderange>
|
||||
|
||||
=head2 For zVM:
|
||||
|
||||
@ -28,7 +28,9 @@ The lsvm command lists all partition profiles defined for the partitions specifi
|
||||
|
||||
=head2 For PPC (using Direct FSP Management):
|
||||
|
||||
For Power 775, lsvm lists all partition I/O slots information for the partitions specified in noderange. If noderange is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
|
||||
For Power 775(use option I<--p775> to specify), lsvm lists all partition I/O slots information for the partitions specified in noderange. If noderange is a CEC, it gets the CEC's pump mode value, octant's memory interleaving value, the all the octants configure value, and all the I/O slots information.
|
||||
|
||||
For DFM-managed (short for Direct FSP Management mode) normal power machine, lsvm lists the processor, memory, physical I/O slots, hugepage and BSR info for the specified partitions or CEC.
|
||||
|
||||
The pump mode value has the valid options:
|
||||
1 - Node Pump Mode
|
||||
@ -71,13 +73,13 @@ B<-a>
|
||||
|
||||
List all the profiles for one partition
|
||||
|
||||
B<--p775>
|
||||
|
||||
Specify the operation is for Power 775 machines.
|
||||
|
||||
B<-l>
|
||||
|
||||
Show lparnames for lpars.
|
||||
|
||||
B<-p|--part>
|
||||
|
||||
Show detailed information for lpars, such as processor, memory, physical IO slot, hugepage, BSR, etc.
|
||||
Show lparnames for lpars. It shall work with option B<--p775>.
|
||||
|
||||
=head1 RETURN VALUE
|
||||
|
||||
@ -107,7 +109,7 @@ g Output is similar to:
|
||||
|
||||
3. For Power 775, to list the I/O slot information of lpar1, enter:
|
||||
|
||||
lsvm lpar1
|
||||
lsvm lpar1 --p775
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -117,7 +119,7 @@ Output is similar to:
|
||||
|
||||
To list the lparname of lpars, enter:
|
||||
|
||||
lsvm lpar1 -l
|
||||
lsvm lpar1 -l --p775
|
||||
|
||||
Output is similar to:
|
||||
lpar1: 1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1
|
||||
@ -126,7 +128,7 @@ Output is similar to:
|
||||
|
||||
4. For Power 775, to list the I/O slot information and octant configuration of cec1, enter:
|
||||
|
||||
lsvm cec1
|
||||
lsvm cec1 --p775
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -159,7 +161,7 @@ Output is similar to:
|
||||
|
||||
To list the lparname of lpars, enter:
|
||||
|
||||
lsvm cec1 -l
|
||||
lsvm cec1 -l --p775
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -212,9 +214,9 @@ 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:
|
||||
6. For DFM-managed normal power machine, list out the detailed resource information:
|
||||
|
||||
lsvm cec -p
|
||||
lsvm cec
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -223,13 +225,13 @@ Output is similar to:
|
||||
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)
|
||||
65535,519,U78AA.001.WZSGVU7-P1-C7,0x21010207,0xffff(Empty Slot)
|
||||
65535,518,U78AA.001.WZSGVU7-P1-C6,0x21010206,0xffff(Empty Slot)
|
||||
65535,517,U78AA.001.WZSGVU7-P1-C5,0x21010205,0xffff(Empty Slot)
|
||||
65535,516,U78AA.001.WZSGVU7-P1-C4,0x21010204,0xffff(Empty Slot)
|
||||
65535,514,U78AA.001.WZSGVU7-P1-C19,0x21010202,0xffff(Empty Slot)
|
||||
65535,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0xc03(USB Controller)
|
||||
65535,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0x104(RAID Controller)
|
||||
cec: Huge Page Memory
|
||||
Available huge page memory(in pages): 2
|
||||
Configurable huge page memory(in pages): 2
|
||||
@ -241,9 +243,11 @@ Output is similar to:
|
||||
Bytes per BSR array: 4096
|
||||
Available BSR array: 256
|
||||
|
||||
For partition on normal power machine, list out the detailed information:
|
||||
Note: The lines list in "All Physical I/O info" section represent all the physical I/O resource information. The format is like "owner_lparid,slot_id,physical resource name,drc_index,slot_class_code(class discription)". The 'drc index' is short for Dynamic Resource Configuration Index, it uniquely indicate a physical I/O resource in normal power machine.
|
||||
|
||||
lsvm lpar1 -p
|
||||
For DFM-managed partition on normal power machine, list out the detailed information:
|
||||
|
||||
lsvm lpar1
|
||||
|
||||
Output is similar to:
|
||||
|
||||
@ -255,13 +259,13 @@ Output is similar to:
|
||||
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,519,U78AA.001.WZSGVU7-P1-C7,0x21010207,0xffff(Empty Slot)
|
||||
lpar1: 1,518,U78AA.001.WZSGVU7-P1-C6,0x21010206,0xffff(Empty Slot)
|
||||
lpar1: 1,517,U78AA.001.WZSGVU7-P1-C5,0x21010205,0xffff(Empty Slot)
|
||||
lpar1: 1,516,U78AA.001.WZSGVU7-P1-C4,0x21010204,0xffff(Empty Slot)
|
||||
lpar1: 1,514,U78AA.001.WZSGVU7-P1-C19,0x21010202,0xffff(Empty Slot)
|
||||
lpar1: 1,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0xc03(USB Controller)
|
||||
lpar1: 1,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0x104(RAID Controller)
|
||||
lpar1: 1/2/2
|
||||
lpar1: 256.
|
||||
|
||||
@ -275,4 +279,3 @@ Output is similar to:
|
||||
L<mkvm(1)|mkvm.1>, L<chvm(1)|chvm.1>, L<rmvm(1)|rmvm.1>
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=head1 NAME
|
||||
|
||||
B<mkvm> - Creates HMC-, IVM-, and zVM-managed partitions or other virtual machines.
|
||||
B<mkvm> - Creates HMC-, DFM-, IVM-, and zVM-managed partitions or other virtual machines.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@ -18,10 +18,12 @@ 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>]
|
||||
B<mkvm> I<noderange> [B<--full>]
|
||||
|
||||
B<mkvm> I<noderange> [B<vmcpus=min/req/max>] [B<vmmemory=min/req/max>]
|
||||
[B<vmphyslots=drc_index1,drc_index2...>] [B<vmothersetting=hugepage:N,bsr:N>]
|
||||
|
||||
=head2 For KVM:
|
||||
|
||||
@ -53,7 +55,7 @@ Please note that the mkvm command currently only supports creating standard LPAR
|
||||
|
||||
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.
|
||||
If no option is specified, a partition using the parameters specified with attributes such as 'vmcpus', 'vmmory', 'vmphyslots', 'vmothersetting' will be created. Those attributes can either be specified with '*def' commands running before or be specified with this command.
|
||||
|
||||
=head2 For KVM and Vmware:
|
||||
|
||||
@ -87,9 +89,9 @@ 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>
|
||||
=item B<vmcpus=value> B<vmmemory=value> B<vmphyslots=value> B<vmothersetting=value>
|
||||
|
||||
Request to create a partition with the specified parameters.
|
||||
To specify the parameters which are used to create a partition. The I<vmcpus>, I<vmmemory> and I<vmphyslots> are necessay, and the value specified with this command have a more high priority. If the value of any of the three options is not specified, the corresponding value specified for the node object will be used. If any of the three attributes is neither specified with this command nor specified with the node object, error information will be returned. To reference to L<lsvm(1)|lsvm.1> for more information about 'drc_index' for I<vmphyslots>.
|
||||
|
||||
=item B<-f|--force>
|
||||
|
||||
@ -133,7 +135,7 @@ Verbose output.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
1. To create a new partition lpar5 based on the profile/resources of lpar4, enter:
|
||||
1. To create a new HMC-managed partition lpar5 based on the profile/resources of lpar4, enter:
|
||||
|
||||
mkdef -t node -o lpar5 mgt=hmc groups=all
|
||||
|
||||
@ -146,7 +148,7 @@ Output is similar to:
|
||||
lpar5: Success
|
||||
|
||||
|
||||
2. To create new partitions lpar5-lpar8 based on the profile/resources of lpar4, enter:
|
||||
2. To create new HMC-managed partitions lpar5-lpar8 based on the profile/resources of lpar4, enter:
|
||||
|
||||
mkdef -t node -o lpar5-lpar8 mgt=hmc groups=all
|
||||
|
||||
@ -162,7 +164,7 @@ Output is similar to:
|
||||
lpar8: Success
|
||||
|
||||
|
||||
3. To duplicate all the partitions associated with cec01 on cec02, first save the lpars from cec01 to a file:
|
||||
3. To duplicate all the HMC-managed partitions associated with cec01 on cec02, first save the lpars from cec01 to a file:
|
||||
|
||||
lsvm lpar01-lpar04 > /tmp/myprofile
|
||||
|
||||
@ -178,7 +180,7 @@ Output is similar to:
|
||||
lpar8: Success
|
||||
|
||||
|
||||
4. To duplicate all the partitions associated with cec01 on cec02, one is for cec01, the other is for cec02:
|
||||
4. To duplicate all the HMC-managed partitions associated with cec01 on cec02, one is for cec01, the other is for cec02:
|
||||
|
||||
mkdef -t node -o lpar5,lpar6 mgt=hmc groups=all
|
||||
chtab node=lpar5 ppc.parent=cec01
|
||||
@ -248,27 +250,74 @@ The output is similar to:
|
||||
|
||||
lpar1: Done
|
||||
|
||||
To query the resources allocated to node 'lpar1', please reference L<lsvm(1)|lsvm.1>.
|
||||
To query the resources allocated to node 'lpar1'
|
||||
|
||||
lsvm lpar1
|
||||
|
||||
The 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,0xffff(Empty Slot)
|
||||
lpar1: 1,518,U78AA.001.WZSGVU7-P1-C6,0x21010206,0xffff(Empty Slot)
|
||||
lpar1: 1,517,U78AA.001.WZSGVU7-P1-C5,0x21010205,0xffff(Empty Slot)
|
||||
lpar1: 1,516,U78AA.001.WZSGVU7-P1-C4,0x21010204,0xffff(Empty Slot)
|
||||
lpar1: 1,514,U78AA.001.WZSGVU7-P1-C19,0x21010202,0xffff(Empty Slot)
|
||||
lpar1: 1,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0xc03(USB Controller)
|
||||
lpar1: 1,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0x104(RAID Controller)
|
||||
lpar1: 1/2/2
|
||||
lpar1: 256.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
Option 1:
|
||||
|
||||
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
|
||||
mkvm lpar1
|
||||
|
||||
Option 2:
|
||||
|
||||
mkvm lpar1 vmcpus=1/4/16 vmmemory=1G/4G/32G vmphyslots=0x21010201,0x21010200 vmothersetting=bsr:128,hugepage:2
|
||||
|
||||
The outout is similar to:
|
||||
|
||||
lpar1: Done
|
||||
|
||||
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 huge pages.
|
||||
|
||||
To query the resources allocated to node 'lpar1', please reference L<lsvm(1)|lsvm.1>.
|
||||
To query the resources allocated to node 'lpar1'
|
||||
|
||||
lsvm lpar1
|
||||
|
||||
The output is similar to:
|
||||
|
||||
lpar1: Lpar Processor Info:
|
||||
Curr Processor Min: 1.
|
||||
Curr Processor Req: 4.
|
||||
Curr Processor Max: 16.
|
||||
lpar1: Lpar Memory Info:
|
||||
Curr Memory Min: 1.00 GB(4 regions).
|
||||
Curr Memory Req: 4.00 GB(16 regions).
|
||||
Curr Memory Max: 32.00 GB(128 regions).
|
||||
lpar1: 1,513,U78AA.001.WZSGVU7-P1-T7,0x21010201,0xc03(USB Controller)
|
||||
lpar1: 1,512,U78AA.001.WZSGVU7-P1-T9,0x21010200,0x104(RAID Controller)
|
||||
lpar1: 1/2/2
|
||||
lpar1: 128.
|
||||
|
||||
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
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
=head1 NAME
|
||||
|
||||
B<rmvm> - Removes HMC-, IVM-, KVM-, Vmware- and zVM-managed partitions or virtual machines.
|
||||
B<rmvm> - Removes HMC-, DFM-, IVM-, KVM-, Vmware- and zVM-managed partitions or virtual machines.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@ -8,7 +8,6 @@ I<rmvm [-h| --help]>
|
||||
|
||||
I<rmvm [-v| --version]>
|
||||
|
||||
|
||||
I<rmvm [-V| --verbose] noderange [-r] [--service]>
|
||||
|
||||
=head2 For KVM and Vmware:
|
||||
@ -17,12 +16,14 @@ I<rmvm [-p] [-f]>
|
||||
|
||||
=head2 PPC (using Direct FSP Management) specific:
|
||||
|
||||
I<rmvm noderange> I<-p|--part>
|
||||
I<rmvm noderange>
|
||||
|
||||
=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.
|
||||
|
||||
For DFM-managed (short For Direct FSP Management mode) normal power machines, only partitions can be removed. No options is needed.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
|
||||
@ -50,7 +51,7 @@ B<-f> Force remove the VM, even if the VM appears to be online. This w
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
1. To remove the partition lpar3, enter:
|
||||
1. To remove the HMC-managed partition lpar3, enter:
|
||||
|
||||
I<rmvm lpar3>
|
||||
|
||||
@ -58,7 +59,7 @@ Output is similar to:
|
||||
|
||||
lpar3: Success
|
||||
|
||||
2. To remove all the partitions associated with CEC cec01, enter:
|
||||
2. To remove all the HMC-managed partitions associated with CEC cec01, enter:
|
||||
|
||||
I<rmvm cec01>
|
||||
|
||||
@ -68,7 +69,7 @@ Output is similar to:
|
||||
lpar2: Success
|
||||
lpar3: Success
|
||||
|
||||
3. To remove the service partitions of the specified CEC cec01 and cec02, enter:
|
||||
3. To remove the HMC-managed service partitions of the specified CEC cec01 and cec02, enter:
|
||||
|
||||
I<rmvm cec01,cec02 --service>
|
||||
|
||||
@ -77,7 +78,7 @@ Output is similar to:
|
||||
cec01: Success
|
||||
cec02: Success
|
||||
|
||||
4. To remove the partition lpar1, but retain its definition, enter:
|
||||
4. To remove the HMC-managed partition lpar1, but retain its definition, enter:
|
||||
|
||||
I<rmvm lpar1 -r>
|
||||
|
||||
@ -94,9 +95,9 @@ Output is similar to:
|
||||
gpok4: Deleting virtual server LNX4... Done
|
||||
|
||||
|
||||
6. To remove a partition on normal power machine.
|
||||
6. To remove a DFM-managed partition on normal power machine:
|
||||
|
||||
I<rmvm lpar1 -p>
|
||||
I<rmvm lpar1>
|
||||
|
||||
Output is similar to:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user