Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a solution to create a virtual machine and start it by having an executable file, that will start the machine? If possible to start as quickly as possible. Strange situation? Not at all. Read on...

Real life scenario

Since we can't have domain controller on a non-server OS it would be nice to have domain controller in an as thin as possible machine (possibly Samba or similar because we'd like to make it startup as quickly as possible - in a matter of a few seconds) packed in a single executable. We could then configure our non-server OS to run the executable when it starts and before user logs in. This would make it possible to login into a domain.

Actual situation info

For some peculiar reasons I want to run non-server OS at all costs. It's a Windows 7 x64 Enterprise OS. It's a development machine not connected to any domain. It's a standalone machine. I need to set it up for Sharepoint Server 2010 development. So I'm installing Sharepoint. With some workarounds it's possible to make it work with local accounts but every account mangling has to be done manually which I don't like at all. So DC (or similar) becomes a must.
That is the main reason I'd like to have some sort of a domain controller with domain users defined, so I'd be able to run Sharepoint as close to production environment as possible. Virtualising DC seems like the best option and to make it as transparent as possible I wanted DC to initialise before I even logon to my Win7 dev machine. I'd logon using some domain user account then.
Virtualised DC needs to run all the time, because I will be developing/debugging my solution all the time, meaning I'll be authenticating users on Sharepoint level most of the time. So it's not just a one time startup and shutdown after my app runs.
I was also thinking of installing ESXi on baremetal and setting up two VMs. One Windows Server 2008 R2 Server Core with AD role (assigning it minimum RAM to run) and my actual development environment machine, but I haven't worked with ESXi before and I don't know whether my VM will run close to normal speed or not. My development VM must be fast just as if it was installed on baremetal HW (or close to it).
Another thing is that Sharepoint services start on OS boot. And they use domain users to run. That's why I'd like my DC VM to startup as soon as possible. ESXi could be my answer if my dev machine will run as expected.

BTW: I use VMWare Workstation 7 and not Server, because I do run some VM occasionally that need USB as well. Workstation works flawlesly in this regard. But I haven't checked if it's possible to start a VM with Workstation on OS boot...

share|improve this question
So what is the problem with having a domain controller on a server OS? – Oskar Duveborn May 20 '10 at 14:59
@Oskar-I think he means he has a client OS installed, and can't turn (for example, WinXP) into a domain controller. I think he has an application that needs to authenticate to a DC but he doesn't have a DC available, so he's looking to create a "Virtual" DC or DC functionality to authenticate to just for the start of this application. – Bart Silverstrim May 20 '10 at 17:40
@Bart & @Oscar: Exactly. Non-Server OS and application that must be connected to DC. Just as Bart anticipated. – Robert Koritnik May 20 '10 at 18:19
Well the edited question states that this virtual DC needs to be available basically all the time the workstation is up and running - so it still sounds like a case of just installing Vmware Server or Virtual Server that does this (or hack Vmware Workstation to run as a service which is also possible). – Oskar Duveborn May 20 '10 at 20:12
ESXi is usually speedy enough that you'd not really notice the difference in speed unless you're running very tight on resources on the server side. We use ESXi to run several servers and have been happy with its performance. If you need the DC always available, I'd virtualize it on an ESXi system. Added bonus; setting it up won't screw up your dev machine, and having it on a separate system will keep it from chunking up your own system resources needlessly. – Bart Silverstrim May 20 '10 at 22:28
up vote 4 down vote accepted

You're trying to have a pseudo-VM triggered by running a particular application? The licensing, technological, and security issues involved would make this a staggering feat compared to actually buying a cheap computer and networking it to your system and actually running a domain controller.

Your best bet is to actually get an inexpensive system and run it as a DC with a legal version of Windows Server, unless you can get Samba to use the necessary services. There's no way you could spin up a domain controller, virtualized, within seconds, even with Citrix or VMWare's packaging virtual-apps (I forget what they call that product).

share|improve this answer
This is a one time development project. Having development licenses for all MS software is not a problem. But buying a machine just for the sake of developing this product seems unreasonable. But otherwise I'd agree. Having a separate machine would be an optimal solution. – Robert Koritnik May 20 '10 at 18:20
Check my additional info to make things clearer. And thanks for all your valuable input so far. – Robert Koritnik May 20 '10 at 18:37

Thinapp can do it but if you don't need a real domain controller why not simply implement ADAM (now called AD-LDS) Then if you really don't want it running just stop the service. ADAM does not require a server OS. (for some bizzare reason AD-LDS does) although according to this blog post it's coming for client OSes as well

share|improve this answer
Interesting...hadn't run across AD-LDS before. Is this usage scenario really that common that they'd have a pseudo-domain-service available like this? Does it interfere at all if the computer goes into an environment running a regular domain server? – Bart Silverstrim May 20 '10 at 15:01
Nope AD-LDS is a self contained directory service when you don't need a full blown domain controller. Yes, it's poretty common to require a seperate securable direcory service (CRM apps, DMZ mailservers). – Jim B May 20 '10 at 15:26
... or development environments, when you want hit the ground running fast and reliably... – Robert Koritnik May 20 '10 at 18:25
I did come across AD LDS. I'll give it a try. If anyone's interested here's a download link for Win7… – Robert Koritnik May 20 '10 at 18:44
ahh good to know its out there for clients now – Jim B May 20 '10 at 19:44

You can run a VM as a service:

It's not fast in anyway but does start the VM before the OS is to the login screen. This can be done with VMWare Player too.

Although at that point VMWare Server can start a VM during boot.

share|improve this answer
+1 vmware server or virtual server will do this by default for free – Oskar Duveborn May 20 '10 at 15:01
This is great stuff info. +1 – Robert Koritnik May 20 '10 at 20:29

VMWare ThinApp will do this for you.

share|improve this answer
ThinApp will launch an AD server? – Bart Silverstrim May 20 '10 at 13:55
It sounds like what he was trying to do (maybe I am misreading) is have an AD server launch, then his application launch and authenticate to the AD service, then close out the virtualized AD server/service, within seconds with as small a footprint as possible. – Bart Silverstrim May 20 '10 at 13:57
It's such an oddly worded question that it's hard to know exactly what he wants, but thinapp will let you do some crazy things if you put the effort into it. Certainly it would be possible to start a thinapp VM as a startup service, it could be a windows AD box too - whether it would be up in time for the windows 'client' to see it and use it is a different matter but there's a chance it might work. And if course it could shut itself down based on a trigger of some form. Who knows until we have more details. – Chopper3 May 20 '10 at 14:14
There are more details up in my question. Thanks for your effort so far. – Robert Koritnik May 20 '10 at 18:51


share|improve this answer
Not exactly... But you're close... ADAM is old technology AD LDS is the new one.… – Robert Koritnik May 20 '10 at 18:49
I knew that just was to lazy to find the correct link! – tony roth May 21 '10 at 1:13

What is the use of having it "like an application" if you're then going to set it up to start as a boot-time service anyway? Just install a virtualisation platform like VMWare Server, Virtual Server or whatnot that does this by default and set up a virtual domain controller with it.

A 90 day trial Server 2008 Core server could live nicely on less than 256MB of RAM and be suspended during reboots (booting a DC generally takes a bit of time).

share|improve this answer
I have development licenses which are exactly what I need for the time of developing the application which will be longer than 90 days. So licensing is not a problem here. It's not production environment anyway. You can check my additional info I added to the question. – Robert Koritnik May 20 '10 at 18:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.