HYPER-V run VM in background question

  1. jimbo45's Avatar
    Posts : 9,067
    Windows / Linux : Arch Linux
       #1

    HYPER-V run VM in background question


    Hi there
    @Kari (sorry but you seem to be the acknowleged expert in this)

    If I have a HYPER-V VM running but I want to sign out (not logoff just sign out as a particular user) of Windows (the HOST) can the VM still run in background mode so other people can log on to it or does the VM automatically go into "suspend" or sleep mode.

    With VMware (at least in WKS) there's an option to run VM's in the background with no GUI (the VM program not the VM itself) and you can then remotely SSH into them.

    for example on a Windows Host :

    vmrun -T ws start C:\export\vmware\rh5\server.vmx nogui (or wherever your VM config file is located).

    Ideally this is why a server would do -- but Windows 2019 server is far too expensive an option for just a home computer lab. !!!

    Cheers
    jimbo
      My Computer

  2. Bree's Avatar
    Posts : 15,376
    10 Home x64 (2004) (10 Pro on 2nd pc)
       #2

    While you wait for Kari's reply try opening the Hyper-V Manager, select the VM and click the Start button in the lower half of the Actions pane on the right. Here's a Remote Desktop session to a Hyper-V VM on another machine. I have signed out of that other Host machine.

    HYPER-V run VM in background question-image.png
    Last edited by Bree; 05 Apr 2019 at 06:16.
      My Computers

  3. Bree's Avatar
    Posts : 15,376
    10 Home x64 (2004) (10 Pro on 2nd pc)
       #3

    You are free to sign out on the Host machine and a Hyper-V VM will continue to run. This is because Hyper-V runs as the system account, not as your user account.
      My Computers

  4. Kari's Avatar
    Posts : 17,113
    Windows 10 Pro
       #4

    Bree said:
    You are free to sign out on the Host machine and a Hyper-V VM will continue to run. This is because Hyper-V runs as the system account, not as your user account.
    Exactly.

    I was just now working with a new deployment image using Hyper-V VM as reference machine, capturing custom WIM. To get screenshot, I signed out from my main user account and signed in to another user account, launched Hyper-V Manager and connected to the VM in question.

    It's running just fine:

    HYPER-V run VM in background question-image.png

    Short: VM started using user account A, from which I signed out. Signed in to user account B, and took the above screenshot.

    Off topic:
    Screenshot shows MDT in action: Microsoft Deployment Toolkit - Easy and Fast Windows Deployment | Tutorials

    Kari
      My Computer

  5. jimbo45's Avatar
    Posts : 9,067
    Windows / Linux : Arch Linux
    Thread Starter
       #5

    Hi there

    Thanks folks

    @Kari

    @Bree

    It's often useful to have VM's available for use even when nobody is logged on to the HOST.

    marked as solved.

    (Serious Football --Round ball version and Beer this weekend now so probably start testing again on Sunday).

    Cheers
    jimbo
      My Computer

  6. Kari's Avatar
    Posts : 17,113
    Windows 10 Pro
       #6

    One addtional feature somewhat related to the topic:

    A feature I like in Hyper-V is the option to select automatic stop and start actions. By default, if you shut down host PC, state of a running VM is saved, and the VM is then automatically started (saved state restored) at next boot of the host.

    Screenshots show the defaults:

    HYPER-V run VM in background question-image.png

    HYPER-V run VM in background question-image.png

    Kari
      My Computer


  7. jimbo45's Avatar
    Posts : 9,067
    Windows / Linux : Arch Linux
    Thread Starter
       #7

    Kari said:
    One addtional feature somewhat related to the topic:

    A feature I like in Hyper-V is the option to select automatic stop and start actions. By default, if you shut down host PC, state of a running VM is saved, and the VM is then automatically started (saved state restored) at next boot of the host.

    Screenshots show the defaults:

    HYPER-V run VM in background question-image.png

    HYPER-V run VM in background question-image.png

    Kari

    Hi there
    Thanks again - useful to know

    That also happens BTW in VMWare workstation if you shut down the Host -- snapshot of VM is taken and it will resume (if required) on next boot before the Host shuts down. It's quite rare though that I'd boot the Host before shutting down VM's (unless of course things don't go to plan properly). !!!

    Cheers
    jimbo
      My Computer

  8. Kari's Avatar
    Posts : 17,113
    Windows 10 Pro
       #8

    jimbo45 said:
    It's quite rare though that I'd boot the Host before shutting down VM's (unless of course things don't go to plan properly). !!!
    I often run virtual machines in background, all VM windows and Hyper-V Manager closed. That makes me sometimes forget I have VMs running when shutting down / restarting for any reason. with this feature, it's not a problem.

    Kari
      My Computer


 

Related Threads
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 11:26.
Find Us




Windows 10 Forums