How to force restart the machine when you get A system shutdown is in progress.(1115)

shutdown /s /m \\hyper1vm6 /t 0
hyper1vm6: A system shutdown is in progress.(1115)

shutdown /a /m \\hyper1vm6
hyper1vm6: A system shutdown is in progress.(1115)

taskkill /s \\hyper1vm6 /U administrator /P password /im lsass.exe
>>> Causes a panic and the operating system HAS to restart

Posted in windows | Tagged , | Leave a comment

Legacy Restore INTO Behavior

It creates a new copy of the backup dbcomp. The new copy has the name specified in the INTO parameter.

For example,

tdpsqlc rest MARIADB Full /INTO=testmnt1

DPSQL trace shows the following T-SQL statement:

10/20/2017 10:09:54.096 [010124] [8996] : SqlApi.cpp (5525): Calling databaseH->ExecuteNonQuery()
wcslen(sqlWideCmdP): 265
sqlWideCmdSize : 4096

E. Copying a database using BACKUP and RESTORE
The following example uses both the BACKUP and RESTORE statements to make a copy of the AdventureWorks2012 database. The MOVE statement causes the data and log file to be restored to the specified locations. The RESTORE FILELISTONLY statement is used to determine the number and names of the files in the database being restored. The new copy of the database is named TestDB. For more information, see RESTORE FILELISTONLY (Transact-SQL).
BACKUP DATABASE AdventureWorks2012
TO AdventureWorksBackups ;

FROM AdventureWorksBackups ;

FROM AdventureWorksBackups
WITH MOVE ‘AdventureWorks2012_Data’ TO ‘C:\MySQLServer\testdb.mdf’,
MOVE ‘AdventureWorks2012_Log’ TO ‘C:\MySQLServer\testdb.ldf’;

Posted in data protection | Tagged | Leave a comment

How to setup an Active Directory domain controller in VirtualBox

Verbatim copy from

How to setup an Active Directory domain controller in VirtualBox
Posted on April 20, 2015 by vonnie — 4 Comments

Over the next three days I’m going to show you how to setup Active Directory and join a PC to your new domain but I want you to know this isn’t something you can learn by reading. You need to do it.

You need to sit in front of a real Windows Server 2012 machine. You need to join a real Windows workstation to the domain. You need to interact with the software.

But how can you realistically do this? Well there are two options; no wait – three options:

You could completely abase yourself by buying your boss’s children Christmas presents so he would be more amenable to letting you setup a lab in the office.
You could cough up a butt load of money to buy real equipment
You could setup a free virtual environment on your computer in a completely isolated network. Then you could install Windows 8.1 and Windows Server 2012 virtual machines and configure a virtual switch to connect both computers.

Are you with me on option 3? I hope so! Let me show you how simple it is to pull this off.

“Simple” and “quick” aren’t synonyms. So although it’s easy to get going it will take a few hours to download all the files and configure your virtual environment.

Let’s get started.

If our virtual Active Directory Domain controller were a big juicy burger we would need a few ingredients to make it:

Windows 8.1 Pro
Windows Server 2012 R2

Snag VirtualBox

First, download and install Virtualbox on your host machine. Keep all the defaults. The install should zip by in seconds. This is the bun for our proverbial burger.
Filch Windows 8.1 Pro

Next, we need to obtain a real Windows 8.1 Pro ISO image. You can download the Windows 8.1 Pro media directly from Microsoft. In fact, if you can actually legally download every version of Windows for free. Consider this the lettuce and tomatoes.
Grab Windows Server 2012 R2

You can get the Windows Server 2012 R2 iso directly from the Microsoft Evaluation Center. Just signup and download. This is the 1/4 pound of grass fed organic beef. Without this our Active Directory burger is nothing.
Pilfer pFSense

pFSense will be the virtual router that gives us the liberty to connect our internal VirtualBox guest machines to the internet. pFsense is our special sauce.

Completing the above four steps could take several hours because of the sheer size of the Windows ISO files. These files are gargantuan (4GBs per file) so make sure you have ample space on your hard drive before you start the download frenzy.

