Windows Server 2012 Hyper-V (version 3)


Recommended Posts

Hi,

 

I am currently running the Release Candidate of Windows Server 2012, with the Hyper-V role installed.

 

I have had some success in getting a Virtualised unraid server running, but I have hit a snag with the Network.

 

UnRaid doesn't seem to support the Network card that is offered by the Hyper-V Host. This is a bit odd, because the Hyper-V integration components are supposed to be part of the Linux kernel:

 

 

http://www.thomasmaurer.ch/2012/03/install-ubuntu-12-04-on-hyper-v/

 

For those of you who are interested, here is how I created the bootable unraid VM:

 

(Please note that this is all done from a Win2012 server using powershell)

 

Step 1) Create a Disk to hold the unraid OS. This would typically be your USB drive, but since there is no USB pass-through we will create a 1GB Disk.

 

PS C:\Users\Administrator> new-vhd UNRAID.vhd 1GB


ComputerName            : FRACTAL
Path                    : C:\Users\Administrator\UNRAID.vhd
VhdFormat               : VHD
VhdType                 : Dynamic
FileSize                : 8192
Size                    : 1073741824
MinimumSize             :
LogicalSectorSize       : 512
PhysicalSectorSize      : 512
BlockSize               : 2097152
ParentPath              :
FragmentationPercentage : 0
Alignment               : 1
Attached                : False
DiskNumber              :
IsDeleted               : False
Number                  :

 

 

 

Step2) We now need to attach the VHD to the host, so that we can partition it and get it ready for unraid

 

PS C:\Users\Administrator> mount-vhd unraid.vhd

 

Step3) Now that this disk is attached to the host, we need to partition it.

 

PS C:\Users\Administrator> diskpart


DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          111 GB      0 B        *
  Disk 1    Online          111 GB      0 B
  Disk 2    Online          931 GB      0 B        *
  Disk 3    Offline        1397 GB      0 B
  Disk 4    Online         1397 GB      0 B
  Disk 5    Online         1024 MB  1024 MB

DISKPART> select disk 5

Disk 5 is now the selected disk.

 

Step4) Now that we have selected the newly created disk, we need to create a partition, mark it as active.

 

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.



DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary           1022 MB    64 KB



DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> active

DiskPart marked the current partition as active.

 

Step5) Now we need to format the partition, label the disk and assign it a letter so that the host can write data to it.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C                NTFS   Partition    111 GB  Healthy    Boot
  Volume 1         Recovery     NTFS   Partition    300 MB  Healthy    Hidden
  Volume 2                      FAT32  Partition    100 MB  Healthy    System
  Volume 3     D   VHDs         NTFS   Partition    111 GB  Healthy
  Volume 4     E   OneTB        NTFS   Partition    931 GB  Healthy
  Volume 5     F   OneFiveTB_1  NTFS   Partition   1397 GB  Healthy
  Volume 6                      RAW    Partition   1022 MB  Healthy




DISKPART> select volume 6

Volume 6 is the selected volume.


DISKPART> format FS=FAT LABEL=UNRAID

  100 percent completed

DiskPart successfully formatted the volume.

DISKPART> assign letter=J

DISKPART> exit

Leaving DiskPart...


 

Step6) Now that we have the drive ready, we need to copy unraid to the drive and make it bootable.

PS C:\Users\Administrator\downloads> copy-item 'C:\Users\Administrator\Downloads\unRAID Server 4.7 AiO\*' -Destination J:\ -recurse

PS C:\Users\Administrator\downloads> cd j:
PS J:\>

PS J:\> .\syslinux.exe -ma J: -f

 

Step7) Now we need to dismount the Disk, so that it can be attached to a Virtual

PS J:\> cd c:\
PS C:\>

PS C:\> Dismount-VHD C:\Users\Administrator\UNRAID.vhd

 

Step8) Create a VM, attach the newly created disk, add a network interface.

 

PS C:\> Get-VMSwitch

Name               SwitchType NetAdapterInterfaceDescription
----               ---------- ------------------------------
Intel NIC1 vSwitch External   Intel(R) PRO/1000 PT Dual Port Network Connection
Intel NIC2 SRIOV   External   Intel(R) PRO/1000 PT Dual Port Network Connection #2


PS C:\> New-VM -Name "UnRaid47" -MemoryStartupBytes 2GB -VHDPath C:\Users\Administrator\UNRAID.vhd -SwitchName "Intel NIC2 SRIOV"


Name     State CPUUsage(%) MemoryAssigned(M) Uptime   Status
----     ----- ----------- ----------------- ------   ------
UnRaid47 Off   0           0                 00:00:00 Operating normally

PS C:\> Start-VM -Name UnRaid47

 

 

The VM starts in an extremely short time... but logging in as root and running ifconfig shows only the loopback address (127.0.0.1)

 

Any ideas?

 

Tested with 4.7, 5.0RC5 and RC6_Test2

Link to comment

According to MS, the driver package is a manual install on CentOS and Redhat, and only included in Suse out of the box.  See:

 

http://technet.microsoft.com/library/hh831531.aspx

 

The driver package etc is here:  http://www.microsoft.com/en-us/download/details.aspx?id=28188

 

I don't think you'll have any luck getting the NIC running on 2012 Hyper-V until someone develops a driver package for it.

Link to comment

Do you have 2 network cards in your hyper-v server ?

 

I've used the 2008 hyper-v server (core edition) extensively and when I used the same nic for both the management interface (host networking) and the vm's I've always had problems.

 

I actually have 4 NICs in the server!

 

Two on the Supermicro board (one not supported by WinServer, thanks Intel)

A dual port Intel Pro NIC.

 

I am not sharing any NIC between host and hyper-v.

 

The NIC is just the first hurdle too, there is no way to pass USB to the guest so I have no idea on how to use a licensed copy of unraid :(

 

 

It would be nice to use just one server at home.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.