VMware Communities
dpuckett
Contributor
Contributor

Auto start virtual machines upon reboot

I am a fairly new Mac user (since Nov) and have a question. I have a 8G Mac Pro that I generally keep 8+ Virtual Machines running at any given time. When I am at work I would really like to be able to reboot the host system and have all of my VM's start back up. From what I can tell this cannot be done with out an account being logged in. Can I have the system autlogin a "VMWARE" account, start all of my virtual machines and then switch back to the login screen while remaining logged in? Any assistance would be greatly appreciated.

Reply
0 Kudos
8 Replies
admin
Immortal
Immortal

Can I have the system autlogin a "VMWARE" account, start all of my virtual machines and then switch back to the login screen while remaining logged in?

To autologin as a user:

"Preferences > Accounts > Login Options > Automatically log in as" and choose whichever account you want

To start all your virtual machines on login:

"Preferences > Accounts > (autologin account here) > Login Items" and add the vmx files. You'll want to make sure they can start up without prompting for input.

Switching back to the login screen while remaining logged in:

There's probably some way to do this but I don't know it off the top of my head. I say this because you can certainly Fast User Switch back to the login screen, so there's probably some way to do this in Applescript or something. I'm not sure what'll happen to the running VMs (if they get suspended, run at lower priority, run like normal...).

Reply
0 Kudos
dpuckett
Contributor
Contributor

Ok, the autologin and autostart looks easy enough, just need a way to Fast User back to the login screen. The VM's will run fine with another user logged in. My wife stays logged into the MAC all day but I can still remote all of the VM's running under my account with no problem. Thanks for the info.

Reply
0 Kudos
rcardona2k
Immortal
Immortal

With Fast User Switching enabled, if you execute this script, it will take you to the fast-user login window:

/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend[/code]

Easiest way is to save it as a .tool file in your Login Startup items. I've tested this and it works.

Side-note: Your wife doesn't mind you running eight VMs in the background? Even if they were idling I would notice that!

Reply
0 Kudos
dpuckett
Contributor
Contributor

Thanks rcardona2k, that worked perfectly. As far as noticing all of the VM's running I would bet you would not. I have been very impressed with Fusion. I am sure the 8G of RAM is making the difference but I have never had a second of hesitation doing anything. I am sold. I would like to see some more management type tools for multiple vm's like those that are available on Linux/Windows but I cannot complain. Thanks for the help gents (or ladies if that is the case)

Reply
0 Kudos
admin
Immortal
Immortal

Easiest way is to save it as a .tool file in your Login Startup items.

Out of curiosity, do you need to worry about order of operations (e.g. make sure all VMs launch before switching out), or does everything get run regardless?

Reply
0 Kudos
admin
Immortal
Immortal

I generally keep 8+ Virtual Machines running at any given time

I forgot to ask this earlier, but out of curiosity, what are you doing with that many virtual machines at all times?

Reply
0 Kudos
dpuckett
Contributor
Contributor

It is generally just for testing. Fusion has allowed me to build out a complete working Windows Domain plus some other stuff. For instance I am currently running the following.

Windows 2003 Domain Controller (512M)

Windows 2003 Application Server (512M)

Windows 2003 x64 Exchange 2007 Server (1G)

Windows XP Client (512M)

Windows Vista Client (512M)

xUbuntu (512M)

Clark Connect 4.0 Server (256M)

FreeBSD Network Monitoring - VMTN (256M)

FreeBSD general server (256M)

WiKID authentication server - VMTN (256M)

I have become a VMTN addict. It makes it so easy to test some new stuff.

Reply
0 Kudos
cj0
Contributor
Contributor

When you would like to run a VMware fusion virtual machine on remote machine, managed with Apple

Remote Desktop (ARD).

Then you might nog want to use fast user

switching.

Several users reported being unable to control the machine

with ARD after a fast user switch occurs (VMware fusion doesn't even

need to be running).

Source:

Since 10.5 an option could be to use spaces, and run VMware fusion in a separate space

or to run fusion headless, as explained in http://communities.vmware.com/message/593957

Reply
0 Kudos