[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to set static IP for guest/domU from the xen config?


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: Andy Smith <andy@xxxxxxxxxxxxxx>
  • Date: Fri, 9 Jul 2021 13:10:00 +0000
  • Delivery-date: Fri, 09 Jul 2021 13:10:48 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>
  • Openpgp: id=BF15490B; url=http://strugglers.net/~andy/pubkey.asc

Hello,

On Thu, Jul 08, 2021 at 08:20:29PM -0700, Yang wrote:
> I see that in a guest VM config, you can specify
> 
> vif=['bridge=br,ip=10.0.0.2']

That is configuring your dom0's networking. Guest network config is
done inside guest (which is what is happening with DHCP too, so
that's no different).

> since I already specified the IP on config, is there a way to let the guest
> automatically pick up the wanted IP , instead of me having to manually run
> the "ifup" for each guest?

You have to arrange for the guest to configure it. In some Linux
distributions that is possible on kernel command line, e.g. in Red
Hat-like:

    
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_from_the_kernel_command_line
    https://linuxlink.timesys.com/docs/static_ip

…so at least the two instances of network details would be in the
same place. At least some of that works on Debian/Ubuntu as well.

Still, I'd rather do DHCP.

Cheers,
Andy



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.