puppet enterprise node_vmware create vm from vm present on venter/vsphere

[root@localhost ~]# cat .fog
:default:
  :vsphere_server: 192.168.0.108
  :vsphere_username: root
  :vsphere_password: vmware
  :vsphere_expected_pubkey_hash: 24f87c40cea28c2620dc372d914a3bb5ad06fddb9f131909c1441061566a79a1

[root@localhost ~]#


[root@localhost ~]#  puppet node_vmware list
Notice: Connecting ...
Notice: Connected to 192.168.0.108 as root (API version 4.1)
Notice: Finding all Virtual Machines ... (Started at 10:40:20 AM)
Notice: Control will be returned to you in 10 minutes at 10:50 AM if locating is unfinished.
Locating:          100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:02
Notice: Complete
/Datacenters/dc/vm/Discovered virtual machine/ans-db01
  powerstate: poweredOff
  name:       ans-db01
  hostname:   --------
  instanceid: 50133769-b602-b6e4-7307-23a574b85699
  ipaddress:  ---.---.---.---
  template:   true

/Datacenters/dc/vm/Discovered virtual machine/ans-db02
  powerstate: poweredOff
  name:       ans-db02
  hostname:   --------
  instanceid: 5013b6bf-be08-abd4-a742-361d94701471
  ipaddress:  ---.---.---.---
  template:   false

/Datacenters/dc/vm/Discovered virtual machine/ans-nginx01
  powerstate: poweredOff
  name:       ans-nginx01
  hostname:   --------
  instanceid: 5013c3dc-201e-ccd5-91e6-1b5b8c607876
  ipaddress:  ---.---.---.---
  template:   false

/Datacenters/dc/vm/Discovered virtual machine/ans-nginx02
  powerstate: poweredOff
  name:       ans-nginx02
  hostname:   --------
  instanceid: 5013ca38-52b6-f05b-6947-bc9cf01bd724
  ipaddress:  ---.---.---.---
  template:   false

/Datacenters/dc/vm/Discovered virtual machine/livekde1
  powerstate: poweredOff
  name:       livekde1
  hostname:   --------
  instanceid: 5013c70b-adca-041d-a3f1-0d08426272f5
  ipaddress:  ---.---.---.---
  template:   true

/Datacenters/dc/vm/new-vm
  powerstate: poweredOff
  name:       new-vm
  hostname:   --------
  instanceid: 50132383-d1fa-861a-f10b-dfe7c4fe6446
  ipaddress:  ---.---.---.---
  template:   false

/Datacenters/dc/vm/new-vm1
  powerstate: poweredOff
  name:       new-vm1
  hostname:   --------
  instanceid: 50130102-e8e5-a5f3-97b8-222e70c1cb77
  ipaddress:  ---.---.---.---
  template:   false


root@localhost ~]#  puppet node_vmware create  --vmname=launch --template="/Datacenters/dc/vm/ans-nginx02" --wait-for-boot
Notice: Connecting ...
Notice: Connected to 192.168.0.105 as root (API version 4.1)
Notice: Locating VM at /Datacenters/dc/vm/ans-nginx02 (Started at 06:04:43 AM)
Notice: Control will be returned to you in 10 minutes at 06:14 AM if locating (1/3) is unfinished.
Locating (1/3):    100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:12
Notice: Starting the clone process (Started at 06:04:55 AM)
Notice: Control will be returned to you in 10 minutes at 06:14 AM if starting (2/3) is unfinished.
Starting (2/3):    100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:01:11
Notice: Waiting for the machine to boot and obtain an IP address ... (Started at 06:06:07 AM)
Notice: Control will be returned to you in 10 minutes at 06:16 AM if booting (3/3) is unfinished.
Booting (3/3):     100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:07:16
---
  status: success
  id: "5013cf29-85ec-bf6b-31a1-34413abfc3a8"
  name: launch
  uuid: "421370f0-de3e-5b83-026a-7f450414320b"
  instance_uuid: "5013cf29-85ec-bf6b-31a1-34413abfc3a8"
  hostname: localhost
  operatingsystem: "Linux 3.10.0-957.el7.x86_64 CentOS Linux release 7.6.1810 (Core) "
  ipaddress: "192.168.0.107"
  power_state: poweredOn
  connection_state: connected
  hypervisor: "192.168.0.106"
  tools_state: toolsOk
  tools_version: guestToolsUnmanaged
  is_a_template: false
  memory_mb: 1040
  cpus: 1
  mo_ref: vm-422
  mac_addresses:
    "Network adapter 1": "00:50:56:93:74:27"
  path: /Datacenters/dc/vm
[root@localhost ~]#

[root@localhost ~]# puppet node_vmware start /Datacenters/dc/vm/new-vm
Notice: Connecting ...
Notice: Connected to 192.168.0.105 as root (API version 4.1)
Notice: Locating VM at /Datacenters/dc/vm/new-vm (Started at 12:54:54 AM)
Notice: Control will be returned to you in 10 minutes at 01:04 AM if locating is unfinished.
Locating:          100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:10
Notice: Starting Virtual Machine /Datacenters/dc/vm/new-vm (Started at 12:55:04 AM)
Notice: Control will be returned to you in 10 minutes at 01:05 AM if starting is unfinished.
Starting:          100% |oooooooooooooooooooooooooooooooooooooo| Time: 00:00:42
task_state  "success"
[root@localhost ~]# 

Comments