Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown?

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 07-02-2012
Member
 
Join Date: Nov 2011
Posts: 60
How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown?
  

as the title saying. I am looking to run Virtual Machine headless that means without GUI in order to control shutdown and suspend with the reboot and shutdown of Mac OS X. Can you give me brief idea of above mentioned things?

Reply With Quote
  #2  
Old 07-02-2012
Member
 
Join Date: Nov 2010
Posts: 502
Re: How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown?

Well if you wanted to run Virtual Machine Headless which is only possible with VMware Fusion. Before you go for running Virtual Machine as headless you should run it normally in order to find out whether it is configured. You have to turn off all the unnecessary feature. Virtual Machines are supposed to connect automatically to unwanted devices. You have to add following parameters to vmx configuration file.

Code:
msg.autoAnswer = "TRUE"
  • now shutdown Virtual Machine and remove entry from Virtual Machine Library and close VMware Fusion.
  • After that you have to use vmrun in order to start with Virtual Machine by using nogui parameter.
  • If you have done the same VMware Fusion would remain headless as it was removed from Virtual Machine Library.
Reply With Quote
  #3  
Old 07-02-2012
Member
 
Join Date: Dec 2010
Posts: 351
Re: How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown?

If you wanted to start Virtual Machine with the user login then you have to perform.
You have to launch Terminal and execute below mentioned command
Code:
cd /Library/LaunchDaemons/
sudo nano com.wkz.headlessvm.plist
you have to copy and paste below mentioned code into nano.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <false/>
    <key>KeepAlive</key>
    <false/>
    <key>Label</key>
    <string>com.wkz.headlessvm</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Library/Application Support/VMware Fusion/vmrun</string>
        <string>-T</string>
        <string>fusion</string>
        <string>start</string>
        <string>/Virtual Machines/Windows XP Professional SP3.vmwarevm/Windows XP Professional SP3.vmx</string>
        <string>nogui</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>UserName</key>
    <string>WKZ</string>
</dict>
</plist>
Now save the file and close it.
You have to verify permission by using ls -l command.

Code:
-rw-r--r--  root  wheel  com.wkz.headlessvm.plist
In case it is not displaying permission then execute ls -l below mentioned output should be generated.
Quote:
sudo chown root:wheel com.wkz.headlessvm.plist
sudo chmod 644 com.wkz.headlessvm.plist
Reply With Quote
  #4  
Old 07-02-2012
Member
 
Join Date: May 2011
Posts: 410
Re: How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown?

You have to perform below mentioned steps to perform shutdown and suspend of Virtual Machine when Mac OS X is rebooting or shutdown.

From the Home folder in the Terminal you have to create .profile and add following

Code:
export PATH=$PATH:/Scripts
 runheadless and suspendheadless are the two folders in the script folder to use Headless Virtual Machines.

runheadless:


Code:
#!/bin/bash
"/Library/Application Support/VMware Fusion/vmrun" -T fusion start "/Virtual Machines/Windows XP Professional SP3.vmwarevm/Windows XP Professional SP3.vmx" nogui
suspendheadless:

Code:
 
#!/bin/bash
"/Library/Application Support/VMware Fusion/vmrun" -T fusion suspend "/Virtual Machines/VMware Fusion/Windows XP Professional SP3.vmwarevm/Windows XP Professional SP3.vmx"

Now you will need to run below mentioned command on Terminal

Code:
mkdir /Library/StartupItems/HeadlessVM
cd /Library/StartupItems/HeadlessVM
nano HeadlessVM



Now you have to copy and paste the following command into nano file
Code:
#!/bin/sh

. /etc/rc.common

StartService () 
{
    /Scripts/runheadless
}

StopService () 
{
    /Scripts/suspendheadless
}

RunService "$1"
 Now save and close HeadlessVM file.
 Now executer HeadlessVM file
chmod a+x HeadlessVM
after that you have to created StartupParameters.plist from HeadlessVM script.
Code:
nano StartupParameters.plist
you should copy and paste following code in the nano file.


Code:
  Description     = "HeadlessVM";
  Provides        = ("Runs/Suspends Virtual Machine Headless on OS X Startup/Shutdown");
  Uses            = ("Disks");
}
There is need of checking the file permission by using following command ls l.
It should display following output
Code:
-rwxr--r--  root  wheel  HeadlessVM
-rw-r--r--  root  wheel  StartupParameters.plist
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to run Virtual Machine headless and controlling shutdown or suspend upon Mac OS X Lion Reboot or Shutdown?"
Thread Thread Starter Forum Replies Last Post
windows 2003 server shutdown and reboot automatically. Prashant Windows Server Help 3 09-01-2014 01:39 PM
PC with Gigabyte GA-Z68AP-D3 shows NO SIGNAL, shutdown and reboot |Gyani| Motherboard Processor & RAM 4 12-03-2012 09:51 PM
Ubuntu 11.04 hangs during hibernate/reboot/shutdown on MSI A6300 Cococo Operating Systems 6 24-06-2011 10:59 PM
Creating Icons for Shutdown and Reboot Orlando Tips & Tweaks 2 21-03-2009 06:29 PM
Mortens ShutDown to Shutdown Computer at Desired Date And Time Soumen Tips & Tweaks 1 19-03-2009 11:32 AM


All times are GMT +5.5. The time now is 08:18 AM.