Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

vCD vApp VM Snapshot

mac edited this page Aug 25, 2020 · 1 revision

vApp VM Snapshot Example Usage

  1. vApp VM Snapshot States

    • Create vApp VM Snapshot
     
     - name: create vApp VM Snapshot
       vcd_vapp_vm_snapshot:
        vdc_name: test_vdc
        vapp_name: test_vapp
        vms:
          - name: sample
            mem_snapshot: true
            snapshot_name: snap_sample
            vm_quiesce: true
          - name: sample2
            mem_snapshot: true
            snapshot_name: snap_sample2
            vm_quiesce: true
        state: "present"
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc_name - (Required) - vCloud Director ORG VDC Name
    • vapp_name - (Required) - vApp Name which VM is part of
    • vms - (Required) - List of Virtual Machine names to create snapshot for. Below are the snapshot attributes passed with vms,
      • snapshot_name - (Optional) - Name of Virtual Machine's snapshot
      • mem_snapshot - (Optional) - boolean flag true if snapshot should include Virtual Machine's memory else false
      • vm_quiesce - (Optional) - boolean flag true if the file system of the Virtual Machine should be quiesced before the snapshot is created. Requires VMware tools to be installed on the vm else false
    • state - (Required) "present" to vCD vApp VM snapshot

    • Delete vApp VM Snapshot
     
     - name: delete vApp VM Snapshot
       vcd_vapp_vm_snapshot:
        vms:
          - name: sample
        state: absent
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vms - (Required) - List of Virtual Machine's name
    • state - (Required) "absent" to delete vApp VM snapshot

  2. vApp VM Snapshot Operations

    • Revert vApp VM snapshot
     
     - name: revert vApp VM snapshot
       vcd_vapp_vm_snapshot:
        vms:
          - name: sample
        operation: revert
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vms - (Required) - List of Virtual Machine's name to revert to the current snapshot
    • operation - (Required) "revert" to revert vApp VM snapshot
    • List vApp VM snapshot
     
     - name: list vApp VM snapshot
       vcd_vapp_vm_snapshot:
        vms:
          - name: sample
        operation: list
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vms - (Required) - List of Virtual Machine's name to list snapshots
    • operation - (Required) "list" to list vApp VM snapshots