question

gsingh avatar image
gsingh asked Philip.Joung edited

How to modify VM's IP address using vSphere session in iTest

I need to modify the IP address of a VM on VMWare ESXi server. I tried using the iTest VSphere session type from iTest, but i don not see the console tab for the VM as we see in the native VSphere Client Application. I do not have telnet access to this VM. So using telnet is not an option. If there is any other way to modify the IP address of the VM please let me know. Thanks Gurpreet
iTestvSphere
2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gsingh avatar image gsingh commented ·
Hi Kiran I tried powering off the VM earlier but it did not enable the "Change IP address" option. Also I cannot use telnet or SSH. What I am trying to do is clone an existing VM and then change the IP address of the clone so that each of the VMs gets a unique IP address. Since both the original VM and the clone would have the same IP address initially, i cannot SSH or telnet to the cloned VM and modify the IP address. My objective is to automate the process of cloning and modifying the VM attributes via API or iTest directly. Thanks Gurpreet
1 Like 1 ·
ericnute avatar image ericnute commented ·
@gsingh, If you came up with a solution, please take a moment to add it. Or if the new solution works, please check it as the correct answer. Thank you for your time.
0 Likes 0 ·
sai_kiran avatar image
sai_kiran answered
Hi Gurupreet, Kindly try the following steps: Please go to the inventory -> select the VM( whose IP is need to be changed)-> Right click on the VM. Select the "change IP Address" option and specify the new ip address. Hope this helps!
4 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sai_kiran avatar image sai_kiran commented ·
Hi Gurpreet, I would like to know few things like: 1) Whether you are able to change the ip address in VMware server without the console? 2) Whether you can view the ip address of the VM in the summary tab(img1)![alt text][1]? 3) What is the OS of the VM that you are currently dealing with to change the ip? Just wondering if ssh or VNC can be an option to change the ip address. iTest vSphere session can be used to modify the settings of the VM, just like in VMware vSphere client application outside the iTest. [1]: /storage/temp/3639-img1.png
1 Like 1 ·
img1.png (32.1 KiB)
gsingh avatar image gsingh commented ·
Hi Kiran For some reason the "change IP address" option is disabled for all the VMs that are installed on the server. So I am unable to use this method. Thanks Gurpreet
0 Likes 0 ·
gsingh avatar image gsingh commented ·
Hi Kiran The only way I can modify the IP address of the VM from vSphere Client GUI is by using VM console. The VM I am using is STC Virtual VM and the OS is Red Hat Linux. Following is the information on for the VM I am using. ![alt text][1] [1]: /storage/temp/3640-vm+info.png
0 Likes 0 ·
vm info.png (16.0 KiB)
gsingh avatar image gsingh commented ·
In addition following is the snapshot of the VM actions available through the iTest vSphere session. ![alt text][1] [1]: /storage/temp/3641-vm+available+actions.png
0 Likes 0 ·
nehash avatar image
nehash answered Philip.Joung edited

@gsingh,

Can you please let me know if your issue got resolved or Did you manage to automate this ,

We are also looking for the same feature, We want to automate the whole process of creating new VM, but after the clone we are not getting option of how to update the IP in network configuration file without using Vsphere console.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ericnute avatar image
ericnute answered
Looking at the screenshots, it seems that VMWare Tools is not installed. Without VMWare Tools, the vSphere Client has limited access to the internal workings of the guest os. Here are some ideas off the top of my head: 1. Install VMWare Tools on your guests 2. Follow this algorithm 1. Turn off source VM 2. Clone source VM 3. Turn on clone VM 4. Connect to clone VM and change IP 5. Test that new IP is valid 6. Turn on source VM 3. Alternate algorithm 1. Clone source VM 2. Suspend source VM 3. Connect to clone VM and change IP 4. Test that new IP is valid 5. Resume source VM
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sai_kiran avatar image
sai_kiran answered ericnute converted comment to answer
Hi Gurpreet, Could you please check whether after Powering Off the VM "Change IP Address" option is enabled or not. And, I am not sure if SSH session can allow you to connect to this Linux console. If yes, then you should be able to configure the IP address via SSH session of iTest. Also, like I said iTest vSphere session is an internal client just like VMware vSphere client outside the iTest, which can help us to manage the VM settings and other operations similar to that we can do it outside the iTest. I believe the possible reason, VM console is not included in the iTest session is that, iTest may have to capture all the actions performed inside the console, but for this iTest already have so many other sessions to perform this, like SSH, telnet and VNC. Thanks!
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.