Once you have all the ISOs on your computer we can setup the virtual machines.
Configuring the Virtual Machines

Setting up Windows 8.1 Pro in VirtualBox is almost identical to setting up Windows 10 in VirtualBox. The only difference is that under the Network tab in your VirtualBox Settings, Adapter 1 must be set to Internal Network. The name should also match for all hosts participating in the same internal network. I recommend the default intnet.

The internal network adapter names must match on your VirtualBox hosts

To setup your virtual machines, click the prickly blueNew button in the Oracle VM VirtualBox Manager and pick your OS version and memory size. Leave the Hard drive defaults alone and click Create.

Windows Server 2012 Virtual Machine

Click Create again on the next screen to keep all the defaults for the file size and physical hard drive type.

VirtualBox setting defaults

After creating the image, select it and choose Settings from the Oracle VM Virtualbox Manager screen.

Pick the Storage tab, and under the Storage Tree you should see a CD icon. We need to browse to the ISO we downloaded earlier so that the Virtual Machine will boot to it just like a real machine would boot to a physical CD.

Adding the ISO to VirtualBox

Now you can go through the installation just like a normal install. Install Windows 8.1 Pro in the same fashion.

After you have both operating systems installed you’re ready to setup pFSense.
Making sense of pFSense in VirtualBox

Getting pfSense to work in VirtualBox is basically the same except for a few differences:

Under Settings > System > Motherboard the Base Memory should be set to 256 MB. As you can see pFsense doesn’t need a lot of memory: 256 MB is sufficient.

pFSense in VirtualBox

Next, under the Network tab under Adapter 1, make sure it’s enabled and attached to your Bridged Adapter. This will be come your WAN (internet facing) interface in pfSense.

Setting the network settings for pFsense in VirtualBox

Then boot up the virtual machine and press Enter on the boot screen

boot up pfSense

Quickly press “i” to dive into the Installer setup.

Enter the pFsense Installer

In the blue Configure Console screen, choose .


Go with the

Quick and easy pfSense

Go ahead and erase the Virtual Disk. There’s obviously nothing on it.

Erase the virtual disk

Choose the Standard Kernel

Use the Standard Kernel

Then once the installation finishes, eject the virtual CD and reboot.

Eject the pFsense ISO

Boot to the main screen and skip the question about setting up VLANs.

Right now, we need to assign our interfaces so press 1.

pFsense mainscreen

You’ll be asked to enter the WAN and LAN interface names. Use em0 and em1 respectively. em0 should correspond to your bridged virtualbox interface.

em0 and em1 for pfSense

Great, when this finishes press the number 2 to configure the IP subnet for the LAN.

I used with mask (24 bit mask).

Configuring the adapters in pFsense

There’s no need to enable DHCP or revert to HTTP so just press enter to skip passed those options.

pFsense Configured

We’re done with our pFSense setup! Leave it running and minimize the virtual machine window.
Setting IP addresses on the Windows guests

Now we’re ready to configure the static IP addresses on our Windows guest machines.

Open up the Network Connection settings in your Windows Server 2012 machine and configure the following settings for your Internet Protocol Version 4 (TCP/IPv4) item:

Windows Server 2012 settings for VirtualBox

The DNS should be since we’re going to use the server itself as the DNS server.

On the Windows 8.1 Pro host, set the network settings as follows:

Windows 8.1 IP Settings

Also notice the DNS server is set to the IP of our Windows 2012 Server:

Now as long as both machines have network adapters set to Internal Network with the same name, you’ll be able to communicate.

Let’s just kick off a ping to verify…

Pinging the domain controller


Tomorrow starts your adventure setting up a Windows Server 2012 Active Directory environment.

You now have everything you need to follow along. You can do this. You will do this. I believe in you.

Posted in Uncategorized | Tagged , , | Leave a comment

Microsoft Update Catalog

