Not enough physical memory is available to power on this virtual machine with its configured settings.

Virtual Machines are more or less commodity for modern development environments. I have been very happy with VMWare Workstation for a long time. I have several SharePoint (and other) setups running and never had a problem.

Recently, I got the message

Not enough physical memory is available to power on this virtual machine with its configured settings.

whenever I tried to start a virtual machine. But my workstation had more than enough free memory available. Even restarting did not solve the problem. Google told me that a windows update could be the problem but I found only very old KB’s as potential causes.

By accident I stumbled upon a post that pointed to VMWare config.ini. Just add this line:

vmmon.disableHostParameters = "TRUE"

to the end of the file and VMWare starts working again. I am not exactly sure what the cause of the problem was, but at least I know how a workaround.

gulp-nodemon: Object # has no method ‘spawnSync’

gulp-nodemon is a nice tool if you want to restart your node process when your source code changes. It is very easy to use. Just take this snippet from their sample code and modify the script to your needs.

gulp.task('develop', function () {
  nodemon({ script: 'server.js'
          , ext: 'html js'
          , ignore: ['ignored.js']
          , tasks: ['lint'] })
    .on('restart', function () {

Just fire up “gulp develop” and the server will start.

You might receive the following error: Object #<Object> has no method ‘spawnSync’

In this case check your node version (e.g. mine was 0.10.26). As stated in the release notes (here) you need to use Node.js version 0.12 in order to use it. You either use an older version of gulp-nodemon or upgrade your Node.js installation to the correct version.

Error: ENOENT, stat ‘C:\Users\Username\AppData\Roamin\npm’

Today I installed Node.js on a new Windows 8.1 machine. I downloaded the latest version from and tried to use npm. I got the following exception:

Error: ENOENT, stat 'C:\Users\Username\AppData\Roamin\npm'

The solution is very simple: Just create the folder: C:\Users\Username\AppData\Roamin\npm Afterwards node (and npm) works as expected.

This behavior is a bug in the recent version of the node installer (see here for more details).

pip install lxml – Permission denied

When using Python you mostly rely on pip to install necessary libraries. Recently I ran the following command on my Mac:

pip install lxml

The result was the following output:

error: could not create '/Library/Python/2.7/site-packages/lxml': Permission denied

Obviously, writing to the folder /Library/ is not possible for a normal user account. There are several possible options to overcome this problem.

  1. You can use the command sudo pip install lxml to install the package
  2. You can use the command STATIC_DEPS=true sudo pip install lxml to install the package. This will download libxml2 and libxslt and build the source distribution afterwards.
  3. You use virtualenv to install the package only locally in your current project directory. See here for a good tutorial of virtualenv.

From my perspective option 3 is the cleanest way to install and manage lxml.

XmlSerializer – Check if property was present in XML

Recently I was parsing a large amount of XML files using the XmlSerializer class. While implementing the parser I came across a requirement where I had to check if a given property was null because it was specified as null or because the value was not present in the XML.

At first this caused me some headache because accessing the underlying XML file violates the abstraction provided by the serializer. Luckily, I recognised that the generated entity class (generated from XSD.exe) contains a lot of properties with the name <PropertyName>Specified. This is a very neat feature of the XmlSerializer. If you add a property with that name scheme it automatically sets the property to true when the corresponding element is present in the XML.

The property could look like this:

public bool MyPropertySpecified { get; set; }

Note: XmlIgnore is necessary to avoid having the artificial property serialised into XML when using the XmlSerializer to write XML. More details on the behaviour can be found in the class documentation here.

Logstash – File input not working on Windows

Logstash is a great tool to transform the information stored in unstructured log files into a structured format. When using it on a Windows machine there are several things you should pay attention to (and which are not 100% documented).

Let’s say you want to use a file input and specify it in this way:

input {
    path => ["C:\Logs\*.logs"]

When you run Logstash nothing happens and your files are not processed.

The reason for that is pretty simple: Logstash doesn’t like the \ and because of that it does not recognise the path properly. So simply change the config to look like this:

input {
    path => ["C:/Logs/*.logs"]

Always use in Logstash configs and you will easily get around this problem. The problem is also known to the Logstash community (see this bug) but there is no fix in place yet.


The mechanism for detecting which files have been written and which log entries are new is also not working correctly on Windows (see this bug here). The link also contains information on how to get around this problem.

SQL Server Compact Edition – Still an option for lightweight persistence?

Recently, I was looking for a lightweight database for a small, independent application. One requirement was an easy deployment without installation of additional software on the server. The first thing that came to my mind was SQL Server Compact Edition. Technically it fulfilled all requirements perfectly but than I stumbled across this Connect Article.

“SQL Server compact edition is in deprecation mode with no new releases planned near future”

Sadly this disqualifies SQL Server Compact Edition for the use in a productive application and the recommended SQL Server Express or LocalDB do not really replace it.

Now the big question is, what to use instead of SQL Server Compact Edition for the use case of a lightweight, easy to deploy database on a Windows Server?

SSIS – Unexpected Termination

I did observe a confusing behaviour after patching a SQL Server 2012 to Service Pack 2. Some of the SSIS jobs running on that server started to fail with the message Unexpected Termination while most of the other jobs just worked as before.

Unexpected Termination can have multiple causes and if you search for that error in the internet you can find a bunch of different reasons and solutions. But non of them worked and to make the situation worse the jobs running on other servers without the Service Pack still worked. So I started looking into the known issues of the Service Pack and luckily I found this link: 

The error did not exactly match the entry I could find in the Event Viewer but all failing jobs used DT_TEXT or DT_NTEXT. I decided to risk installing the Cumulative Update ( containing the fix. After this, the jobs started to work just fine. So in the end the solution was extremely simple.

This is just one possible solution for the Unexpected Termination error but if you experience this error after installing Service Pack 2 you should definitely check if this is also your problem.

JavaScript – Documenting optional parameter

JavaScript is an awesome language but due to its nature parameter documentation is pretty important especially when it come to optional parameters. If you want to create a method like this:

module.exports.create = function (callback) {
    // Do something
    if (callback) {

Obviously, callback is an optional parameter but if we use this method in an IDE like JetBrains WebStorm it will always show us a wrong signature warning and other developers might think this parameter is mandatory.  We can overcome that situation by adding the correct comment on this method.

 * The method does something. 
 * @param {requestCallback=} callback
module.exports.create = function (callback) {
    // Do something
    if (callback) {

Now the IDE and other developers looking at our method know that the parameter is optional and can use it like that. This syntax can be used to provide a lot of information on the different request parameter. This link contains a very detailed description.

Object # has no method ‘flash’ undefined TypeError: Object # has no method ‘flash’ at allFailed

Recently I was playing around with Passport.js in an Express application. I created a login route that logged like that:

passport.authenticate('local', {
    successRedirect: '/app',
    failureRedirect: '/login',
    failureFlash: false

Everything worked fine and I could login to my application but I also wanted to show a message when the login fails. So I changed my route to:

passport.authenticate('local', {
    successRedirect: '/app',
    failureRedirect: '/login',
    failureFlash: true

Instead of redirect back to the login page I got this exception:

Object #<IncomingMessage> has no method 'flash' undefined TypeError: Object #<IncomingMessage> has no method 'flash' at allFailed

The solution for this is simple. I forgot to include the connect-flash module that provides the flash method. So I changed my startup code:

var flash = require('connect-flash');

Even so the solution is quite simple and somehow obvious. It doesn’t seem right that changing a property to true introduces the need for a new middleware.