Create VM from ISO on ESXI

121 views
Skip to first unread message

Karther

unread,
May 11, 2020, 4:27:47 AM5/11/20
to Ansible Project
Hello Guy !! ;)

I am trying to create an Eyes Of Network virtual machine from an ISO on an ESXI through a vCenter.
I try to use the task below but it doesn't work :(
Can you tell me if this is the right module to use please?

- name: Create a virtual machine from a template
     vmware_guest:
       hostname: "172.180.0.134"
       username: "root"
       password: "espoire"
       folder: test_vm_0001
       validate_certs: no
       name: EON_01
       state: poweredoff
       datacenter: Datacenter
       guest_id: Eon_1
       disk:
       - size_gb: 4
         type: thin
         datastore: datastore1
       hardware:
         memory_mb: 512
         num_cpus: 6
         num_cpu_cores_per_socket: 3
         scsi: paravirtual
         memory_reservation_lock: True
         mem_limit: 8096
         mem_reservation: 4096
         cpu_limit: 8096
         cpu_reservation: 4096
         max_connections: 5
         hotadd_cpu: True
         hotremove_cpu: True
         hotadd_memory: False
         version: 12 # Hardware version of virtual machine
         boot_firmware: "efi"
       cdrom:
         type: iso
         iso_path: "[datastore1] EyesOfNetwork-5.3-x86_64-bin.iso"
       networks:
       - name: VM Network
         mac: aa:bb:dd:aa:00:14
       wait_for_ip_address: yes
       esxi_hostname: "172.180.0.100"
     delegate_to: localhost
     register: deploy

More, i don't understand what is parameter "folder", i want to déploy my vm only from iso...

Can you help me please !! :)

Thanks you very much

Best Regards,

Dick Visser

unread,
May 11, 2020, 6:26:37 AM5/11/20
to ansible...@googlegroups.com
On Mon, 11 May 2020 at 10:27, Karther <ryadmo...@gmail.com> wrote:
>
> Hello Guy !! ;)
>
> I am trying to create an Eyes Of Network virtual machine from an ISO on an ESXI through a vCenter.
> I try to use the task below but it doesn't work :(

That can mean many things.
Please try to be more specific.

> More, i don't understand what is parameter "folder", i want to déploy my vm only from iso...

Look at https://docs.ansible.com/ansible/latest/modules/vmware_guest_module.html#parameter-folder



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

David Foley

unread,
May 11, 2020, 6:36:21 AM5/11/20
to Ansible Project
Hi,

you could just use the following Folder: / 

That will automatically place the Server into the path of  Datacenter/vm/

Using Folder would place it into a more specific folder if needed i.e Folder Datacenter/vm/Development/
Reply all
Reply to author
Forward
0 new messages