You MUST ACCESS the Microsoft Update Catalog using Internet Explorer.
This is an example how to search the Monthly Quality Rollups for Windows 2012 R2.

Posted in windows | Tagged , , | Leave a comment

Configure Windows Update

Run as Administrator

sc config wuauserv start=disabled
net stop wuauserv
Posted in tools, windows | Tagged | Leave a comment

Virtio drivers for VirtualBox

Virtio drivers for VirtualBox question

User need to manually install VirtIO drivers on Windows guests using drivers from driver download page or prebuilt driver ISO from Fedora Project in order to use VirtIO networking on Windows guests. Embedding this drivers into Guest Additions installer for Windows could be quiet useful.

Direct downloads are available for the .iso, .vfd, and qemu-ga installers.

Stable virtio-win iso:


Install virtio drivers

VirtIO Installation:
Installing the VirtIO drivers takes a little bit of effort, but is worth the work.

Your VM should be Powered OFF prior to these next steps.

Updating your VM Configuration

In VS console, select Virtual Machines / <Your VM>

Click Settings and make the following changes

(For Test VM users) General: Changes OS Type to Windows / Windows 7. Click APPLY
Network: Change Model to VirtIO. Click APPLY
Storage: Click Add Device in Upper Right corner.
Interface: VirtIO
Cache Mode: WriteBack
Size: 1GB
CD / DVD: Click the CD icon to the right of Image Path and point to the location where you saved the VirtIO ISO file (from Pre-Requisites). Click APPLY
Video: Change Type to QXL. Click APPLY
Power On your VM


Install VirtIO drivers in Windows

After your VM is powered on, we will need to install the VirtIO drivers that are located on the ISO setup as a CD-ROM.

Click on Start
Right-Click on Computer > Manage
Click on Device Manager
Expand Other Devices(you should see several Yellow item)
Right-Click on Ethernet Controller
Update Driver Software
Browse my computer for driver software
Change location to you D:\ (your CD-ROM) and make sure Include subfolders is CHECKED
Click NEXT

You will get a popup box after a couple seconds for installing the Ethernet driver.
CHECK Always trust software from “Red Hat, Inc.”

Repeat the same process for the remaining items under Other devices[/]
PCI Device [i](VirtIO Balloon Driver)
SCSI Device (RedHat VirtIO SCSI Controller)
Close Device Manager
Shutdown Windows

Posted in Uncategorized | Tagged , , | Leave a comment

Optimised defaults for VirtualBox VMs

Verbatim copy from

It seems Vagrant still uses defaut VBoxManage settings but most of them are no longer proper. I spent several hours to play around ssh connections, network and chipset settings so let me share some useful details:

  • Networking adapter “Intel PRO/1000 MT” server is about twice faster than desktop
  • Networking adapter virtio-net provides much faster networking, it’s an extraction from KVM project
  • Chipset ICH9 is an important to set up (details:
  • CentOS setup from ISO has predefined iptables rules, should clean up (service iptables stop && /sbin/chkconfig iptables off)
  • Host system should have optimised TCP/IP stack and saved into /etc/sysctl.conf:
  net.core.wmem_max = 256960
  net.core.rmem_max = 256960
  net.core.wmem_default = 256960
  net.core.rmem_default = 256960
  net.ipv4.tcp_wmem = 4096  87380 16777216
  net.ipv4.tcp_rmem = 4096  87380 16777216

All tests were run on CentOS 5.6 with VirtualBox guest add on installed.

Let me share an exerpt from 6.1.Virtual networking hardware (

The "Paravirtualized network adapter (virtio-net)" is special. 
If you select this, then VirtualBox does not virtualize common 
networking hardware (that is supported by common guest operating 
systems out of the box). Instead, VirtualBox then expects a special 
software interface for virtualized environments to be provided 
by the guest, thus avoiding the complexity of emulating networking 
hardware and improving network performance. Starting with version 3.1, 
VirtualBox provides support for the industry-standard "virtio" 
networking drivers, which are part of the open-source KVM project.


Posted in tools | Tagged , , | Leave a comment