分页: 1 / 1

HP-UX - Add a VLAN to a VSwitch

发表于 : 2014年 11月 17日 09:36 星期一
SYSTEM
NOTE: Only tag-unaware guests are supported. This simply means that tagged frames destined for a guest are always stripped of the tag information in the frame before being forwarded. Frames arriving at the vswitch from a guest can be “tagged” by the vswitch. For more information on configuring VLANs for HPVM’s go to the HP-UX vPars and Integrity VM V6.x Administrator Guide.

1. If there is no vswitch, create and start the vswitch.

NOTE: In the examples below I will use “vmlan4” as the vswitch name.

# hpvmnet -c -S vmlan4 -n 3

# hpvmnet -b -S vmlan4

NOTE: Please refer to the hpvmnet manpage for details.

2. Use hpvmnet to create the port and assign it a VLAN ID.

# hpvmnet -S vmlan4 -u portid:1:vlanid:100

NOTE: This creates port 1 with a VLAN ID 100.

3. Confirm the port and VLAN ID.

# hpvmnet -S vmlan4
Name Number State Mode NamePPA MAC Address IPv4 Address
======== ====== ======= ========= ======== ============== ===============
vmlan4 4 Up Shared lan3 0x002264362091

[Port Configuration Details]
Port Port Port Untagged Number of Active VM
Number State Adaptor VLANID Reserved VMs
======= ============ ======== ======== ============ ============
1 Available unknown 100 0

4. Add the vswitch port to the guest configuration using the hpvmmodify command.

# hpvmmodify -P vm1 -a network:lan::vswitch:vmlan4:portid:1

NOTE: If the guest is up and running you will have to restart the guest to see the newly added port.

5. Verify the port (1) on the vswitch (vmlan4) has been added to the guest configuration.

# hpvmstatus -P vm1
[Virtual Machine Details]
Virtual Machine Name VM # OS Type State
==================== ===== ======= ========
vm1 1 HPUX On (OS)

[Authorized Administrators]
Oper Groups:
Admin Groups:
Oper Users:
Admin Users:

[Virtual CPU Details]
#vCPUs Entitlement Maximum
====== =========== =======
4 25.0% 100.0%

[Memory Details]
Total Reserved
Memory Memory
======= ========
4 GB 64 MB

[Storage Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
disk avio_stor 0 1 0 0 0 disk /dev/rdisk/disk23
disk avio_stor 0 1 0 1 0 disk /dev/rdisk/disk24
dvd avio_stor 0 1 0 2 0 file /var/tmp/SEPT_08_BOE_DVD1.iso
disk avio_stor 0 1 0 3 0 disk /dev/rdisk/disk20

[Network Interface Details]
Interface Adaptor Name/Num PortNum Bus Dev Ftn Mac Address
========= ========== ========== ======= === === === =================
vswitch avio_lan MGMT 1 0 0 0 7e-f0-46-ee-a2-76
vswitch avio_lan MGMT 2 0 2 0 f6-d8-8e-87-4f-2c
vswitch avio_lan vmlan4 1 0 4 0 e6-e0-bd-b0-73-b1

[Misc Interface Details]
Guest Physical
Device Adaptor Bus Dev Ftn Tgt Lun Storage Device
======= ========== === === === === === ========= =========================
serial com1 tty console

NOTE: As can be seen in the output above, port 1 on vswitch vmlan4 has been added to the guest (vm1) configuration.