make options for chvm easier to understand
This commit is contained in:
parent
dd1478c5e1
commit
7b4aea756f
@ -52,10 +52,10 @@ my @query_array = ();
|
||||
my %param_list_map = (
|
||||
'vmcpus' => 'part_get_lpar_processing',
|
||||
'vmmemory' => 'part_get_lpar_memory',
|
||||
'vmphyslots' => 'part_get_all_io_bus_info',
|
||||
'add_physlots' => 'part_get_all_io_bus_info',
|
||||
'del_physlots' => 'part_get_all_io_bus_info',
|
||||
'vmnics' => 'part_get_all_vio_info',
|
||||
'vmstorage' => 'part_get_all_vio_info',
|
||||
'add_vmnics' => 'part_get_all_vio_info',
|
||||
'add_vmstorage' => 'part_get_all_vio_info',
|
||||
'del_vadapter' => 'part_get_all_vio_info'
|
||||
);
|
||||
|
||||
@ -63,7 +63,7 @@ sub chvm_parse_extra_options {
|
||||
my $args = shift;
|
||||
my $opt = shift;
|
||||
# Partition used attributes #
|
||||
my @support_ops = qw(vmcpus vmmemory vmphyslots vmothersetting vmstorage vmnics del_vadapter del_physlots);
|
||||
my @support_ops = qw(vmcpus vmmemory add_physlots vmothersetting add_vmstorage add_vmnics del_vadapter del_physlots);
|
||||
if (ref($args) ne 'ARRAY') {
|
||||
return "$args";
|
||||
}
|
||||
@ -112,7 +112,7 @@ sub chvm_parse_extra_options {
|
||||
$tmp_hash{'get_cec_bsr'} = 1;
|
||||
}
|
||||
next;
|
||||
} elsif ($cmd eq "vmstorage") {
|
||||
} elsif ($cmd eq "add_vmstorage") {
|
||||
if (exists($opt->{vios})) {
|
||||
if ($value !~ /\d+/) {
|
||||
return "'$value' is invalid, must be numbers";
|
||||
@ -156,7 +156,7 @@ sub chvm_parse_extra_options {
|
||||
} else {
|
||||
return "'$value' is invalid";
|
||||
}
|
||||
} elsif ($cmd eq "vmphyslots") {
|
||||
} elsif ($cmd eq "add_physlots") {
|
||||
my @tmp_array = split ",",$value;
|
||||
foreach (@tmp_array) {
|
||||
unless (/(0x\w{8})/) {
|
||||
@ -170,7 +170,7 @@ sub chvm_parse_extra_options {
|
||||
return "'$_' is invalid";
|
||||
}
|
||||
}
|
||||
} elsif ($cmd eq "vmnics") {
|
||||
} elsif ($cmd eq "add_vmnics") {
|
||||
my @tmp_array = split ",", $value;
|
||||
foreach (@tmp_array) {
|
||||
unless (/^vlan\d+$/i) {
|
||||
@ -804,11 +804,11 @@ sub do_op_extra_cmds {
|
||||
$action = "set_huge_page";
|
||||
} elsif ($op eq "vmcpus") {
|
||||
$action = "part_set_lpar_pending_proc";
|
||||
} elsif ($op eq "vmphyslots" or $op eq "del_physlots") {
|
||||
} elsif ($op eq "add_physlots" or $op eq "del_physlots") {
|
||||
$action = "set_io_slot_owner_uber";
|
||||
} elsif ($op eq "del_vadapter") {
|
||||
$action = "part_clear_vslot_config";
|
||||
} elsif ($op eq "vmnics") {
|
||||
} elsif ($op eq "add_vmnics") {
|
||||
my @vlans = split /,/,$param;
|
||||
foreach (@vlans) {
|
||||
if (/vlan(\d+)/i) {
|
||||
@ -827,7 +827,7 @@ sub do_op_extra_cmds {
|
||||
}
|
||||
}
|
||||
next;
|
||||
} elsif ($op eq "vmstorage") {
|
||||
} elsif ($op eq "add_vmstorage") {
|
||||
foreach my $v_info (@$param) {
|
||||
if ($v_info =~ /(\d+),([\w_-]*):(\d+)/) {
|
||||
my $vios = &find_lpar_id($request, @$d[3], $2);
|
||||
|
@ -241,8 +241,9 @@ my %usage = (
|
||||
chvm <noderange> --p775 -i <id> [-m <memory_interleaving>] -r <partition_rule>
|
||||
chvm <noderange> [lparname=<*|name>]
|
||||
chvm <noderange> [vmcpus=min/req/max] [vmmemory=min/req/max]
|
||||
[vmphyslots=drc_index1,drc_index2...] [vmothersetting=hugepage:N,bsr:N]
|
||||
[vmnics=vlan1,vlan2] [vmstorage=<N|viosnode:slotid>] [--vios]
|
||||
[vmothersetting=hugepage:N,bsr:N]
|
||||
[add_physlots=drc_index1,drc_index2...]
|
||||
[add_vmnics=vlan1,vlan2] [add_vmstorage=<N|viosnode:slotid>] [--vios]
|
||||
chvm <noderange> [del_physlots=drc_index1,drc_index2...]
|
||||
chvm <noderange> [del_vadapter=slotid]
|
||||
VMware specific:
|
||||
|
@ -23,8 +23,9 @@ B<chvm> I<noderange> I<--p775> B<-i id> [B<-m> I<memory_interleaving>] B<-r> I<p
|
||||
B<chvm> I<noderange> [B<lparname>={B<*>|B<name>}]
|
||||
|
||||
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>]
|
||||
[B<vmnics=vlan1[,vlan2..]]> [B<vmstorage=<N|viosnode:slotid>>] [B<--vios>]
|
||||
[B<vmothersetting=hugepage:N,bsr:N>]
|
||||
[B<add_physlots=drc_index1,drc_index2...>]
|
||||
[B<add_vmnics=vlan1[,vlan2..]]> [B<add_vmstorage=<N|viosnode:slotid>>] [B<--vios>]
|
||||
[B<del_physlots=drc_index1,drc_index2...>]
|
||||
[B<del_vadapter=slotid>]
|
||||
|
||||
@ -114,7 +115,7 @@ The administrator should use lsvm to get the profile content, and then edit the
|
||||
|
||||
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>, I<vmothersetting>, I<vmnics> and/or I<vmstorage>. If nothing specified, nothing will be returned.
|
||||
chvm could be used to modify the resources assigned to partitions. The admin shall specify the attributes with options I<vmcpus>, I<vmmemory>, I<add_physlots>, I<vmothersetting>, I<add_vmnics> and/or I<add_vmstorage>. If nothing specified, nothing will be returned.
|
||||
|
||||
=head2 VMware/KVM specific:
|
||||
|
||||
@ -198,11 +199,11 @@ Name of I/O slots assignment profile. Shall work with option B<--p775>.
|
||||
|
||||
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>
|
||||
=item B<vmcpus=value> B<vmmemory=value> B<add_physlots=value> B<vmothersetting=value>
|
||||
|
||||
To specify the parameters that will be modified.
|
||||
|
||||
=item B<vmnics=value> B<vmstorage=value> [B<--vios>]
|
||||
=item B<add_vmnics=value> B<add_vmstorage=value> [B<--vios>]
|
||||
|
||||
To create new virtual adapter for the specified node.
|
||||
|
||||
@ -509,7 +510,7 @@ The output is similar to:
|
||||
|
||||
To modify the resource assignment:
|
||||
|
||||
chvm lpar1 vmcpus=1/2/16 vmmemory=1G/8G/32G vmphyslots=0x21010202
|
||||
chvm lpar1 vmcpus=1/2/16 vmmemory=1G/8G/32G add_physlots=0x21010202
|
||||
|
||||
The output is similar to:
|
||||
|
||||
@ -531,7 +532,7 @@ The resource information after modification is similar to:
|
||||
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>.
|
||||
Note: The physical I/O resources specified with I<add_physlots> 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<add_physlots>, please refer to L<lsvm(1)|lsvm.1>.
|
||||
|
||||
=head2 VMware/KVM specific:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user