From owner-freebsd-virtualization@freebsd.org Fri May 5 16:47:34 2017 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D7F5D5F126 for ; Fri, 5 May 2017 16:47:34 +0000 (UTC) (envelope-from digunit24@gmail.com) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 258041D28; Fri, 5 May 2017 16:47:34 +0000 (UTC) (envelope-from digunit24@gmail.com) Received: by mail-qt0-x235.google.com with SMTP id m36so9665128qtb.0; Fri, 05 May 2017 09:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qDP3G1lTDpaSBM2UHfMrqoXo9GwGDlbcrO2jwbJSWNM=; b=opJBcWU8hY/gZDMbw7u8GO9erDjoCpJ4ScVRhGIyZ2jXt3L5JQPs2AJyDCPfDCupfN utZmeMWaAvbxpvWrqLk/cgR/Qa+BgrRk7iGGTx01cQ/l6gbYLoQuot6MpsXd9pwt4QM9 iGg6NsvG5pFRyVYXWsRHxcGrV+tBJE+8/LTcockjfD/AEHONUCpmE9mFJlIgeoVl78N+ y70rOgNL0ZRZ8Aaa1An0YeD+01bJL0klk/iVGExLOwf1+FNGKkOCiC3nCiQmq6loWeBM MHxAR4kQq9KJT9O8i4bfJ8+qrLWkC8NcXbfpcWvZcEivLrudeG3sK2DDKIUxEJ+hvm+G XmZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qDP3G1lTDpaSBM2UHfMrqoXo9GwGDlbcrO2jwbJSWNM=; b=WlWe7YDPLYVtoRTmH58EBDh8RyAIOVxT9KMD+B426ozPJ+6/v/uT5IiYZ7N3twKcHS 1bSLSUnHFml4rxRdyOsjsQMUZWezovDyPfGMAwfzrhSqWc8idysA8Vdvunay/Welm7UA ylpfhqlY5NeZXRWkNF41oapq+lc4EkRoFQ/HQD5rEUJjhgiObS77VDZ4Xg8FxmMJEj5v 7SL2xXqCDSYyNoBhZ6h+IKeEeS7Gol1uRpMkLiBcT9LCfYTsqoBqSPT+DzR8XZkHHh2D xxSsuQL8JngLCvjeGBpUV6+d/PCaSthpIaKtjvdtRywsISOfFXJmiGgwiPHx0UJyiF8b WiZQ== X-Gm-Message-State: AN3rC/6pM04chWXrVVjO9e6dOSth61TMpuVJVaAIADFqdyrupwjO4KHW AE7FLv58L7cyJ39ygNm+DjAzC2IPohf4 X-Received: by 10.200.45.68 with SMTP id o4mr45537211qta.194.1494002853084; Fri, 05 May 2017 09:47:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.176.50 with HTTP; Fri, 5 May 2017 09:47:32 -0700 (PDT) In-Reply-To: <49770719-c87f-c673-4f2b-c17674797159@freebsd.org> References: <49770719-c87f-c673-4f2b-c17674797159@freebsd.org> From: Artur Moor Date: Fri, 5 May 2017 18:47:32 +0200 Message-ID: Subject: Re: Windows Server 2016 as guest on bhyve 4k emulated drive To: Peter Grehan Cc: freebsd-virtualization@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2017 16:47:34 -0000 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 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 : > 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. > >