Code Monkey home page Code Monkey logo

hyperv-cookbook's Introduction

hyperv-cookbook

This cookbook allows you to handle basic hyper-v operations using chef

###Recipes and Attributes

###Create Recipe

The Create recipe accepts a hash of VM's to create using the following attributes:

Your attributes should look something like this:

Example run_list:

switch "my virtual switch",
vm_list = [
  {
    "name" => "TestVM1",
    "memory" => "8GB",
    "vhd" => "C:\\\\disk.vhd"
  },
  {
    "name" => "TestVM2",
    "memory" => "8 GB",
    "vhd" => "C:\\disk2.vhd"
  }
]

The recipe will loop through each VM in the VM_List and create that VM. It will not start the VM's, use the start recipe for that.

###Start Recipe

Starts the VM that is in the "name" attribute.

node["hyperv"]["name"]

###Stop Recipe

Stops the VM with the "name" attribute. No attributes required other than "name".

You can set the "name" attribute to "" to stop all VM's, or "Name" to stop some VM's.

node["hyperv"]["name"]

###Remove Recipe

No attributes required other than "name". This does not delete the VHD, it only removes the VM from the host. The VHD is still in the same location, you'll have to delete it another way.

node["hyperv"]["name"]

###Shutdown Recipe

Shut's down any VM with the "name" attribute. You can set ["hyperv"]["shutdown"]["force"] to "true" to have it force a shutdown, otherwise it will shudown slowly in the guest.

node["hyperv"]["name"]

hyperv-cookbook's People

Contributors

watsonlu avatar

Watchers

James Cloos avatar  avatar

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.