sawakine
Enthusiast
Enthusiast

Configuring IP adresse and DNS to VMs with vCenter orchestrator

Hi Guys,

I am trying to create a workflow that can do this list of things :

- Create a number of VMs from a template (the number of the VMs and the template are chosen by the user)

- Once the VM is created, it will be reconfigured (change RAM, Add disk, changeVMvCPU)

My workflow seems to work perfectly, the only problem I have is that I don't know how to give to all the VMs a DNS name and an IP address.

I tried an action called "getCustomizationGlobalIPSettingsWithDomainAsString" since it is the only one I could find but it doesn't do the job (or maybe it's me who is still a beginner with vCO), with this action the user can say "the list of DNS servers, for a virtual network adapter with a static IP address" and a "list of name resolution suffixes for the virtual network adapter", but I don't know what to put as values for those two input...

My VMs are created with a localhost as a DNS name by default and I don't know why!

any idea how can I easily give an IP adress and DNS to ma VMs in the workflow that I am trying to create ?

The main idea is that the user will run the Workflow and all what he has to do is to say :

-the number of VMs he wants to be created // done

-the names of VMs start with ... "prefix"// done

- virtual machine or template to clone// done

- virtual machine folder// done

- datastore// done

- destination host// done

- memory size// done

- disk size// done

- vCPU number// done

- dns server // not yet

- ip address // not yet

Thanks for your help!!

0 Kudos
4 Replies
AlexAllenExpedi
Enthusiast
Enthusiast

Have you tried?

Guest script manager package

The 2 sample workflows change ip address and dns servers.

~Alex

0 Kudos
AlexAllenExpedi
Enthusiast
Enthusiast

Did Guest Script Manager Package work for you?

~Alex Allen C.

0 Kudos
sawakine
Enthusiast
Enthusiast

Unfortunately, no.

The package works just for Windows VM (and I am using a Linux SE client + I am a beginner with vcO so I don't know what tochange so it can also work for linux).

I am trying to use a workflow that can clone a VM and configure its template in the same time, I will publish the workflow here if it works.

Thanks Smiley Wink

0 Kudos
AlexAllenExpedi
Enthusiast
Enthusiast

What version of Linux are you using?

  • Run the COE>Run script in guest>Script Management>Add Script Configuration
  • Name the Script [Next]
  • Leave drop down as Bash
  • In the code Box enter the command that you use to change IP. (this varies by distro)
    • Replace any variable you have for example the ip with brackets.  (for example)
    • ifconfig eth0 [Address] netmask [Subnet]
    • Set the time out to 30 Seconds [Finish]
  • Launch the Run Script in guest and fill the form out.
  • Change Script to run to the name of the file in step #1
  • Change Variables to replace with [Address] and youripaddress
  • Change Variables to replace [Subnet] and yoursubnet

I noticed a while back that there was an error with the Sample script that tries to figure out what OS your script is running.

I want to say it had a typo of KinuxGuest and i had to change it to LinuxGuest

Read your output and try to find the action and see where that reference is.

Hope this helps.

~Alex Allen C.