项目作者: mrlesmithjr

项目描述 :
高级语言: HTML
项目地址: git://github.com/mrlesmithjr/ansible-kvm.git
创建时间: 2015-10-12T14:29:08Z
项目社区:https://github.com/mrlesmithjr/ansible-kvm

开源协议:MIT License

下载


ansible-kvm

An Ansible role to install KVM

Requirements

Install required Ansible roles:

  1. sudo ansible-galaxy install -r requirements.yml

Role Variables

defaults/main.yml

Dependencies

None

Example Playbook

  1. - hosts: kvm_hosts
  2. vars: {}
  3. roles:
  4. - role: ansible-kvm
  5. tasks: []

Booting a VM from ISO

You can boot a defined VM up with an ISO by using the following example:

NOTE: Defined in your vars. Also, ensure that the default
kvm_manage_vms: false is changed to kvm_manage_vms: true.

  1. kvm_manage_vms: true
  2. kvm_vms:
  3. - name: test_vm
  4. autostart: true
  5. # Define boot devices in order of preference
  6. boot_devices:
  7. - cdrom
  8. - network
  9. - hd
  10. cdrom:
  11. source: /path/to/iso
  12. graphics: false
  13. # Define disks in MB
  14. disks:
  15. - disk_driver: virtio
  16. name: test_vm.1
  17. size: 36864
  18. memory: 512
  19. network_interfaces:
  20. - source: default
  21. network_driver: virtio
  22. portgroup: vlan-102
  23. type: network
  24. state: running
  25. vcpu: 1

License

MIT

Author Information

Larry Smith Jr.

Buy Me A Coffee