virtualbox.rst 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ===============================
  2. Getting Started With Virtualbox
  3. ===============================
  4. The Virtualbox cloud module allows you to manage a **local** Virtualbox hypervisor. Remote hypervisors may come later on.
  5. Dependencies
  6. ============
  7. The virtualbox module for Salt Cloud requires the `Virtualbox SDK`_
  8. which is contained in a virtualbox installation from
  9. https://www.virtualbox.org/wiki/Downloads
  10. Configuration
  11. =============
  12. The Virtualbox cloud module just needs to use the virtualbox driver for now. Virtualbox will be run as the running user.
  13. ``/etc/salt/cloud.providers`` or ``/etc/salt/cloud.providers.d/virtualbox.conf``:
  14. .. code-block:: yaml
  15. virtualbox-config:
  16. driver: virtualbox
  17. Profiles
  18. ========
  19. Set up an initial profile at ``/etc/salt/cloud.profiles`` or
  20. ``/etc/salt/cloud.profiles.d/virtualbox.conf``:
  21. .. code-block:: yaml
  22. virtualbox-test:
  23. provider: virtualbox-config
  24. clonefrom: VM_to_clone_from
  25. # Optional
  26. power_on: True
  27. deploy: True
  28. ssh_username: a_username
  29. password: a_password
  30. sudo: a_username
  31. sudo_password: a_password
  32. # Example minion config
  33. minion:
  34. master: localhost
  35. make_master: True
  36. ``clonefrom`` **Mandatory**
  37. Enter the name of the VM/template to clone from.
  38. So far only machines can only be cloned and automatically provisioned by Salt Cloud.
  39. Provisioning
  40. ------------
  41. In order to provision when creating a new machine ``power_on`` and ``deploy`` have to be ``True``.
  42. Furthermore to connect to the VM ``ssh_username`` and ``password`` will have to be set.
  43. ``sudo`` and ``sudo_password`` are the credentials for getting root access in order to deploy salt
  44. Actions
  45. =======
  46. ``start``
  47. Attempt to boot a VM by name. VMs should have unique names in order to boot the correct one.
  48. ``stop``
  49. Attempt to stop a VM. This is akin to a force shutdown or 5 second press.
  50. Functions
  51. =========
  52. ``show_image``
  53. Show all available information about a VM given by the `image` parameter
  54. .. code-block:: bash
  55. $ salt-cloud -f show_image virtualbox image=my_vm_name
  56. .. _Virtualbox SDK: http://download.virtualbox.org/virtualbox/SDKRef.pdf