Adding a Port to a VM
This operation enables you to add a port to a VM.
Procedure
- Go to the CLI.
- Run the add virtual_machine port vm_id=? port_type=? { port_id_list=? | port_id=? mac_address=? } command.Table 7-7 describes the related parameters.Table 7-7 Parameters for adding a port to a VM
Parameter
Description
Value
vm_id=?
VM ID.
To obtain the value, run the show virtual_machine general command without parameters.
port_type=?
Port type.
The value can be eth or bond, where:
- eth: ETH port.
- bond: bond port.
port_id_list=?
List of port IDs.
To obtain the value, use either of the following methods:
- ETH ports can be obtained by running the show port general physical_type=ETH command without parameters.
- Bond ports can be obtained by running the show bond_port command without parameters.
port_id=?
Port ID.
To obtain the value, use either of the following methods:
- ETH ports can be obtained by running the show port general physical_type=ETH command without parameters.
- Bond ports can be obtained by running the show bond_port command without parameters.
mac_address=?
MAC address of the port in a VM.
The value can be a string in the form of "xx:xx:xx:xx:xx:xx".
- Confirm that all required parameters are correctly configured.
Example
Add a physical port to a VM and specify the MAC address for the port.
admin:/>add virtual_machine port vm_id=1 port_type=eth port_id=CTE0.A.IOM1.P0 mac_address=10:51:72:4a:b8:55 WARNING: You are about to add the network port to the VM and specify the MAC address for the port. This operation may cause the MAC address of the port to conflict with that of another network device in the Local Area Network (LAN), interrupting VM network services. Suggestion: Before performing this operation, ensure that the MAC address of the network port does not conflict with that of any other network device in the LAN. Have you read warning message carefully?(y/n)y Are you sure you really want to perform the operation?(y/n)y Command executed successfully.
Add a bond port to a VM and specify the MAC address for the port.
admin:/>add virtual_machine port vm_id=65537 port_type=bond port_id=549772730113 mac_address=10:51:72:4c:75:46 WARNING: You are about to add the network port to the VM and specify the MAC address for the port. This operation may cause the MAC address of the port to conflict with that of another network device in the Local Area Network (LAN), interrupting VM network services. Suggestion: Before performing this operation, ensure that the MAC address of the network port does not conflict with that of any other network device in the LAN. Have you read warning message carefully?(y/n)y Are you sure you really want to perform the operation?(y/n)y Command executed successfully.