How to use xHyper-V/XVMHyperV resource to create VM and assign static IP address

Welcome Forums DSC (Desired State Configuration) How to use xHyper-V/XVMHyperV resource to create VM and assign static IP address

Viewing 0 reply threads
  • Author
    Posts
    • #284572
      Participant
      Topics: 3
      Replies: 2
      Points: 29
      Rank: Member

      Hello,

      I am using the xHyper-V DSC resource to create a VM.

      Creating the VM was not an issue. However, I want to be able to customize the VM’s hostname, give it an static IP address etc that comes after creating the VM. The xHyper-V resource has a lot of resources but I couldn’t find a way to post-customize the VM using DSC.

      My workflow as I see it looks like this (could be wrong, I would like advice if so):

      1. Create 3 VMs using the xHyper-V’s XVMHyperV resource
      2. Configure the VM’s hostname to say ‘DC1’, ‘MS1’, ‘Client1’ etc
      3. Configure the nodes’ IP addresses using some kind of configuration data type structure

      When the VM is created, it has a random jumbled hostname. For me to write a config data structure, don’t I need a specific nodename for each of these VMs so that I can apply the node specific configs using config data structure? I am out of ideas as to how to go about doing this using DSC.

      Can some one provide me an example of how I might go about doing these?

      Thank you very much.

      -Krish.

      • This topic was modified 1 week, 6 days ago by Krish MD. Reason: Added more explanation to previous post
Viewing 0 reply threads
  • You must be logged in to reply to this topic.