HYPER-V run VM in background question Solved

  1. jimbo45's Avatar
    Posts : 7,342
    Windows / Linux : Centos, Ubuntu, OpenSuse
       #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 ComputerSystem Spec

  2. Bree's Avatar
    Posts : 11,475
    10 Home x64 (1903) (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.

    Click image for larger version. 

Name:	image.png 
Views:	42 
Size:	86.1 KB 
ID:	229685
    Last edited by Bree; 05 Apr 2019 at 06:16.
      My ComputersSystem Spec

  3. Bree's Avatar
    Posts : 11,475
    10 Home x64 (1903) (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 ComputersSystem Spec

  4. Kari's Avatar
    Posts : 16,046
    Windows 10 Pro
       #4

    Bree said: View Post
    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:

    Click image for larger version. 

Name:	image.png 
Views:	3 
Size:	37.4 KB 
ID:	229747

    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 ComputerSystem Spec

  5. jimbo45's Avatar
    Posts : 7,342
    Windows / Linux : Centos, Ubuntu, OpenSuse
    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 ComputerSystem Spec

  6. Kari's Avatar
    Posts : 16,046
    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:

    Click image for larger version. 

Name:	image.png 
Views:	19 
Size:	317.4 KB 
ID:	229779

    Click image for larger version. 

Name:	image.png 
Views:	18 
Size:	283.2 KB 
ID:	229782

    Kari
      My ComputerSystem Spec


  7. jimbo45's Avatar
    Posts : 7,342
    Windows / Linux : Centos, Ubuntu, OpenSuse
    Thread Starter
       #7

    Kari said: View Post
    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:

    Click image for larger version. 

Name:	image.png 
Views:	19 
Size:	317.4 KB 
ID:	229779

    Click image for larger version. 

Name:	image.png 
Views:	18 
Size:	283.2 KB 
ID:	229782

    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 ComputerSystem Spec

  8. Kari's Avatar
    Posts : 16,046
    Windows 10 Pro
       #8

    jimbo45 said: View Post
    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 ComputerSystem Spec


 

Related Threads
Hi there I'm gradually giving up on VMWare to go to HYPER-V. One issue I have is that if I create a Linux server VM I still want to use existing XFS formatted HDD's on the Guest in RAID arrays. There's around 10 TB of space - and about 3 TB of...
Hi there quick question on HYPER-V probably for Kari as he's the undisputed champion of HYPER-V around here !!! If I have a VM powered on under HYPER-V can I log off as the Windows user and still have people able to access the HYPER-V VM -...
Guys, I haven't been insiding for a while, just built a new Win 10 Pro 64Bit Box which I dont want to Inside Build. How can I get the ISO images so that I can create a virtual machine? Is this still possible? Cheers John
Hi there I see that although VMware and VBOX can't do it (they can use UEFI) it seems HYPER-V CAN create a level 2 (type 2) VM which can enable secure boot. I want to have a go with this on a W2012 Server HOST. Anything special needed for...
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 18:58.
Find Us