This configuration is suitable for duplicating the network for Hyper-V environment by registering GLS' virtual adapter to Hyper-V Virtual Network Manager.
Configuration
Setting procedure
Assuming the Configuration in Figure A.6
Set the physical adapter.
For more details, refer to "3.4.2 Preliminary Tasks: Physical Adapter Settings."
Set the virtual adapter.
Execute the hanetconfig command and create the virtual adapter sha0 for Hyper-V by bundling the physical adapters Local Area Connection 1 and Local Area Connection 2.
> hanetconfig create -n sha0 -v hv -t "Local Area Connection 1","Local Area Connection 2" FJSVhanet: INFO: 00000: The command ended normally. |
Set the ping monitor function.
Execute the hanetpoll command with the following specifications:
Monitor target when Local Area Connection 1 is operational: 192.168.2.10, 192.168.2.20
Monitor target when Local Area Connection 2 is operational: 192.168.2.10, 192.168.2.20
> hanetpoll create -t "Local Area Connection 1" -p 192.168.2.10,192.168.2.20 FJSVhanet: INFO: 00000: The command ended normally. > hanetpoll create -t " Local Area Connection 2" -p 192.168.2.10,192.168.2.20 FJSVhanet: INFO: 00000: The command ended normally. |
Information
When setting a destination system as the ping target, you can set the network adapter not to switch if a network error is detected.
To set so that the network adapter is not switched if an error is detected:
> hanetpoll create -t "Local Area Connection 1" -p 192.168.2.2 -f no FJSVhanet: INFO: 00000: The command ended normally. > hanetpoll create -t "Local Area Connection 2" -p 192.168.2.2 -f no FJSVhanet: INFO: 00000: The command ended normally. |
For details on hanetpoll command, refer to "6.2.4 hanetpoll."
Activate the virtual adapter.
Execute the strhanet command to activate the virtual adapter.
> strhanet FJSVhanet: INFO: 00000: The command ended normally (sha0). FJSVhanet: INFO: 00007: Start the ping monitor using the hanetpoll command if needed. |
Register the virtual adapter sha0 to Hyper-V virtual network.
From the [Administrative Tools] menu on the [Start] menu, select [Hyper-V Manager].
From the [Hyper-V Manager] window, select [Virtual Network Manager].
Under [Create virtual network] of [New virtual network], select [External], and click [Add].
Select the virtual adapter sha0 for new virtual network, and click the [Apply] button.
Note
In Windows Server 2008 R2, [Allow management operating system to share this network adapter] check box is provided.
This check box allows you to choose whether to share the network adapter connected to the virtual network on the host OS.
When the check box is selected:
You can set up the network adapter connected to the virtual network on the host OS.
In this case, an adapter is created on the GLS virtual adapter by Hyper-V Virtual Network Manager. You can use ping monitoring by setting the IP address to a created adapter.
When the check box is not selected:
You can not set up the network adapter connected to the virtual network on the host OS.
In this case, the network adapter is recognized as exclusive use for the virtual machine. Therefore, you can not use ping monitoring because no adapter is created on the GLS virtual adapter by Hyper-V Virtual Network Manager.
For more details, refer to the manual of Hyper-V.
Set an IP address manually for the adapter (Local Area Connection 3) which is created on the virtual adapter sha0 by Hyper-V Virtual Network Manager.
For details on how to set IP addresses, refer to the manual of OS.
Restart the system.
Ping monitoring starts when the system is started.
Register virtual adapter sha0 to GuestOS1 as VLAN ID2.
From [Hyper-V Manager], open the setting window for GuestOS1.
Under [Add Hardware], select [Network Adapter], and click the [Add] button.
Select the virtual adapter sha0 for [Network], and check [Enable virtual LAN identification].
Enter "2" to [VLAN ID], and click the [Apply] button.
For more details, refer to the manual of Hyper-V.
Set an IP address manually for the adapter (Local Area Connection 1) on GuestOS1.
For details on how to start guest OS, refer to the manual of Hyper-V.
For details on how to set IP addresses, refer to the manual of OS.
Register the virtual adapter sha0 to GuestOS2 as VLAN ID3.
For details on how to register, refer to step 8 and 9.
Follow the procedure below to inform the information of MAC addresses for each OS to network switches from the virtual adapter sha0 which is registered to Hyper-V Virtual Network Manager.
This setting enables the transmission to immediately restart when the network is switched.
Check the adapter information of host OS and guest OS on the virtual adapter sha0.
For the host OS, check the information referring to a result displayed by executing the ipconfig command.
For the guest OS, check the information referring to "MAC Address" and "VLAN ID" in [Network Adapter] of [Virtual Network Manager]. Note that when you set "Dynamic", " MAC Address " of guest OS will be displayed after the guest OS starts.
Computer name | VLAN ID | MAC address | |
---|---|---|---|
Host OS | HOST-A | None | ZZ-ZZ-ZZ-ZZ-ZZ-ZZ |
Guest OS1 | VM1 | Tag 2 | XX-XX-XX-XX-XX-XX |
Guest OS2 | VM2 | Tag 3 | YY-YY-YY-YY-YY-YY |
Set the execution of user scripts for Hyper-V.
> copy <GLS Installation Directory>\usr\script\adapter\hyperv.sam <GLS Installation Directory>\usr\script\adapter\sha0.bat |
Set the information of each adapter to the "<GLS Installation Directory>\usr\script\adapter\maclist.txt" file.
Set them in the following order:
GLS' virtual adapter name which is connected to a virtual switch
Adapter information of Local Area Connection (1. VLAN ID, 2. MAC address, 3. computer name)
virtual adapter name VLAN ID MAC address computer name |
Separate the items using tabs.
In the following cases, specify a hyphen:
VLAN ID without VLAN tag settings
Computer name of Local Area Connection which belongs to host OS
[Example]
sha0 - ZZ-ZZ-ZZ-ZZ-ZZ-ZZ - sha0 2 XX-XX-XX-XX-XX-XX VM1 sha0 3 YY-YY-YY-YY-YY-YY VM2 |
Information
After starting the operation, if you deactivate GLS' virtual adapter, delete the GLS' virtual adapter from Hyper-V, and then execute the stphanet command.
In Windows Server 2008 R2 environments, when the virtual adapter registered to the Virtual Network Manager is not used on the host OS, it is not necessary to describe the MAC address of the host OS in the "maclist.txt" file.