Create a trial Windows Enterprise 8.1 on a headless ubuntu server

Before deciding whether to go ahead or not with purchasing the windows os, I decided to try it and see its performance.

Download the windows 8.1 enterprise edition 90-day trial

Download it from
https://www.microsoft.com/en-us/evalcenter/evaluate-windows-8-1-enterprise
windows 8.1. enterprise is just like windows 8.1 pro but without the media centre stuff.

After logging in with a microsoft account and registering, I downloaded this file (3.9Gb) 9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_ENTERPRISE_EVAL_EN-US-IR3_CENA_X64FREE_EN-US_DV9.ISO
and renamed it to windows-8.1-enterprise.iso for ease of use. Copy this to your ubuntu server.

Recommended settings for windows 8.1

When creating the Virtual Machine, we will use the settings recommended below, mainly a 64-bit version of the OS with 2Gb RAM and 20GB HDD
space.
from:
http://windows.microsoft.com/en-gb/windows-8/system-requirements

System requirements
Windows 8.1

If you want to run Windows 8.1 on your PC, here’s what it takes:

Processor: 1 gigahertz (GHz)* or faster with support for PAE, NX and SSE2 (more info)

RAM: 1 gigabyte (GB) (32-bit) or 2 GB (64-bit)

Hard disk space: 16 GB (32-bit) or 20 GB (64-bit)

Graphics card: Microsoft DirectX 9 graphics device with WDDM driver

If you’re running Windows 8 you can get a free update to Windows 8.1. Just tap or click the Windows Store tile on your Start screen. Once you’ve moved up to Windows 8.1 you should get the update automatically. If you don’t, follow these steps to get it manually using Windows Update.

VBox Virtual Machine

Install version 5.0 of vbox
Need to add the source to sources.list

Then we download the VirtualBox public key…

Then install version 5.0

Download and install the latest version of the extpacks (for Remote Desktop access from windows)

You can check to see if the extpack downloaded is compatible or not with the system:

If it is incompatible, the Usable would be set to false, at which point it’s is better to check the logs for errors:

You can get a rolling log on screen of the log file like this:

Creating the Virtual Machine

Copy the windows iso downloaded to ~/iso/windows-8.1-enterprise.iso
Register the new VirtualBox:

Ensure that your ethernet adaptor is correct here, the tutorial used eth0, but mine was actually em1 (and p7p5 on another machine)
(Run ifconfig to find yours)

Make the VBox run in vrde mode on port 5000
VirtualBox Remote Desktop Extension (VRDE), allows the VirtualBox to be viewed from another machine using Remote Desktop on the specified port (VirtualBox_IP_ADDRES:5000 in the example below).

Useful commands

Didn’t work on ubuntu

Followed this tutorial on how to create it in Windows and will try to imprt the created vb in ubuntu
http://www.pcworld.com/article/2016057/how-to-test-drive-windows-8-for-free-in-virtualbox.html

In Virtual box gui in windows, export the VM to an .ova file + copy that to ubuntu

Used this to find out how to import the ovs into ubuntnu:
https://forums.virtualbox.org/viewtopic.php?f=7&t=60681

// Do ad dry run first to ensure all is ok:
$ VBoxManage import ~/samba/Windows\ 8.1.ova –dry-run
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Interpreting /home/fab/samba/Windows 8.1.ova…
OK.
Disks:
vmdisk1 26843545600 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized Windows 8.1-disk1.vmdk -1 -1

Virtual system 0:
0: Suggested OS type: “Windows81_64”
(change with “–vsys 0 –ostype “; use “list ostypes” to list all possible values)
1: Suggested VM name “Windows 8.1_1”
(change with “–vsys 0 –vmname “)
2: Number of CPUs: 1
(change with “–vsys 0 –cpus “)
3: Guest memory: 2048 MB
(change with “–vsys 0 –memory “)
4: Sound card (appliance expects “”, can change on import)
(disable with “–vsys 0 –unit 4 –ignore”)
5: USB controller
(disable with “–vsys 0 –unit 5 –ignore”)
6: Network adapter: orig NAT, config 3, extra slot=0;type=NAT
7: CD-ROM
(disable with “–vsys 0 –unit 7 –ignore”)
8: SATA controller, type AHCI
(disable with “–vsys 0 –unit 8 –ignore”)
9: Hard disk image: source image=Windows 8.1-disk1.vmdk, target path=/home/fab/VirtualBox VMs/Windows 8.1_1/Windows 8.1-disk1.vmdk, controller=8;channel=0
(change target path with “–vsys 0 –unit 9 –disk path”;
disable with “–vsys 0 –unit 9 –ignore”)

// Once happy g fo rit:
$ VBoxManage import ~/samba/Windows\ 8.1.ova
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Interpreting /home/fab/samba/Windows 8.1.ova…
OK.
Disks:
vmdisk1 26843545600 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized Windows 8.1-disk1.vmdk -1 -1

