Solved Trouble installing Windows Server 2012 R2 as bhyve VM

Hello everyone

I am trying to install Windows Server 2012 R2 (German Eval Version) as a virtual machine with bhyve. File name of the original iso is: Windows-Server-2012-R2-Eval-DE.ISO

I followed the instructions at https://github.com/churchers/vm-bhyve/wiki/Running-Windows.

The VM boots but does not finish installation. Looking at the SACSetupAct channel via console I get the following output:
Code:
2017-05-16 14:29:49, Info                  IBS    ImageXmlInfo::SetStagedImageEditionsForUI: Setting edition for staged image onto the blackboard.
2017-05-16 14:29:49, Info                  IBS    ImageXmlInfo::BbSetImageSelectUiInfo: Successfully set data for edition [ServerDatacenterEval] for key [0].

2017-05-16 14:29:49, Info                  IBS    ImageXmlInfo::BbSetImageSelectUiInfo: Success!
2017-05-16 14:29:49, Info       [0x0a0035] UI     Allowing Page '' to be shown

2017-05-16 14:29:50, Info       [0x0a0052] UI     No language pack available for image Windows Server 2012 R2 Standard - Testversion (Server Core-Installation)
2017-05-16 14:29:50, Info       [0x0a0052] UI     No language pack available for image Windows Server 2012 R2 Standard - Testversion (Server mit grafischer Benutzeroberfläche)
2017-05-16 14:29:50, Info       [0x0a0052] UI     No language pack available for image Windows Server 2012 R2 Datacenter - Testversion (Server Core-Installation)
2017-05-16 14:29:50, Info       [0x0a0052] UI     No language pack available for image Windows Server 2012 R2 Datacenter - Testversion (Server mit grafischerBenutzeroberfläche)
2017-05-16 14:29:50, Info       [0x0a011c] UI     WizardDialogPost::SetActive

Here's what my autounattend.xml looks like:
Code:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
  <settings pass="windowsPE">
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SetupUILanguage>
        <UILanguage>de-CH</UILanguage>
      </SetupUILanguage>
      <UILanguage>de-CH</UILanguage>
      <UserLocale>de-CH</UserLocale>
      <SystemLocale>de-CH</SystemLocale>
      <InputLocale>0409:00000409</InputLocale>
    </component>
    <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <DiskConfiguration>
        <DisableEncryptedDiskProvisioning>true</DisableEncryptedDiskProvisioning>
                <Disk wcm:action="add">

                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Order>1</Order>
                            <Type>EFI</Type>
                            <Size>400</Size>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>2</Order>
                            <Type>MSR</Type>
                            <Size>100</Size>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>3</Order>
                            <Type>Primary</Type>
                            <Extend>true</Extend>
                        </CreatePartition>
                    </CreatePartitions>

                    <ModifyPartitions>
                        <ModifyPartition wcm:action="add">
                            <Format>NTFS</Format>
                            <Letter>C</Letter>
                            <Order>1</Order>
                            <PartitionID>3</PartitionID>
                            <Label>Windows 2012R2</Label>
                        </ModifyPartition>
                    </ModifyPartitions>

                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>

                </Disk>
                <WillShowUI>OnError</WillShowUI>
          </DiskConfiguration>

      <UserData>
        <AcceptEula>true</AcceptEula>
        <ProductKey />
            <FullName>Test</FullName>
            <Organization>Test</Organization>
      </UserData>
      <ImageInstall>
        <OSImage>
          <InstallFrom>
            <MetaData wcm:action="add">
              <Key>/IMAGE/INDEX</Key>
              <Value>2</Value>
            </MetaData>
          </InstallFrom>
          <InstallTo>
            <DiskID>0</DiskID>
            <PartitionID>3</PartitionID>
          </InstallTo>
          <WillShowUI>OnError</WillShowUI>
        </OSImage>
      </ImageInstall>
    </component>
     <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <DriverPaths>
            <PathAndCredentials wcm:keyValue="1" wcm:action="add">
               <Path>d:\\virtio</Path>
            </PathAndCredentials>
         </DriverPaths>
      </component>
  </settings>
  <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <UserAccounts>
        <AdministratorPassword>
          <Value>Test123</Value>
          <PlainText>true</PlainText>
        </AdministratorPassword>
        <LocalAccounts />
      </UserAccounts>
      <AutoLogon>
        <Password>
          <Value>Test123</Value>
          <PlainText>true</PlainText>
        </Password>
        <Enabled>true</Enabled>
        <LogonCount>2050</LogonCount>
        <Username>Administrator</Username>
      </AutoLogon>
      <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
      </OOBE>
      <ShowWindowsLive>false</ShowWindowsLive>
    </component>
  </settings>
  <settings pass="specialize">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ComputerName>WINDBOX</ComputerName>
            <AutoLogon>
                <Password>
                    <Value>Test123</Value>
                    <PlainText>true</PlainText>
                </Password>
                <Enabled>true</Enabled>
                <Username>Administrator</Username>
            </AutoLogon>
            <TimeZone>UTC</TimeZone>
    </component>

        <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <IEHardenAdmin>false</IEHardenAdmin>
            <IEHardenUser>false</IEHardenUser>
        </component>

        <component name="Microsoft-Windows-TerminalServices-LocalSessionManager" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <fDenyTSConnections>false</fDenyTSConnections>
        </component>

        <component name="Microsoft-Windows-TerminalServices-RDP-WinStationExtensions" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <UserAuthentication>0</UserAuthentication>
        </component>

        <component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FirewallGroups>
                <FirewallGroup wcm:action="add" wcm:keyValue="RemoteDesktop">
                    <Active>true</Active>
                    <Profile>all</Profile>
                    <Group>Remote Desktop</Group>
                </FirewallGroup>
            </FirewallGroups>
        </component>

   <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <RunSynchronous>
        <RunSynchronousCommand wcm:action="add">
          <Order>1</Order>
          <Path>bcdedit /emssettings emsport:1 emsbaudrate:115200</Path>
        </RunSynchronousCommand>
      </RunSynchronous>
    </component>
  </settings>

