Enable Hyper-V in the Virtualized Windows Server 2016

Hyper-V and Hyper-V management tools are not enabled by default when you install the Windows Server 2016. Just in case if you have same problem with Window Server 2012 you can check this blog post for the details how to enable it!

However, we will dicsuss here how to enable Hyper-V and Hyper-V Management Tools in Virtualized Windows Server 2016, for example in most cases if you have Azure account where you can run Windows Server 2016 just in few seconds and for sure this is just a VM inside the Azure platform and here are some steps how to enable Hyper-V in that VM:

For sure the Hyper-V is part of the Windows Server Roles, so when you go to add the Hyper-V role:

ServerRoleHyperV
Adding Hyper-V Role in your Windows Server 2016 VM.

 

After you click the next button you will have pop-up msg with Error like this:

WarningErrorHyperV

Now you need to use our friend PowerShell, starting with a session as Administrator and type this command:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

PowerShellHyperVEnable

Will start something to install and will looks like this:

InstallingHyperVPowershell

After the finish of the install process you will be asked to restart your VM, so just do it.

Again go to add Roles & Features for your VM after restart and you will see that you have enabled the Hyper-V role in your Windows Server 2016.

HyperVInstalledinWinSrv

Now go to the Server Features with Next button and in the section:

Remote Server Administration Tools >  Role Administration Tools > Hyper-V Management Tools  – click to install them.

AddingHyperVMngTools

InstallingMngToolsLive

After the successful installation , you will be able to see the Hyper-V Manager in your start menu like:

HyperVReady

Happy virtualization with Hyper-V and Windows Server 2016 with lot of the new features including Hyper-V Management improvements, Nested virtualization, Shielded VMs, Windows Containers, Linux Secure Boot & more

Stay Tuned …

 

 

 

 

Fixing: SQL Server Error 4064 …

An error that is known how to solve it, I was the victim today with it and when I started the SSMS, I saw that error. I’m telling you here how to fix it as fast info and references from MS.

This error usually comes when your DB no longer exists or it is in suspect mode or has been detached or offline etc, and you will have the pop-up message with error description and the number 4064:

Error4064

Ok, as you can see the user Blue cannot connect in the default database and the login failed!

Fixing this error is really easy, so you can try again to login with that user but first before to Connect, you must go to the Options that is in right corner below and you will be asked for the Connection Properties on the second tab of the login dialog box and you must enter the master database in the drop-down box, see the fig below and hit Connect:

OptionConn

Now you will be able to connect in your SQL Server. So what’s next!? As I said, some of the reason why it happened are described above, so now you can check for the correct DB that must be as default DB of that user. After that to be sure for the next connection you need to change the default DB via T-SQL or GUI:

GUI: Open the SSMS  on the right, you have object Explorer, go to Security > Logins > Find your login and right click > Properties. You will have the dialog box like shown in the fig below.

Testing

Or you can use the T-SQL script:

USE [master]
GO
ALTER LOGIN [Blue] WITH DEFAULT_DATABASE=[TESTING2];
GO

For more info about this error, you can check here.