vbox Installing Windows 10 in Virtualbox 5.2.44

bbqnerd

New Member

Reaction score: 2
Messages: 10

Hello. For the past couple of days I have tried to install Windows 10 (20H2) in Virtualbox 5.2.44 but it keeps failing. I followed the instructions which normally come at the end of installing Virtualbox via pkg (add user to vboxusers, etc), and followed the instructions in the FreeBSD Handbook for using Virtualbox as host (https://www.freebsd.org/doc/handbook/virtualization-host-virtualbox.html).

I added the following to /etc/rc.conf:
Code:
vboxnet_enable="YES"
devfs_system_ruleset="system"

...and added the following to /etc/loader.conf
Code:
vboxdrv_load="YES"

When I start the installation of Windows within Virtualbox it fails at the part where the actual files are being installed. It gets to about 45-50% then crashes. I feel like there are a couple of configurations I'm missing.

Has anyone else experienced this?

P.S. I'm using FreeBSD 12.2
 

vigole

Aspiring Daemon

Reaction score: 783
Messages: 770

Did you allocate enough RAM for VM? Also check the Windows ISO checksum.
 
OP
B

bbqnerd

New Member

Reaction score: 2
Messages: 10

Thanks for the reply. I allocated 6 GB of ram and 60 GB of disk. I actually didn't check the checksum. Good thinking. I'll try it and see what happens.
 
OP
B

bbqnerd

New Member

Reaction score: 2
Messages: 10

So I downloaded another Windows 10 ISO file and ran the following in the terminal:

rhash --sha256 Win10_20H2_English_x64.iso

The result was:
e793f3c94d075b1aa710ec8d462cee77fde82caf400d143d68036f72c12d9a7e

It matches the Microsoft hash. I tried doing another install in Virtualbox and it hung at the 36% mark during the installation. Not sure what to try next.
 

scottro

Daemon

Reaction score: 597
Messages: 1,611

For whatever it's worth, though it requires a little more work, I've had drastically better Windows 10 performance using bhyve. In VBox, it was almost unusably slow. In Bhyve, it's pretty good. I have a little page on it with links to better pages, about using vm-bhyve, which makes it pretty easy.

I realize this is not answering your exact problem, but if nothing else works, it may serve as an alternative.
 
OP
B

bbqnerd

New Member

Reaction score: 2
Messages: 10

Thank you. I'm okay with doing the work. Never tried bhyve before but I know it's the FreeBSD hypervisor. Now is a good time to learn it.

I'm a fan of Virtualbox but if bhyve "just works" I'm cool with that.
 

scottro

Daemon

Reaction score: 597
Messages: 1,611

I should clarify by saying I don't know if I'd say it Just Works. (TM). But if you look at the link on my page (their github page), it gives pretty clear instructions and so I'd say as a rule, vm-bhyve works without a great deal of effort.
 
OP
B

bbqnerd

New Member

Reaction score: 2
Messages: 10

My CPU is set to VT-x. Also, I had already uninstalled Virtualbox early this morning so I'm not sure the vboxmanage command will work. I'll definitely use that in the future.

[USER=1587]scottro[/USER] - I followed the guide and am currently at the section about the vncviewer. Not familiar with vncviewer but I installed this:

pkg install tightvnc-1.3.10_6

Is that the correct viewer? Also, I typed:

vncviewer:5900

and got an error: vncviewer:5900: Command not found

Is there something else I should use?

Thanks.
 

scottro

Daemon

Reaction score: 597
Messages: 1,611

Yes, tightvnc is the right one. Did you do rehash (or hash -r) in shell once you installed. It should be in /usr/local/bin/. (You can always check with the provides option of pkg (https://www.freshports.org/ports-mgmt/pkg-provides/), or just looking at /usr/ports/net/vncviewer/pkg-plist |grep bin)

But, (I see I made an error in the article which I'll fix after this post), the command should be vncviewer localhost:5900.

If you installed tightvnc you should definitely have the command, and I apologize for the error on my page. I gave you a thanks as you showed me the error I'd made on the page, but you should, if you installed tightvnc, definitely have the vncviewer command.
 
OP
B

bbqnerd

New Member

Reaction score: 2
Messages: 10

I actually didn't run rehash or hash -r until now. I ran the hash -r command (just now) and I was returned back to the root prompt (so not sure if it worked or not). I then ran:

vncviewer localhost:5900

...and received an error saying:

Error: Can't open display:

Is the purpose of running the hash/rhash command needed to verify the hash on the ISO once more? Do I need to reboot my machine to get vncviewer working?

Thanks for the help.
 
OP
B

bbqnerd

New Member

Reaction score: 2
Messages: 10

I found an old post for the same problem. In the post it suggested I delete .Xauthority from my home directory (which I did), and also suggested I do an export DISPLAY=:0.0 (which I also did). I then logged out (not rebooted) and logged back in. I opened a terminal window and ran vncviewer localhost:5900 as myself and not root. The VNC viewer opened up to a screen that looked like boot menu page (which I think is the bhyve firmware page). I typed exit which took me to a different boot menu, hit enter, and was then directed to the windows installer. I ran the Windows installer and it just finished. Thank you very much to everyone on this thread. I appreciate all the help.

I realize this is essentially resolved but I do have a couple of questions:

Will Windows always be in ready state for me to access it (meaning everytime I run vncviewer localhost:5900 will I ALWAYS be taken to the login screen)?
Does anyone have a good link for bhyve documentation (haven't found one so far)?
 

scottro

Daemon

Reaction score: 597
Messages: 1,611

Glad it was of some help, though I fear the link to someone else's article is more helpful. :) To answer some of your questions, the link on my page to vm-bhyve's page is one bit of documentation. If you don't shut down the Windows vm, it will continue running. The vm command does require admin rights, it seems, you can always find out if the machine is running with vm status (run with root privilege). The reason you got command not found, i think, is because the shell saw the command as one command 'vncviewer:5900'. But hash -r (for bourne shells) and rehash (for cstyle shells). just makes it reread your $PATH, so if you put in a new command and your session doesn't see the command, running hash -r will rescan all the standard command paths. (That's because I mistakenly thought that maybe it hadn't yet registered vncviewer, but as I said, I think it was just that your shell saw one word, due to the error in my article and thought the command was vncviewer:5900, rather than vncviewer.)

Just a note, I have found vncviewer to be unreliable when resuming a view. The remmina program with rdp plugin used to be much better, but an upgrade stopped it from working, and since vncviewer meets my very limited needs, I've not really looked into it.

If you had the machine running, and had logged in, then done something with it, then killed vncviewer, then went back to it, then I think it will take you back to whatever you were doing on the Windows machine, rather than a login screen, but I haven't tested that very much.
I usually open Windows to do a specific thing, then shut it down.

As for other bhyve docs, there is this from the handbook. (That's not using vm-bhyve, regular bhyve). https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html
 

diego

Member

Reaction score: 20
Messages: 61

For whatever it's worth, though it requires a little more work, I've had drastically better Windows 10 performance using bhyve. In VBox, it was almost unusably slow. In Bhyve, it's pretty good. I have a little page on it with links to better pages, about using vm-bhyve, which makes it pretty easy.

I realize this is not answering your exact problem, but if nothing else works, it may serve as an alternative.
Agreed.
I have had much better performance using bhyve than virtualbox
 

masayoshi

Active Member

Reaction score: 7
Messages: 111

When I start the installation of Windows within Virtualbox it fails at the part where the actual files are being installed. It gets to about 45-50% then crashes. I feel like there are a couple of configurations I'm missing.

Has anyone else experienced this?

I needed to modify /etc/sysctrl.conf.
Bug 212128
 
Top