Re: Windows Server 2016 as guest on bhyve 4k emulated drive

2017-05-06 Thread Thibault Noel
Hi Guys !

I tried to use windows 10 on Bhyve, and I have a coredump when I try to use
VNC.

My command line is :
bhyve -c 4 -m6G -Hl bootrom,BHYVE_UEFI_20160526.fd -s 0,hostbridge -s
1:0,ahci-hd,/dev/zvol/tank/VM/windows.img,sectorsize=512 -s
5:0,ahci-hd,/var/tmp/windows.disk -s 7:0,virtio-net,tap0 -s 8:0,fbuf,tcp=
192.168.1.10:5900,w=640,h=480,wait Windows10

BT from gdb :

Loaded symbols for /libexec/ld-elf.so.1
#0  0x00080119755a in thr_kill () from /lib/libc.so.7
[New Thread 801abd700 (LWP 101141/)]
[New Thread 801abd200 (LWP 101138/)]
[New Thread 801abcd00 (LWP 101137/)]
[New Thread 801abc800 (LWP 101136/)]
[New Thread 801abc300 (LWP 101135/)]
[New Thread 801abbe00 (LWP 101134/)]
[New Thread 801abb900 (LWP 101133/)]
[New Thread 801abb400 (LWP 101132/)]
[New Thread 801abaf00 (LWP 101131/)]
[New Thread 801abaa00 (LWP 101130/)]
[New Thread 801aba500 (LWP 101129/)]
[New Thread 801aba000 (LWP 101128/)]
[New Thread 801a1ab00 (LWP 101127/)]
[New Thread 801a1a600 (LWP 101126/)]
[New Thread 801a1a100 (LWP 101125/)]
[New Thread 801a19c00 (LWP 101124/)]
[New Thread 801a19700 (LWP 101123/)]
[New Thread 801a19200 (LWP 101122/)]
[New Thread 801a18d00 (LWP 101121/)]
[New Thread 801a18800 (LWP 101120/)]
[New Thread 801a18300 (LWP 101119/)]
[New Thread 801a17e00 (LWP 101118/)]
[New Thread 801a17900 (LWP 101117/)]
[New Thread 801a17400 (LWP 101116/)]
[New Thread 801a16f00 (LWP 101112/)]
[New Thread 801a16a00 (LWP 10/)]
[New Thread 801a16500 (LWP 101110/)]
[New Thread 801a16000 (LWP 101223/)]
(gdb) bt
#0  0x00080119755a in thr_kill () from /lib/libc.so.7
#1  0x00080119752b in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52
#2  0x000801197499 in abort () at /usr/src/lib/libc/stdlib/abort.c:65
#3  0x0040affc in vm_loop (ctx=0x801a1b0c0, vcpu=0, startrip=65520)
at /usr/src/usr.sbin/bhyve/bhyverun.c:634
#4  0x00409e81 in fbsdrun_start_thread (param=0x859b10) at
/usr/src/usr.sbin/bhyve/bhyverun.c:244
#5  0x000800eb1b55 in thread_start (curthread=) at
/usr/src/lib/libthr/thread/thr_create.c:289
#6  0x in ?? ()

Any Idee ?

Thank You :)
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Windows Server 2016 as guest on bhyve 4k emulated drive

2017-05-05 Thread Peter Grehan

Hi Artur,


I can not explain how Windows comes to 8192 bytes.


 As explained in Jeremya F's email, that's the zvol default record size.



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.


 Bhyve presents a virtual drive so this doesn't apply.


(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.


 I'd recommend sticking with "sectorsize=512/4096" for now.

 The 4096/4096 appears to be a bhyve bug that needs to be fixed, 
especially since the NVMe emulation GSoC project has been approved*, and 
that mandates 4K block size.


later,

Peter.

* https://summerofcode.withgoogle.com/projects/#5252121027936256
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Windows Server 2016 as guest on bhyve 4k emulated drive

2017-05-05 Thread Jeremy Faulkner



On 2017-05-05 12:47 PM, Artur Moor wrote:


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.



8192 is the default volblocksize of a zvol. If you had been using a file 
it would be reporting the sector size as the recordsize of the zfs 
dataset. Had similar issues when trying to use an application that 
depending on MS SQL under bhyve.


Jeremy
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Windows Server 2016 as guest on bhyve 4k emulated drive

2017-05-05 Thread Artur Moor
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 :   0x18ee47ff
Total Clusters :   0x031dc8ff
Free Clusters  :   0x02f2184a
Total Reserved :   0x3440
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 :0x0674
Mft Start Lcn  :   0x000c
Mft2 Start Lcn :   0x0002
Mft Zone Start :   0x000c65c0
Mft Zone End   :   0x000cc820
Max Device Trim Extent Count : 64
Max Device Trim Byte Count :   0x7fff8000
Max Volume Trim Extent Count : 62
Max Volume Trim Byte Count :   0x4000
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 :   0x18ee47ff
Total Clusters :   0x031dc8ff
Free Clusters  :   0x02f1bee2
Total Reserved :   0x3460
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 :0x0678
Mft Start Lcn  :   0x000c
Mft2 Start Lcn :   0x0002
Mft Zone Start :   0x000c65c0
Mft Zone End   :   0x000cc820
Max Device Trim Extent Count : 64
Max Device Trim Byte Count :   0x7fff8000
Max Volume Trim Extent Count : 62
Max Volume Trim Byte Count :   0x4000
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

Re: Windows Server 2016 as guest on bhyve 4k emulated drive

2017-05-03 Thread 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.

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Windows Server 2016 as guest on bhyve 4k emulated drive

2017-05-02 Thread Artur Moor
Hello,

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?

Thanks in advance for any hints!

Artur
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"