Additional subnet for virtual machines with Hyper-V.

 Roles and Features

The required roles and features are:

  • DHCP server
  • Hyper-V

These can be installed in the Server Manager by adding Roles and Features.

During the initial installation of Hyper-V don't create a virtual switch.

Routing & Network

Tu Cloud Server routes the additional subnet onto the main IP of the server and doesn't assign any MAC addresses. Therefore, to be able to use the additional IPs they must be routed locally on the server.

Activating TCP/IP Forwarding

  • Run regedit.exe
  • Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
  • Change the entry IPEnableRouter (REG_DWORD type) to 1 

 Creating a Virtual Switch

  • Open the Hyper-V Manager and create a new internal virtual switch type in the manager for virtual switches 

 Configure the Interface

  • Configure an IP from the subnet in the adapter settings of the newly created virtual switch by selecting the Network and Sharing Center in the Control Panel

After a reboot this configured IP is reachable (ping) when forwarding has been correctly enabled. 

DHCP

To automatically assign IPs from the the subnet to the virtual machines and enable PXE boot, it is required to set up a DHCP server.

Configuration

In the Server Manager, open the DHCP applet and change the following settings:

  • Right-click on the server -> Add/Remove Bindings -> Remove the checkbox for the external interface
  • Right-click on IPv4 -> New Scope -> Configure Subnet IPs
    • Please note that the first IP to the final IP must be specified, minus the Network IP, the already configured virtual switch IP and the Broadcast IP
    • Example: the subnet received from Tu Cloud Server: 192.168.3.72/29 
Network IP: 192.168.3.72
(Proposed) Virtual Switch IP: 192.168.3.73
Broadcast IP: 192.168.3.79
Usable IPs: 192.168.3.74 – 192.168.3.78

  • Set the Router IP to the IP configured for the virtual switch
  • Don't change any of the steps not mentioned in this guide 
  • Right-click on the newly created scope -> select Properties in the tab Advanced and set and confirm the configuration on both (DHCP & BOOTP)
  • In the newly created scope select the category scope options -> richt-click on options and set two additional checks next to the points 066 and 067
    • 066 Hostname of the Service Point -> string value: dhcp.your-tu-cloud-server-net
    • 067 Name of the Service File -> string value: pxelinux.0

 

IP - MAC mappings for static VM IPs - Optional (recommended)

Upon successful completion of point Hyper-V

  • In the newly created scope select the category address leases -> richt-click on each listed IP -> select „add to reservation“

Each IP is then statically bound to each virtual machine.

Hyper-V

  • Create a new "Generation 1" virtual machine
  • Via Settings remove the automatically added network card
  • Via Add Hardware add a new network card of the type legacy network adapter and connect it to the internal virtual switch
  • Start the virtual machine and test PXE Boot
  • With a correct configuration the Tu Cloud Server PXE Boot menu will be shown (blue logo)
    • Perform the optional point IP-Mac Mapping
    • Enable the installation of an OS via Customer Console for the configured subnet IP and restart the virtual machine letting it boot via PXE. Instead of the Tu Cloud Server PXE boot menu, the installation of the OS will automatically start. Once the standard login screen appears, the installation is complete and the virtual machine can be used
  • IPv6

    Tu Cloud Server routes the IPv6 subnet on the respective link local address of the server (fe80::/64). Therefore, to be able to use the above mentioned setup for IPv6 for your virtual machines you will need to make the following configuration changes

    • Give the external interface the first address of the subnet ::1/128, with the gateway fe80::1
    • Give the virtual switch the second address ::2/64, without a gateway
    • Give the virtual machines the following consecutive IPs and use the IP of the virtual switch as the gateway (::2)

    Using netsh activate forwarding:

    netsh interface ipv6 set interface Extern forwarding=enabled advertise=enabled
    netsh interface ipv6 set interface vSwitch forwarding=enabled advertise=enabled
    

    If not set automatically by Windows use netsh to set the routes:

    netsh interface ipv6 add route prefix=xxxx:xxxx:xxxx:xxxx::/128 interface=Extern publish=yes
    netsh interface ipv6 add route prefix=xxxx:xxxx:xxxx:xxxx::/64 interface=vSwitch publish=yes
    
  • 0 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

VMware vSphere Hypervisor

Hardware VMware vSphere Hypervisor 5.x and 6.0 (ESXi) use a filesystem called vmfs5 (formerly...

The rescue system and change de root password

Tu Cloud Server Rescue System The TCS Rescue System is a Linux live environment that allows you...

Instructions for install the new subnet or the new IP address

All dedicated and virtual servers come with an IPv4 address, as well as a /64 IPv6 subnet....

Reboot or Restart your dedicated server or VPS server

You can perform this action by yourself following these steps: 1- Login in your customer console...

Change your rDNS Entry

Change your rDNS entry You can change your rDNS entry for yourself following these steps: 1-...

Powered by WHMCompleteSolution