Windows Server 2016 as guest on bhyve 4k emulated drive
Artur Moor
digunit24 at gmail.com
Fri May 5 16:47:34 UTC 2017
Hi Peter,
a few background information to understand my concern.
I have encountered the problem when I tried to install Remote Desktop
Services under Windows Server 2016. Installing roles for Remote Desktop
Services requires the installation of Windows Internal Database. To my
knowledge, Windows Internal Database is a customized MS SQL database.
Whether the sectorsize option is not specified (default) or specified by
512/4096, Windows makes no difference:
===================================
SECTORSIZE NOT SPECIFIED (DEFAULT):
===================================
C:\Users\Administrator>fsutil fsinfo ntfsinfo C:
NTFS Volume Serial Number : 0x82c67b9ec67b9161
NTFS Version : 3.1
LFS Version : 2.0
Number Sectors : 0x0000000018ee47ff
Total Clusters : 0x00000000031dc8ff
Free Clusters : 0x0000000002f2184a
Total Reserved : 0x0000000000003440
Bytes Per Sector : 512
Bytes Per Physical Sector : 4096
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length : 0x0000000006740000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x0000000000000002
Mft Zone Start : 0x00000000000c65c0
Mft Zone End : 0x00000000000cc820
Max Device Trim Extent Count : 64
Max Device Trim Byte Count : 0x7fff8000
Max Volume Trim Extent Count : 62
Max Volume Trim Byte Count : 0x40000000
Resource Manager Identifier : BC179E2E-31BC-11E7-A818-C892307D8C50
====================
sectorsize=512/4096:
====================
C:\Users\Administrator>fsutil fsinfo ntfsinfo c:
NTFS Volume Serial Number : 0x9202993002991a75
NTFS Version : 3.1
LFS Version : 2.0
Number Sectors : 0x0000000018ee47ff
Total Clusters : 0x00000000031dc8ff
Free Clusters : 0x0000000002f1bee2
Total Reserved : 0x0000000000003460
Bytes Per Sector : 512
Bytes Per Physical Sector : 4096
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length : 0x0000000006780000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x0000000000000002
Mft Zone Start : 0x00000000000c65c0
Mft Zone End : 0x00000000000cc820
Max Device Trim Extent Count : 64
Max Device Trim Byte Count : 0x7fff8000
Max Volume Trim Extent Count : 62
Max Volume Trim Byte Count : 0x40000000
Resource Manager Identifier : AEC0364B-31B7-11E7-ADF9-FF1A61A4B251
If the sectorsize option is unspecified, the installation of Windows
Internal Database fails. I found corresponding error message in the event
viewer:
======================
Mesage in Event Viewer
======================
> Cannot use file 'C:\Windows\WID\Data\master.mdf' because it was originally
> formatted with sector size 4096 and is now on a volume with sector size
> 8192. Move the file to a volume with a sector size that is the same as or
> smaller than the original sector size.
>
Log Name: Application
Source: MSSQL$MICROSFT##WID
Event ID: 5178
Level: Error
I can not explain how Windows comes to 8192 bytes.
If I specify the sectorsize by 512/4096, then Windows Internal Database can
be installed without problems and that is very strange for me!
However, I found an article
<https://msdn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update?f=255&MSPPError=-2147217396>
about 512E drives. According to the article, the 512E drives should not be
used, because this configuration affects both the lifetime and the
performance of the drives. (
https://msdn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update?f=255&MSPPError=-2147217396
)
For this reason, I started using 4K emulated drive, both logical and
physical (sectorsize=4096/4096), but Windows can not be installed on a 4K
emulated drive.
Artur
2017-05-03 9:00 GMT+02:00 Peter Grehan <grehan at freebsd.org>:
> Hi Artur,
>
> if the option 'sectorsize=4096/4096' for the emulated drive specified, the
>> installation process of "Windows Server 2016" completes the first stage
>> ('Copying Windows files', 'Getting files ready for installation',
>> 'Installing features' etc.) and fails after rebooting to the second stage.
>>
>> The second stage ends with the following message:
>> Boot Failed. Windows Boot Manager
>> Boot Failed. EFI DVD/CDROM
>> Boot Failed. EFI DVD/CDROM 1
>> Boot Failed. EFI Hard Drive
>>
>> I suppose that Windows Boot Manager has problems when booting the 4k
>> emulated drive.
>>
>> Does anyone have any idea what can be the cause of this?
>>
>
> I think it may be an issue with the AHCI driver in UEFI not returning the
> correct block size - will look into it further.
>
> I did verify that setting 'sectorsize=512/4096' works fine with 2k16.
>
> later,
>
> Peter.
>
>
More information about the freebsd-virtualization
mailing list