Posts

Showing posts from August, 2019

ansible create multiple vms on vcenter

ansible-playbook temp1.yml temp2.yml https://docs.google.com/document/d/e/2PACX-1vSUjKRwDOo2HodY7PmApOzv1kFph5YQw172hMFt7zGJd98VXCbYb7nTxXCr9hcXCUQEi7yxzpxWPbcx/pub Created virtual machine temp2 on 192.168.45.154 in dc info 8/30/2019 5:31:06 PM temp2 root Creating temp2 on host 192.168.45.154 in dc info 8/30/2019 5:31:02 PM temp2 root Assigned new BIOS UUID (4213c1d3-634a-9e49- 8069-a174aa2d7de2) to temp2 on 192.168.45.154 in dc info 8/30/2019 5:31:02 PM temp2 root Assign a new instance UUID (5013e617-f23d-07c1-c00b-11cb8b500d43) to temp2 info 8/30/2019 5:31:02 PM temp2 root Created virtual machine temp1 on 192.168.45.154 in dc info 8/30/2019 5:30:57 PM temp1 root Creating temp1 on host 192.168.45.154 in dc info 8/30/2019 5:30:53 PM temp1 root Assigned new BIOS UUID (4213942e-7a75-0bca- 4daf-5332cf11c870) to temp1 on 192.168.45.154 in dc info 8/30/2019 5:30:53 PM temp1 root Assign a new instance UUID (5013553e-7dca-552b-e4ce-eaac6f3599e8) to temp1 info 8/30/2019 5:30:53 PM temp1 root R...

ansible create a template create vm from template temp vcenter

Image
[root@localhost ~]# cat template.yml --- - name: Create a VM   hosts: localhost   connection: local   gather_facts: no   tasks:   - name: Create a virtual machine on given ESXi hostname     vmware_guest:      hostname: 192.168.45.151      username: root      password: vmware      validate_certs: no      datacenter: dc      folder: /dc/vm/      name: temp      from_template: yes      guest_id: debian6_64Guest      state: present     # This is hostname of particular ESXi server on which user wants VM to be deployed      esxi_hostname: 192.168.45.154      disk:      - size_gb: 10        type: thin        datastore: datastore1      hardware:        memory_mb: 512     ...

qemu centos7

[root@localhost libvirt]# yum install qemu* Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile  * base: centos.excellmedia.net  * epel: nrt.edge.kernel.org  * extras: centos.excellmedia.net  * updates: centos.excellmedia.net Package 10:qemu-kvm-1.5.3-160.el7_6.3.x86_64 already installed and latest version Package 10:qemu-guest-agent-2.12.0-2.el7.x86_64 already installed and latest version Package 2:qemu-system-x86-2.0.0-1.el7.6.x86_64 already installed and latest version Package 10:qemu-img-1.5.3-160.el7_6.3.x86_64 already installed and latest version Package 10:qemu-kvm-common-1.5.3-160.el7_6.3.x86_64 already installed and latest version Package 2:qemu-common-2.0.0-1.el7.6.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package qemu.x86_64 2:2.0.0-1.el7.6 will be installed ---> Package qemu-kvm-tools.x86_64 10:1.5.3-160.el7_6.3 will be installed ---> Package qemu-syste...

vagrant libvirt

[root@localhost ~]# yum install libvirt* Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile epel/x86_64/metalink                                            | 5.9 kB  00:00:00     * base: centos.excellmedia.net  * epel: nrt.edge.kernel.org  * extras: centos.excellmedia.net  * updates: centos.excellmedia.net base                                                            | 3.6 kB  00:00:00    extras                                                          | 3.4 kB  00:00:00    updates  ...