[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Getting domU vif's MAC address from dom0
Hi, Is there an easy way of programmatically obtaining the domU-side MAC of a vif, from the dom0? Example: A domU called debtest1 with a vif named v-debtest1, in dom0: $ ip --brief link show dev v-debtest1 v-debtest1 UP fe:ff:ff:ff:ff:ff <BROADCAST,MULTICAST,UP,LOWER_UP> in domU: $ ip --brief link show dev enX0 enX0 UP 00:16:5e:00:02:39 <BROADCAST,MULTICAST,UP,LOWER_UP> Easiest way to get 00:16:5e:00:02:39 in dom0? I know I can get it from xenstore if I know the domain ID: $ sudo xenstore-read /local/domain/0/backend/vif/60/0/mac 00:16:5e:00:02:39 So, I can resolve domU name to domain ID and do that I guess. I want this from a vif script. Is the domU domain ID exposed to the vif scripts at all (e.g. vif-route)? I can also parse it out of the domU's config file, but that seems quite hacky. The purpose of this is in order to add a route via the IPv6 link-local address inside the domU, which can be calculated from the MAC address of the domU's interface. Thanks, Andy
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |