Open anthonyglidic opened 2 years ago
on this blog post we can see that we have to set both the storage policy but also the replication group
https://www.codyhosterman.com/2018/04/powercli-and-vvols-part-i-assigning-a-spbm-policy/
i think that the module vmware_guest_storage_policy is missing this replication group part
regards
SUMMARY
Possibilty to deploy or storage vmotion to a vvol datastore
ISSUE TYPE
COMPONENT NAME
vmware_guest / vmware_guest_storage_policy / vmware.vmware_vmotion
ADDITIONAL INFORMATION
Today when i try to deploy a new vm on vvol volume it end up with this error: PBMFault: missing or empty replication spec information policy
So i have try to make it like this: deploy on standard datastore apply spbm storage vmotion but it end with the same error
name: Create a virtual machine vmware_guest: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" datacenter: "{{ vcenter_datacenter }}" cluster: "{{ vcenter_cluster }}" datastore: "{{ vcenter_datastore }}" validate_certs: no folder: "{{ '/' + app + '/' + env }}" name: "{{ vmname }}" state: poweredon template: "{{ os }}" annotation: "{{ description | default(omit) }}" hardware: memory_mb: "{{ ram|int * 1024 }}" num_cpus: "{{ cpu }}" num_cpu_cores_per_socket: "{{ (cpu|int / 2)|int }}" hotadd_memory: yes networks:
name: Apply spbm to home folder community.vmware.vmware_guest_storage_policy: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: no name: "{{ vmname }}" vm_home: "{{ spbm }}" when: spbm is defined and spbm != '' delegate_to: localhost
name: Apply spbm to disk community.vmware.vmware_guest_storage_policy: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: no name: "{{ vmname }}" disk:
name: Retrieve running host community.vmware.vmware_guest_info: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" datacenter: "{{ vcenter_datacenter }}" name: "{{ vmname }}" register: vminfo
name: migrate to vvol community.vmware.vmware_vmotion: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: no vm_name: "{{ vmname }}" destination_datacenter: "{{ vcenter_datacenter }}" destination_datastore: "{{ vvol_datastore }}" destination_host: "{{ vminfo.instance.hw_esxi_host }}" when: spbm is defined and spbm != '' delegate_to: localhost