Virtual system 0:
0: Suggested OS type: “Windows81_64”
(change with “–vsys 0 –ostype “; use “list ostypes” to list all possible values)
1: Suggested VM name “Windows 8.1_1”
(change with “–vsys 0 –vmname “)
2: Number of CPUs: 1
(change with “–vsys 0 –cpus “)
3: Guest memory: 2048 MB
(change with “–vsys 0 –memory “)
4: Sound card (appliance expects “”, can change on import)
(disable with “–vsys 0 –unit 4 –ignore”)
5: USB controller
(disable with “–vsys 0 –unit 5 –ignore”)
6: Network adapter: orig NAT, config 3, extra slot=0;type=NAT
7: CD-ROM
(disable with “–vsys 0 –unit 7 –ignore”)
8: SATA controller, type AHCI
(disable with “–vsys 0 –unit 8 –ignore”)
9: Hard disk image: source image=Windows 8.1-disk1.vmdk, target path=/home/fab/VirtualBox VMs/Windows 8.1_1/Windows 8.1-disk1.vmdk, controller=8;channel=0
(change target path with “–vsys 0 –unit 9 –disk path”;
disable with “–vsys 0 –unit 9 –ignore”)
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Successfully imported the appliance.

After that I just turned on vdre and set the port to 5001 for RDP
$ VBoxManage modifyvm “Windows 8.1_1” –vrde on –vrdeport 5002

$ VBoxHeadless –startvm “Windows 8.1_1” &
[1] 11684
fab@ubuntu:~/VirtualBox VMs$ Oracle VM VirtualBox Headless Interface 5.0.16
(C) 2008-2016 Oracle Corporation
All rights reserved.

VRDE server is listening on port 5002.

From the on I could use RDP from windows on port 5002 to login and use the trial version of windows.
RDP into:
ubuntu:5002

Installing SQL Management Stdio 2008

Followed this guide:
https://blogs.msdn.microsoft.com/bethmassi/2011/02/18/step-by-step-installing-sql-server-management-studio-2008-express-after-visual-studio-2010/

adding users to mssql, Enabling remote access

Adding users to MSSQL using SQL Server Management Studio
https://gearhost.zendesk.com/hc/en-us/articles/200342665-Adding-users-to-MSSQL-using-SQL-Server-Management-Studio

How to configure SQL Express 2012 to accept remote connections

How to configure SQL Express 2012 to accept remote connections

Installed th sql management studio on another pc, tried to conenct to vista using synseal’s login details, ok.
Tried on the VM failed with login error 18456

this is how to fix it:

if you’re trying to connect using “SQL Server Authentication” then you may want to modify your server authentication ;

Right click server and click properties

go to security page

under Server authentication, choose the SQL Server and Windows Authentication mode radio button

click OK

restart your server

this might help you !

next error:
The SELECT permission was denied on the object ‘document_type’, database ‘ms_synseal’, schema ‘dbo’.

to fix:
Go to Databases > your database > Security > users > right click on the user you want to modify then click properties
Under Database role memebrship, ensure the following are ticked:
db_datareader
db_datawriter
db_owner
click ok.

That fixed the last connection problem.

Export vm and import into ubuntu again

Runnig the virtual machine I now get this error:
Error: failed to start machine. Error message: Failed to open/create the internal network ‘HostInterfaceNetworking-Dell GigabitEthernet’ (VERR_INTNET_FLT_IF_NOT_FOUND).
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)

Probably because of the netwroking bridge adapter that was created on my dell windows machine…
So tried to reset the bridge adaptor:
$ VBoxManage modifyvm “Windows 8.1” –nic1 bridged –bridgeadapter1 em1

Still get the rror:
Error: failed to start machine. Error message: Failed to open/create the internal network ‘HostInterfaceNetworking-Dell GigabitEthernet’ (VERR_INTNET_FLT_IF_NOT_FOUND).
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND)

How do I remove the bridge adapter? (Short of deleting in windows vbox gui and re-exporting…?)
NIC2 adapter was still pointing to an error entry so, just get rid of it:
$ VBoxManage modifyvm “Windows 8.1” –nic2 none

After that it works, there is a bridged connection with in ip address that is picked up by the DHCP 192.168.1.1 so it could be made static and
the database connection to MSSQL works also! Finally!!!

I read on a different blog to enable PAE, which on ubuntu gets listed as
PAE: on
When
$ VBoxManage showvminfo “Windows 8.1”
This seemed to have caused a conflict which when the machine started on ubuntu server I got:
$ VBoxHeadless –startvm “Windows 8.1” &
[1] 11772
fab@userver:~$ Oracle VM VirtualBox Headless Interface 5.0.16
(C) 2008-2016 Oracle Corporation
All rights reserved.

ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver return ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned er ror: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned err or: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directo ry
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver return ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned er ror: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned err or: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directo ry
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:768:(parse_card) cannot find card ‘0’
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver return ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned er ror: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned err or: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directo ry
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
VRDE server is listening on port 5001.

So now to try and deisable PAE:
$ VBoxManage controlvm “Windows 8.1 Pro” poweroff
$ VBoxManage modifyvm “Windows 8.1 Pro” –pae off
Still doesn’t work, problem is not this. ALSA is to do with the sound card, since this is a headless ubuntu system, without a soundcard, this must be what’s causing the problem, not the PAE thing.

Another problem was that when the virtual box was started in the ubuntu server, it said that the chip was not recognised as a 64bit chip.
TO fix this, you have to enable virtualization on your machine via its BIOS.
http://askubuntu.com/questions/256792/how-do-i-enable-hardware-virtualization-technology-vt-x-for-use-in-virtualbox

How to Enable Intel VT-x in Your Computer’s BIOS or UEFI Firmware

Another blog suggested that:
1. If you get an error “This 64-bit application couldn’t load because your PC does not have a 64-bit processor”, it means you haven’t enabled hardware virtualization and/or IO APIC for the VM. Enable both, shutdown the PC (not just restart) and start again.
(http://techpp.com/2011/09/14/guide-to-install-windows-8-on-virtualbox/)

Leave a Reply