<settings pass="offlineServicing">
    <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <DriverPaths>
            <PathAndCredentials wcm:action="add" wcm:keyValue="1">
                <Path>d:\\virtio</Path>
            </PathAndCredentials>
        </DriverPaths>
    </component>
</settings>
</unattend>

I took the original autounattend.xml from https://github.com/nahanni/bhyve-windows-unattend-xml and changed every occurrence of "en-US" to "de-CH".

Am I lost here. I rewrote the .iso about 10 times trying different configurations and I still get these errors. Does anyone have an idea?

Regards
Philipp
 
The image you're using doesn't contain the language packs. So you can't change the language.

(This is actually a Windows installer issue, it has nothing to do with FreeBSD).
 
I never doubted this was a Windows issue...

This is a bit confusing. I don't get why I wouldn't be able to use de-DE or de-CH locale when the image is a german one.
Even removing the whole <component>...</component> containing the language settings did not work.
I guess I would need to apply the en-US language pack to the installer to be able to change the language to the one I would actually want to use.

Using the english installer seems to work without any modifications... I'll report back later.

Thanks anyway though!


Regards
Philipp
 
So with a different ISO and setting de-de as locale I was able to install the guest, same with another english ISO and setting en-US.
However, after installing the VMs and rebooting them they either lost their disk image or could not obtain an IP address via DHCP.
Running Windows on bhyve seems to complicated for me at the moment, I'll migrate to VMware ESXi.

Greetings
Philipp
 
Did you set the disk emulation to ahci-hd? Windows does not support virtio.
 
Yes, vm-bhyve has a Windows template which already has disk emulation configured as "ahci-hd".
Okay, I did not know Windows does not support virtio. The vm-bhyve guide on GitHub for running Windows refers to these instructions for repacking a Windows ISO; they incorporate virtio into it.
 
It's also worth setting the sector size explicitly:
Code:
.... -s 3,ahci-hd,<hdd_file>,sectorsize=512 ....

This might very well be the reason why the vm lost the disk image. I overlooked that in the guide.
 
Another update from my part:

I tried migrating to ESXi so I would have an easier time *virtualizing all the things*. This did not work out either, FreeBSD 10.3 and 11.0 VMs would not boot when I passed through my Adaptec 71605H to them. Same thing both on ESXi 6.0 and 6.5.

What I did instead was to migrate from bare-metal FreeBSD 10.3 to bare-metal FreeBSD 11 and virtualize Windows Server 2016 with bhyve (vm-bhyve). The graphical console makes things a lot easier (no repacking, no autounattend.xml, etc.).

I'll mark this thread solved

Greetings
Philipp
 
Back
Top