Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create VM using vcenter_vm with latest changes #74

Closed
Akasurde opened this issue Sep 8, 2020 · 3 comments
Closed

Unable to create VM using vcenter_vm with latest changes #74

Akasurde opened this issue Sep 8, 2020 · 3 comments

Comments

@Akasurde
Copy link
Member

Akasurde commented Sep 8, 2020

SUMMARY

I am trying to create a VM using vcenter_vm

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vcenter_vm

ANSIBLE VERSION
2.9.13
CONFIGURATION

Nothing specific

OS / ENVIRONMENT

CentOS 7

STEPS TO REPRODUCE
    - set_fact:
        cluster_id: "domain-c7"
        resource_pool_id: "resgroup-8"
        folder_id: "group-v22"
        datastore_id: "datastore-12"

    - name: Create a VM
      vmware.vmware_rest.vcenter_vm:
        vcenter_username: administrator@vsphere.local
        vcenter_password: Esxi@123$%
        vcenter_hostname: 10.65.201.177
        placement:
          cluster: '{{ cluster_id }}'
          datastore: '{{ datastore_id }}'
          folder: '{{ folder_id }}'
          resource_pool: '{{ resource_pool_id }}'
        name: test_vm1
        guest_OS: DEBIAN_8_64
        hardware_version: VMX_11
        state: present
        memory:
          hot_add_enabled: true
          size_MiB: 1024
EXPECTED RESULTS

New VM should be created.

ACTUAL RESULTS
TASK [set_fact] *******************************************************************************
task path: /home/vagrant/create_vm.yml:71
ok: [localhost] => {"ansible_facts": {"cluster_id": "domain-c7", "datastore_id": "datastore-12", "folder_id": "group-v22", "resource_pool_id": "resgroup-8"}, "changed": false}

TASK [Create a VM] ****************************************************************************
task path: /home/vagrant/create_vm.yml:77
ok: [localhost] => {"_debug_info": {"operation": "get", "status": 200}, "changed": false, "id": "vm-15", "value": {"boot": {"delay": 0, "enter_setup_mode": false, "retry": false, "retry_delay": 10000, "type": "BIOS"}, "boot_devices": [], "cdroms": [{"key": "3000", "value": {"allow_guest_control": true, "backing": {"device_access_type": "PASSTHRU", "type": "CLIENT_DEVICE"}, "ide": {"master": true, "primary": true}, "label": "CD/DVD drive 1", "start_connected": false, "state": "NOT_CONNECTED", "type": "IDE"}}], "cpu": {"cores_per_socket": 1, "count": 1, "hot_add_enabled": false, "hot_remove_enabled": false}, "disks": [{"key": "2000", "value": {"backing": {"type": "VMDK_FILE", "vmdk_file": "[ds_171_2] debian_empty/debian_empty.vmdk"}, "capacity": 536870912, "label": "Hard disk 1", "scsi": {"bus": 0, "unit": 0}, "type": "SCSI"}}], "floppies": [], "guest_OS": "DEBIAN_9_64", "hardware": {"upgrade_policy": "NEVER", "upgrade_status": "NONE", "version": "VMX_13"}, "memory": {"hot_add_enabled": false, "size_MiB": 512}, "name": "debian_empty", "nics": [{"key": "4000", "value": {"allow_guest_control": true, "backing": {"network": "network-13", "network_name": "VM Network", "type": "STANDARD_PORTGROUP"}, "label": "Network adapter 1", "mac_address": "00:50:56:86:1f:06", "mac_type": "ASSIGNED", "start_connected": true, "state": "NOT_CONNECTED", "type": "VMXNET3", "upt_compatibility_enabled": true, "wake_on_lan_enabled": true}}], "parallel_ports": [], "power_state": "POWERED_OFF", "sata_adapters": [], "scsi_adapters": [{"key": "1000", "value": {"label": "SCSI controller 0", "scsi": {"bus": 0, "unit": 7}, "sharing": "NONE", "type": "PVSCSI"}}], "serial_ports": []}}
META: ran handlers
META: ran handlers

It is pick up an existing VM called debian_empty which is first in the list of existing VMs.

@goneri
Copy link
Member

goneri commented Sep 9, 2020

9ad9d9d should resolve the problem. I cannot reproduce the problem anymore.

@goneri goneri closed this as completed Sep 17, 2020
@Akasurde Akasurde reopened this Oct 1, 2020
@Akasurde
Copy link
Member Author

Akasurde commented Oct 1, 2020

I still facing issue on macOS

@goneri
Copy link
Member

goneri commented Oct 21, 2020

The MacOS problem should fixed with ansible-collections/cloud.common#16

@goneri goneri closed this as completed Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants