Reference12r2:Concept IPVA On Hyper-V: Difference between revisions
m (→Create The Virtual Switch: typo) |
m (added "Known Issues") |
||
Line 47: | Line 47: | ||
**The newly imported IPVA appears within the ''Virtual Computer'' list of the local machine. | **The newly imported IPVA appears within the ''Virtual Computer'' list of the local machine. | ||
=Windows Hyper-V 2012 | =Windows Hyper-V Server 2012 R2 (Core Installation)= | ||
This free product lacks a GUI. Instead, Microsoft offers RSAT, the Remote Server Administration Tools. The RSAT do also contain a Hyper-V-Manager, however it practically appeared impossible to prepare a proper versioned client machine, in order to get the RSAT-stack working. The Hyper-V core server comes with a minimal setup console and an administrator command line, targeting the Hyper-V administration by means of Windows powershell commands (Hyper-V CmdLets). This section focusses on this latter administration means. | This free product lacks a GUI. Instead, Microsoft offers RSAT, the Remote Server Administration Tools. The RSAT do also contain a Hyper-V-Manager, however it practically appeared impossible to prepare a proper versioned client machine, in order to get the RSAT-stack working. The Hyper-V core server comes with a minimal setup console and an administrator command line, targeting the Hyper-V administration by means of Windows powershell commands (Hyper-V CmdLets). This section focusses on this latter administration means. | ||
Line 163: | Line 163: | ||
==Further Hyper-V CmdLet Commands== | ==Further Hyper-V CmdLet Commands== | ||
See <ref>Hyper-V Cmdlets: https://technet.microsoft.com/de-de/library/hh848559.aspx</ref>. That documentation addresses the latest CmdLets. The set of Hyper-V 2012 commands for the powershell 2.0 is smaller and can be listed by | See <ref>Hyper-V Cmdlets: https://technet.microsoft.com/de-de/library/hh848559.aspx</ref>. That documentation addresses the latest CmdLets. The set of Hyper-V Server 2012 commands for the powershell 2.0 is smaller and can be listed by | ||
*<code type="text"> | *<code type="text"> | ||
Get-Command -Module Hyper-V | Get-Command -Module Hyper-V | ||
</code> | </code> | ||
=Known Issues= | |||
==Windows Host Cannot Access IPVA Guest== | |||
The network realized by ''Virtual Switch External'' is per-se inaccessible from the Windows host machine. | |||
=Notes= | =Notes= | ||
<references/> | <references/> |
Revision as of 10:20, 13 April 2016
Applies To
This information applies to
- IPVA
- Firmware Version 12r2
- Microsoft Hyper-V
More Information
This article explains deployment of the IPVA for the Hyper-V family of Microsoft virtualizer products.
Download
Download the IPVA.
- The compressed archive ipva-vhd.zip' contains 2 subdirectories:
- Virtual Machines This directory contains the manifest file (configuration/meta data) of the virtual machine
- Virtual Hard Disks This directory contains 4 files representing the 4 IDE disks of the virtual machine
- hd-boot.vhd: The virtual boot harddisk (hd)
- hd-cf.vhd: The hd for emulation of a Compact Flash card
- hd-flash.vhd: The hd for emulation of flash memory
- hd-dump.vhd: The hd serving as a store for a crash dump
Hyper-V on Windows Client Machines
From on Windows 8 up to now Windows 10, Hyper-V can be enabled underneath System/Programs & Features/Windows Features/.
- There, activate the Hyper-V checkmark(s).
- Reboot
Now configure an external virtual switch: The IPVA's manifest file configures a network adapter that instructs Hyper-V to bind that adapter on a virtual switch named Virtual Switch External.
- Start Start/Programs/Windows Management Tools/Hyper-V-Manager.
- The Hyper-V Manager Application is going to start up.
- Right-Click Hyper-V-Manager/<Local Machine>/
- Select Manager for virtual switches
- Create a new virtual switch
- Name: Virtual Switch External
- Description: Enter arbitrary text
- Connection Type: Select External Network
- Select a physical adapter from the drop-down list
Import An IPVA
Download the IPVA and extract the files.
- Start Start/Programs/Windows Management Tools/Hyper-V-Manager.
- Right-Click Hyper-V-Manager/<Local Machine>/
- Select Import Virtual Machine
- Browse to the directory where the downloaded package was extracted to. Browse to the subdirectory Virtual Machines and click Ok.
- Select an Import Type. A Direct Registration means to import the virtual machine in-place. I.e. the files will remain at their location.
- Finish the import.
- The newly imported IPVA appears within the Virtual Computer list of the local machine.
Windows Hyper-V Server 2012 R2 (Core Installation)
This free product lacks a GUI. Instead, Microsoft offers RSAT, the Remote Server Administration Tools. The RSAT do also contain a Hyper-V-Manager, however it practically appeared impossible to prepare a proper versioned client machine, in order to get the RSAT-stack working. The Hyper-V core server comes with a minimal setup console and an administrator command line, targeting the Hyper-V administration by means of Windows powershell commands (Hyper-V CmdLets). This section focusses on this latter administration means.
Sconfig
Sconfig addresses the textual menu with the blue background color.
- Option 1): If unsure, the server may simply be left as member in the regular WORKGROUP
- Option 2): Configure the NetBIOS computer name (<NBNAME>).
- Option 4): Enable Remote Management.
- Option 7): Enable Remote Desktop (RDP) for all client versions.
Firewall
There are specific management steps necessary to even allow for RDP. Although not recommended a quick disabling of the firewall avoids warm-up troubles
- To disable the firewall:
- Click into the Administrator command line console.
- Enter powershell and confirm. Enter
netsh advfirewall set allprofiles state off
Remote Desktop(RDP)
Now it is possible to setup a Remote Desktop Session to the Hyper-V server.
- Login as administrator or <NBNAME>\administrator
In order to move files from/to the Hyper-V server
- A network mount of the server's c-drive may be established:
- On the client machine place a command within a command line window
- On the client machine place a command within a command line window
net use * \\<IP of Hyper-V server>\c$ /u:<NBNAME>\administrator
- Or the client machines c-drive may be projected into the RDP-session
- Connection Settings/Options/Local Ressources/Further../Local Drive
Create The Virtual Switch
As above a virtual switch named Virtual Switch External is required and must be bound on a physical network adapter.
- The physical adapters can be listed by means of a regular ipconfig /all
- Create and edit a powershell script named create-switch.ps1
- Create-Switch.ps1:
- Example
- PS C:\vms> .\create-switch.ps1
- Supply values for the following parameters:
- PhysAdapterName: Ethernet 2
- Creating virtual switch 'Virtual Switch External' on physical Adapter Ethernet 2
- Name SwitchType NetAdapterInterfaceDescription
- ---- ---------- ------------------------------
- Virtual Switch External External Intel(R) Ethernet Connection I217-LM
param(
[Parameter(Mandatory=$true)]
[string]$PhysAdapterName
)
$VirtualSwitchName = "Virtual Switch External"
echo "Creating virtual switch '$VirtualSwitchName' on physical Adapter $PhysAdapterName";
New-VMSwitch -Name "$VirtualSwitchName" -NetAdapterName "$PhysAdapterName"
- Invoke the script from within a powershell session by means of .\create-switch.ps1
- The script will ask for the name of the physical network adapter.
- It is assumed the name be Ethernet 2. So, enter
Ethernet 2
- Or invoke the script with
.\create-switch.ps1 -PhysAdapterName "Ethernet 2"
Import An IPVA
It is assumed the downloaded files reside underneath c:\vms as c:\vms\vhd\Virtual Machines, c:\vms\vhd\Virtual Hard Disks.
- Download the IPVA and extract the files.
- Copy the files to the Hyper-V host machine
- Start-up a powershell session. Enter(Note/hint: The Tab-key aides in path completion)
import-vm -Path 'C:\vms\vhd\Virtual Machines\A09F7653-BBD0-41AE-9A63-53921CE90E26.XML' -register
- The output may look like
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status
----- ----------- ----------------- ------ ------
IPVA-VHD Off 0 0 00:00:00 Operating normally
This method imports the guest machine without altering file locations.
Create An IPVA Guest From Scratch
An IPVA guest can be created by means of the 4 *.vhd Disk Files. It is assumed the 4 disk files reside as c:\vms\ipva01\hd-boot.vhd, c:\vms\ipva01\hd-cf.vhd,...
- Create and edit a powershell script named create-vm.ps1
- Create-VM.ps1:
- Example: powershell /ExecutionPolicy Unrestricted .\create.vm.ps1 -VMName 'ipva01' -RootDir 'c:\vms'"
- will create a vm 'ipva01' in the directory 'c:\vms\ipva01'
param(
[Parameter(Mandatory=$true)]
[string]$VMName,
[Parameter(Mandatory=$true)]
[string]$RootDir
)
echo "Creating $VMName in directory $RootDir";
New-VM -VMName "$VMName" -Generation 1 -MemoryStartupBytes 67108864 -BootDevice IDE -Path "$RootDir/$VMName";
Add-VMNetworkAdapter -VMName "$VMName" -IsLegacy $true -DynamicMacAddress -SwitchName 'Virtual Switch External';
Remove-VMScsiController -VMName "$VMName" -ControllerNumber 0
Remove-VMDvDDrive -VMName "$VMName" -ControllerNumber 1 -ControllerLocation 0;
Add-VMHardDiskDrive -VMName "$VMName" -ControllerType IDE -ControllerNumber 0 -ControllerLocation 0 -Path "$RootDir/$VMName/hd-boot.vhd";
Add-VMHardDiskDrive -VMName "$VMName" -ControllerType IDE -ControllerNumber 0 -ControllerLocation 1 -Path "$RootDir/$VMName/hd-cf.vhd";
Add-VMHardDiskDrive -VMName "$VMName" -ControllerType IDE -ControllerNumber 1 -ControllerLocation 0 -Path "$RootDir/$VMName/hd-flash.vhd";
Add-VMHardDiskDrive -VMName "$VMName" -ControllerType IDE -ControllerNumber 1 -ControllerLocation 1 -Path "$RootDir/$VMName/hd-dump.vhd";
- Invoke the script by means of
.\create.vm.ps1 -VMName "ipva01" -RootDir "c:\vms"
Starting An IPVA
Within a powershell session
- enter
start-vm ipva01
- or
start-vm -vmname ipva01
Further Hyper-V CmdLet Commands
See [1]. That documentation addresses the latest CmdLets. The set of Hyper-V Server 2012 commands for the powershell 2.0 is smaller and can be listed by
Get-Command -Module Hyper-V
Known Issues
Windows Host Cannot Access IPVA Guest
The network realized by Virtual Switch External is per-se inaccessible from the Windows host machine.
Notes
- ↑ Hyper-V Cmdlets: https://technet.microsoft.com/de-de/library/hh848559.aspx