Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 175326

Running vm as a service, always on in background

$
0
0

Hello all, I've got a few extra cores on my i7 here, so I'm hosting a Linux vm that I want to basically always be running and online.  Host is Windows 10 x64 running the latest VMware 12.5.  Guest is various flavors of Linux.  Basically here is what I'm trying to do:

1) VM needs to start with windows start, not user login

2) Verify that the vm is running (Remote management?)

3) Orderly suspend or shutdown when windows shuts down or restarts

 

After some scouring on the internet, I was able to get past everybody talking about login scripts, and that's when I discovered the 'vmrun' command and the event for Task Scheduler to run that as soon as windows boots, not waiting for a user to login.  This has the interesting affect of me losing all control over the VM with VMware; Basically that vm is running as a system process, and when I logged in and opened VMware its running on a user process.  Anyway that's my best guess as to why VMware can't see that it's running or interact with it, but it's definitely running because SSH and web server are working.  But that's the only way I'm going to use this machine anyway so I'd consider 1) solved.

 

If I'm having trouble with the SSH or web server, and want to check if the vm is actually running... ?  I have no clue here, except maybe looking for lock files and logs... btw anyone know which logs are useful in this case?  I'm just trying to basically see the status of the VM, maybe send a command to Start/Restart it.

 

And finally, I'm pretty sure VMware isn't waiting for my guest to shutdown when i shutdown windows.  Maybe I could use the 'Before Shutdown" event or something like it in Task Scheduler, and run a script that initiates guest shutdown and waits for that to complete?  Maybe with a time limit?

 

I'm way out of my league with these scripts and task scheduler, can anyone offer any advice on how to accomplish 2) and 3)?


Viewing all articles
Browse latest Browse all 175326

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>