Search code examples
alpine-linuxxen

How to set IP address to alpine linux as Dom-U on Xen hypervisor?


I'm trying creating Dom-U on Xen hypervisor. Using alpine linux as Dom-U has been installed successfully, except setting IP address statically. Do you have any idea of the point?

In details, the configurations in /etc/network/interfaces is always cleared on the time creating VM by using "xl create" command. These setting has been done to that "interfaces" file on image file as storage, before doing "xl create" command.

Also, I failed the configuration like below to xl.cfg of this Dom-U.

vif = [ bridge=xenbr0, ip=192.168.100.10' ]

I'm not sure whether it's Xen-specified topic or alpine linux-specified topic or others (e.g. general bridge configurations on linux).

Best Regards,


Solution

  • While I never used the ip= option myself to see how it actually behaves in practice, I'm sure there has to be support for it inside the domU.

    You may have already browsed xl-network-configuration(5) to see the description of the ip= option. It says it depends on the used scripts on the dom0 side. Assuming these scripts work correctly, the configured value will likely be available in xenstore, so that tooling in dom0 and domU can obtain the value. Verify it with xenstore-ls -f in dom0, check if the value actually exists.

    To me it is not obvious if the configure IP address is supposed to be used on the dom0 side or inside the domU. In case it is indeed supposed to be used inside domU, there has to be tooling inside domU to obtain the value and configure the domU network accordingly. Somehow I miss the values for the netmask and the default gatway, so there must be more to it.

    HTH.