Add ip address to VM


#1

Hi, I have created a new VM. How to add ip address to that VM? So I can ping from VM OS terminal to my physical system ip (I am experimenting in standalone system).
Thanks.


#2

Cloud you please provide some more details?
What OS is your VM? Are you trying to set a static address to get one through DHCP? Do you have the context package installed in the VM?

What have you already tried?

Please provide version numbers of software where relevant


#3

Thanks Morgan for replying.
I want a static ip address. My physical OS is ubuntu 16.04. For time being my VM OS is tty linux(I tried with ubuntu-16.04 for VM OS, but in VNC mood it is showing “No Bootable Device”, so I tried with tty linux). I’m using Opennebula 5.6.2.


#4

You need to do the following:

  • Ensure that the Ubuntu Context Package is installed on your VM template
  • Define you static IP address (or a range of addresses) in your Virtual Network in OpenNebula, under the Addresses tab
  • When creating the VM from a template (depending on your configuration this must be done through the admin interface, not the cloud interface), open up the “Network” section, open up the adaptor, and then enter the IP you want in the “Force IP”. The IP you use must be in the address range you set for that network.

#5

Thank you for replying.
Now, ip is assigned to my VM OS, using the method you told. But one issue is there : From my VM OS it’s not pinging to my physical system ip address and vice-versa.