resource cpu weight (VS resource template view)

Function

The resource cpu weight command assigns CPU weight to a resource template.

The undo resource cpu weight command deletes the CPU weight of a resource template.

By default, CPU weight values assigned to Admin-VS and other VSs are 10 and 5 respectively.

Format

resource cpu weight resValue

undo resource cpu weight

Parameters

Parameter Description Value
resValue

Specifies CPU weight.

The value is an integer ranging from 1 to 10.

Views

VS resource template view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
lsvs write

Usage Guidelines

Usage Scenario

To assign CPU weight to a resource template, run the resource cpu weight command. If a VS is created using the resource template, CPU weight is automatically set for the VS.

You can specify resource specifications for the resource template and assign the resource template to the VS in order to assign resources in batches to the VS. This improves the flexibility of VS resource management. It also improves the usability and security of VSs so that other VSs can still be used when one VS is attacked.

Precautions

In VS mode, this command is supported only by the admin VS.

Example

# Change the CPU weight of a resource template to 1.
<HUAWEI> system-view
[~HUAWEI] admin
[~HUAWEI-admin] resource-template temp_Test
[*HUAWEI-admin-template:temp_Test] resource cpu weight 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >