How to run VM Workstation 8 as service in host Windows 2008 R2

Discussion in 'Virtualization' started by wjshome, Sep 28, 2011.

  1. wjshome

    wjshome MDL Novice

    Dec 31, 2009
    4
    1
    0
    I don't want to use VM Server, I want to keep my workstation 8 running even I logged off.
    Thanks for help!:p
     
  2. sebus

    sebus MDL Guru

    Jul 23, 2008
    5,966
    1,821
    180
    Run vSphere on bare metal & run w2K8 R2 as a VM

    sebus
     
  3. wjshome

    wjshome MDL Novice

    Dec 31, 2009
    4
    1
    0
    Can you say more in detail?
    I use win2008 R2 as host machine, installed VM Workstation 8.
    It seems has nothing to do with vSphere.?

    Cheers,
     
  4. sebus

    sebus MDL Guru

    Jul 23, 2008
    5,966
    1,821
    180
    Correct, do not use W2K8 as host, but as a guest
    VMW will not work as service

    Right tools for the right job!

    sebu
     
  5. wjshome

    wjshome MDL Novice

    Dec 31, 2009
    4
    1
    0
    Using ESXi is another story then.
    I search around the Internet, there is no perfect answer to run VM Workstation as a service in Win2008 R2.
    So I wrote a simple windows service program by myself using .net C#. and it is working now.

    The windows service is simply run a command when start:
    - Process.Start(@"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe", @"-T ws start C:\VMs\os.vmx nogui");
    and when stop:
    - Process.Start(@"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe", @"-T ws stop C:\VMs\os.vmx soft");

    workstation 8 keeps running even user logs out.

    the only problem for now is there is no way to interact with the running VMs (as services), let me try a bit more.

    Cheers,
     
  6. wjshome

    wjshome MDL Novice

    Dec 31, 2009
    4
    1
    0
    Hi,

    I'm back. After digging out a bit, I found that the VM workstation 8 supports Shared VMs.
    So move the vm to shared vm. and it will manage by a windows services then. no shutdown when logged out.
    This is a very goooooooooooooooooood featured!

    Cheers,