# FreeBSD 11 Release - bhyve and Windows 7



## SemFLY (Sep 25, 2016)

Hi! 

Host computer

*OS* FreeBSD 11 Release
*Processor* Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (3997.77-MHz K8-class CPU)
*real memory*  = 34359738368 (32768 MB)
*avail memory* = 33237377024 (31697 MB)
*SSD x 2* - Samsung SSD 850 EVO 500GB EMT01B6Q _(RAID Stripe - hardware)_

Guest.
I install Windows 7 Pro and Ultimate versions under VM bhyve.
Start install Windows 7.
Copynig files very fast, one second!
Installation goes two - three hours on this stage "Expandeding Windows files..."
and three dots move... move... move... install don't freeze, vm bhyve work normal.
But two - three hours... 0% or 3,5,6 or 8%...





After install finish all working very quckly, excellent boot, reboot system, RDP, install program, work glass effect(Aero theme), sound, video and etc.

Another system Windows 8, 8.1, Windows Server system, CentOS, FreeBSD and etc.
No problem with long installation, 5 - 10 minutes.


May be who know, why install only Windows 7 is too long ?
With achi problem and installer old, may be this ?

What ideas ?


----------



## grehan@ (Sep 26, 2016)

Win 7 is a slow install, but 2-3 hours does seem excessive (30-45 mins is more like it).

What did your bhyve config look like ?


----------



## SemFLY (Sep 27, 2016)

grehan@
Thanks for your answer 
This my config


```
# pwd
/vmdata
# cat bhyve_load_win7
```


```
#!/bin/sh
bhyve -c 2 -s 7,fbuf,tcp=0.0.0.0:5900 \
-s 0,hostbridge -s 3,ahci-hd,windows7.img \
-s 4,ahci-cd,win7_pro_x64.iso \
-s 10,virtio-net,tap0 -s 31,lpc -l bootrom,BHYVE_UEFI.fd \
-m 6G -H -w windows7
```


----------



## grehan@ (Sep 28, 2016)

Thanks, I'll see if I can repro that.

Something quick to try is to do the install with a single vCPU (-c 1), and then bump it up post-install.


----------



## grehan@ (Sep 30, 2016)

The first phase of an install with Win7 Home Premium, a single vCPU and 'sectorsize=512' appended to the ahci-hd option took ~40 mins. There was quite a bit of that time where the guest was idle, but Vista has similar behaviour during a scripted install in bhyve.


----------



## SemFLY (Sep 30, 2016)

grehan@ said:


> The first phase of an install with Win7 Home Premium, a single vCPU and 'sectorsize=512' appended to the ahci-hd option took ~40 mins. There was quite a bit of that time where the guest was idle, but Vista has similar behaviour during a scripted install in bhyve.


Hmm... sectorsize=512 ?! Good information, thanks 
You write an interesting point.
I read manual about bhyve(8) command line many times, but not focused on the additional options for ahci-hd.
Ok, i will test too install Win7 again, but set sectorsize=512


----------



## SemFLY (Sep 30, 2016)

*grehan@*
what program you use for create virtual disc ?

```
# truncate -s 20G win7_virtual_disc.img
```
this program ?


----------



## Phishfry (Sep 30, 2016)

I believe in this case that truncate(2) only creates an blank file. You have to fill it with the desired contents..


----------



## grehan@ (Oct 1, 2016)

/usr/sbin/truncate is fine for creating initial empty disk images on UFS and ZFS.

Using 'sectorsize=512' is required for Win Vista/7/2k8.


----------



## EsTaF (Oct 31, 2017)

windows 7:
"windows cannot be installed on this disk", when see a select disk dialog.
After a start install had watching "zero" progress about 2 hours.
bhyvectl --vm=win7 --destroy


----------

