puppet enterprise node_vmware create vm from template

[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=newpuppetmaster --template="/Datacenters/dc/vm/Discovered virtual machine/ans-db01"Notice: Connecting ...
Notice: Connected to 192.168.0.108 as root (API version 4.1)
Notice: Locating VM at /Datacenters/dc/vm/Discovered virtual machine/ans-db01 (Started at 10:47:29 AM)
Notice: Control will be returned to you in 10 minutes at 10:57 AM if locating (1/2) is unfinished.
Locating (1/2):    100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
Notice: Starting the clone process (Started at 10:47:29 AM)
Notice: Control will be returned to you in 10 minutes at 10:57 AM if starting (2/2) is unfinished.
Starting (2/2):    100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:17
---
  status: success
  id: "501314a0-1aa8-76eb-0274-26c306fb099b"
  name: newpuppetmaster
  uuid: "4213ecc9-574c-1462-0960-0c5db886d791"
  instance_uuid: "501314a0-1aa8-76eb-0274-26c306fb099b"
  hostname:
  operatingsystem:
  ipaddress:
  power_state: poweredOff
  connection_state: connected
  hypervisor: "192.168.0.106"
  tools_state: toolsNotRunning
  tools_version: guestToolsUnmanaged
  is_a_template: false
  memory_mb: 512
  cpus: 1
  mo_ref: vm-377
  mac_addresses:
    "Network adapter 1": "00:50:56:93:9e:6e"
  path: "/Datacenters/dc/vm/Discovered virtual machine"
[root@localhost ~]#


[root@localhost ~]#  puppet node_vmware create --vmname=kde --template="/Datacenters/dc/vm/Discovered virtual machine/livekde1"
Notice: Connecting ...
Notice: Connected to 192.168.0.108 as root (API version 4.1)
Notice: Locating VM at /Datacenters/dc/vm/Discovered virtual machine/livekde1 (Started at 10:51:30 AM)
Notice: Control will be returned to you in 10 minutes at 11:01 AM if locating (1/2) is unfinished.
Locating (1/2):    100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:00
Notice: Starting the clone process (Started at 10:51:31 AM)
Notice: Control will be returned to you in 10 minutes at 11:01 AM if starting (2/2) is unfinished.
Starting (2/2):    100% |oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:15
--- 
  status: success
  id: "5013e8b4-5e0b-b27a-3ef8-23bfcb945a87"
  name: kde
  uuid: "4213dd0b-c9a8-bb67-8c93-77f49ace8d11"
  instance_uuid: "5013e8b4-5e0b-b27a-3ef8-23bfcb945a87"
  hostname: 
  operatingsystem: 
  ipaddress: 
  power_state: poweredOff
  connection_state: connected
  hypervisor: "192.168.0.106"
  tools_state: toolsNotRunning
  tools_version: guestToolsUnmanaged
  is_a_template: false
  memory_mb: 1048
  cpus: 1
  mo_ref: vm-379
  mac_addresses: 
    "Network adapter 1": "00:50:56:93:dd:80"
  path: "/Datacenters/dc/vm/Discovered virtual machine"
[root@localhost ~]# 

Comments

Popular posts from this blog

ansible redhat cluster qorum qdevice

PE 3.9.0 on centos 6

gfs2 cluster