Git Product home page Git Product logo

ansible-role-xen-vm-create's Introduction

Ansible role to create VMs on a Xen Dom0

Ansible Galaxy

This role creates a Xen VM on a Dom0. It requires several variables to be set (see below).

How it works

The role is meant to be executed from an Ansible script. The following script is an example:

# Usage:
#   ansible-playbook scripts/xen_vm_create.yml -e "<VARIABLES>"
#
# Supported variables:
#   * vm_name:     name of the VM
#   * lvm_vg:      LVM volume group holding Xen VM volumes (optional, default 'vgxen')
#   * diskingb:    harddisk size in GB
#   * meminmb:     memory size in MB
#   * cpus:        pattern for CPU cores to be used (optional)
#   * vcpus:       number of VCPUs to be assigned (optional, default 2)
#   * release:     name of the Debian release (currently supported: jessie, stretch, buster)
#   * ip:          IP address of the VM
#   * mac:         MAC address (optional, auto-generated by default)
#   * netmask:     network netmask
#   * gateway:     network gateway
#   * nameservers: nameservers
#   * xenbr:       name of the xen bridge
#   * preseed:     name of the preseed to be used (optional, default 'vm-preseed')
#   * auto:        start automatically at hypervisor boot (optional, default 'yes')
#
# Example:
#   ansible-playbook scripts/xen_vm_create.yml -e "vm_name=<vm-name> diskingb=5 meminmb=2048 ip=192.168.1.2"
#
# 1. Add new VM to the Ansible inventory file
# 2. Run the script like in example above 

- hosts: <xen-dom0>
  roles:
    - xen-vm-create
  tags:
    - xen-vm-create
  vars:
    release: buster
    lvm_vg: vgxen
    netmask: 255.255.255.0
    gateway: 192.168.1.1
    nameservers:
      - 194.150.168.168 
    xenbr: xenbr0
    preseed: vm-preseed

This script can be executed according to the docs in it.

Defaults

xen_preseed_urlbase:

License

This Ansible role is licensed under the GNU GPLv3 or later.

Author

Copyright 2017 Jonas Meurer [email protected]

ansible-role-xen-vm-create's People

Contributors

mejo- avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

witxka

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.