Skip to content

Cross VC Clone does not work with Datacenters in Folders #1500

Open
@romulus-ai

Description

@romulus-ai
SUMMARY

We try an cross VC clone and in Dest vCenter the Datacenters are organized in Folders. However Cross VC Clone seems to not find the destination folder for that reason it seems.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.vmware.vmware_guest_cross_vc_clone

ANSIBLE VERSION
ansible [core 2.13.5]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /root/.local/bin/ansible
  python version = 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION

-->

community.vmware        3.0.0  
CONFIGURATION
nothing changed, default configuration
OS / ENVIRONMENT

Source vCenter:
Version 7.0.3 Build 20150588
Sourcepath of VM: /DC/vm/Templates

Dest vCenter:
Version 7.0.3 Build 20150588
Destpath for VM: /DE/DC/vm/Templates

/DE is just a folder, DC is the Datacenter.

STEPS TO REPRODUCE

Just trying to clone a VM from one VC zu another VC, pretty close to the examples from documentation, the VM should be converted to a template afterwards.

- name: clone a template across VC
      community.vmware.vmware_guest_cross_vc_clone:
        hostname: "{{ vmware_hostname }}"
        username: "{{ vmware_username }}"
        password: "{{ vmware_password }}"
        validate_certs: false
        moid: "{{ image_facts.virtual_machines[0].moid }}"
        destination_vm_name: "{{ image_facts.virtual_machines[0].guest_name }}"
        destination_vcenter: "destvc.example.com"
        destination_vcenter_username: "{{ vmware_username }}"
        destination_vcenter_password: "{{ vmware_password }}"
        destination_vcenter_validate_certs: false
        destination_host: desthost.de.example.com
        destination_datastore: "Datastore 1"
        destination_vm_folder: "/DE/DC/vm/Templates"
        is_template: true
        state: present
EXPECTED RESULTS

I expect that the VM will be cloned.

ACTUAL RESULTS

Fully Verbose output will follow, its still running currently, since this affects a quiet long running pipeline.

msg: Destination folder does not exist. Please refer to the documentation to correctly specify the folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue/PR relates to a bugneeds_triageNeeds a first human triage before being processed.python3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions