Giter Club home page Giter Club logo

vmware-fs-ctl's Introduction

vmware-fs-ctl

Summary

vmware-fs-ctl.sh is a start|stop|restart|status shell script for running a headless OS in VmWare Fusion on OSx and handle mounting/unmounting of the OS´s filesystem exported via NFS. BSD licensed.

It might work well on other *nix systems and/or VmWare-versions whith small modifications. In that case, be sure to at least set the VMRUN config variable pointing out the location of the vmrun executable.

Goals

  • Run virtual machine (VM) headless in a local install of VmWare Fusion (VF) on OSx which get VF out of the way and makes it more smooth to operate on via command line.
  • Mount the virtual machine´s filesytem to a local mountpoint.
  • Speed up start, stop, restart, mount and unmount and checking status.

vmware-fs-ctl.sh handles all this.

Prerequisites

  • Have VmWare Fusion version 3 or later installed on OSx and a virtual machine to run.
  • Turn off superflous features in VM settings for the VM you want to run headless that aren't needed like Accelerate 3D Graphics. Do not have headless Virtual Machines automatically connect to or be connected to unneeded devices.
  • Have the VM you want to run headless set up and run normaly via VmWare library GUI and try to permanently take care of any dialog boxes tha pops up. Also put msg.autoAnswer = "TRUE" in the VM´s .vmx-file. That will try to autoanswer any dialogs.
  • When running headless you need SSH or similar to be able to communicate with and controll the VM since the VF GUI will not be invilved. If in trouble, the vmrun utillity has a lot up it´s sleave to handle the VM.
  • Shutdown VM.
  • Delete the VM from VmWare´s library GUI, but be sure to keep the file. It´s ok to move it in and out of there later on, at least when not running.
  • Quit VmWare
  • Add '''/Library/Application\ Support/VMware\ Fusion to your $PATH for access to vmrun executable in your shell.
  • Test the headless mode in Terminal using: "/Library/Application Support/VMware Fusion/vmrun" -T fusion start "/absolute/path/to/your/image.vmx" nogui
  • For convenience, put the script in a location in your $PATH. Or add it´s location to $PATH.

After customizing the VMWARE_IMAGE, FS_MOUNTPOINT and possibly the VMRUN variables in the script, and making it executable:

$ [sudo] chmod +x vmware-fs-ctl.sh

the script should be usable:

$ sudo vmware-fs-ctl.sh {start|stop|restart|status}

To begin with, try out status with the VM turned off to se it is running without errors. On first run it will create a directory and a history and error log-file.

Resources

vmrun manual http://www.vmware.com/pdf/vix180_vmrun_command.pdf Related tips http://communities.vmware.com/message/1648085

Acknowledgements

Creds go out to David Tiselius for the nicely working mount command details, and WoodyZ of VmWare community fame http://communities.vmware.com/people/WoodyZ for the details on tailoring your VM for headless use.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.