Provision Hyper-V virtual machines thru Ansible

20 views
Skip to first unread message

Neeraj Shah

unread,
Jul 12, 2019, 11:58:06 AM7/12/19
to Ansible Project
Hello All,

I am newbie to Ansible.

Can someone pls point me to resources or post some playbook code that deploys VM's on a Hyper-V 2012 or 2016 server ?  Alternatively, lets say if i have a golden image of a VM created ( in *.vhd or *.vhdx format), how can i deploy this image to multiple hosts using Ansible?
I have looked online and see there is stuff for Vmware but couldnt find much help for Hyper-V

thanks


Jaya Nehru Kumar

unread,
Jul 14, 2019, 5:48:31 AM7/14/19
to Ansible Project
Hi Neeraj ,

   As of now , there is no ansible native modules available to support this.
  steps involved to get this done.

1. create one windows host 
2. connect to this host using ansible and  invoke powerhsell module for deploying resources in hyper-v

Neeraj Shah

unread,
Jul 15, 2019, 11:20:24 AM7/15/19
to Ansible Project
Thanks Jaya. But how do you run those  hyper-v cmdlets using playbooks ?  Do i need to use win_shell module ?
Reply all
Reply to author
Forward
0 new messages