View previous topic :: View next topic |
Author |
Message |
mocsokmike Tux's lil' helper
Joined: 04 Aug 2005 Posts: 120 Location: Budapest, Hungary
|
Posted: Mon Jun 22, 2015 1:08 pm Post subject: XenCenter does not show IP address of Gentoo host [SOLVED] |
|
|
Hi,
I have XenServer hypervisors (6.5) installed using the official Citrix installers. I am running Gentoo VM-s on them, and they work nicely, just one thing bothers me: I cannot see the IP address of my guest VM-s inside XenCenter.
I have installed this package to every VM:
Code: | app-emulation/xe-guest-utilities-6.2.0_p1120 USE="xenstore" |
It is started in the boot runlevel. This daemon provide the ability to shutdown/restart a VM properly from XenCenter, and to display memory usage. I believe that without this utility the network information still should appear in XenCenter.
I tried searching the net, without success, so I decided to ask this question here.
What is needed to make the guest VM's IP address known to its host? _________________ format c:
emerge system
Last edited by mocsokmike on Fri Jun 26, 2015 7:01 am; edited 1 time in total |
|
Back to top |
|
|
AjitKhodke n00b
Joined: 23 Jun 2015 Posts: 1 Location: India
|
|
Back to top |
|
|
mocsokmike Tux's lil' helper
Joined: 04 Aug 2005 Posts: 120 Location: Budapest, Hungary
|
Posted: Thu Jun 25, 2015 3:01 pm Post subject: |
|
|
Hi,
thanks for the URL, but unfortunately those tips didn't work for me.
What I figured out is that Gentoo has a different output format of ifconfig.
My Gentoo VM:
Code: | eth0_gu: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.20.1 netmask 255.255.255.0 broadcast 192.168.20.255
inet6 fe80::a883:b5ff:fe7f:b0af prefixlen 64 scopeid 0x20<link>
ether aa:83:b5:7f:b0:af txqueuelen 0 (Ethernet)
RX packets 1364 bytes 109320 (106.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1325 bytes 548440 (535.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
My XenServer host:
Code: | xenbr0 Link encap:Ethernet HWaddr 5C:F3:FC:21:71:CC
inet addr:10.0.0.16 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:10765094 errors:0 dropped:347711 overruns:0 frame:0
TX packets:4049143 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11986805802 (11.1 GiB) TX bytes:778708354 (742.6 MiB) |
Maybe XenCenter expects the ifconfig output in the same format as XenServer has? Can I change my ifconfig output format?
=EDIT [2015. 06. 26.]=
I got it! XenServer use the old ifconfig output format, what is deprecated.
Here is what to do to make the IP addresses appear in XenCenter:
Code: | echo 'sys-apps/net-tools old-output' >> /etc/portage/package.use
emerge net-tools
/etc/init.d/xe-daemon restart |
Flexibility - this is why I love Gentoo!
=EDIT [2018. 08. 10.]=
The old-output USE flag has been removed a long time ago, and this issue frustrated me again.
If anyone is in the same shoes, modify:
/usr/sbin/xe-update-guest-attrs
change this:
Code: | ifs=`/bin/ifconfig | sed -n -e 's/^\([a-z0-9]\+\).*/name \1/p' \
-e 's/.*inet addr: \('$IPADDR_RE'\).*/ipv4 \1/p' \
-e 's+.*inet6 addr: \('$IPADDR6_RE'\)/.*+ipv6 \1+p' | \ |
to this:
Code: | ifs=`/bin/ifconfig | sed -n -e 's/^\([a-z0-9]\+\).*/name \1/p' \
-e 's/.*inet \('$IPADDR_RE'\).*/ipv4 \1/p' \
-e 's+.*inet6 \('$IPADDR6_RE'\)/.*+ipv6 \1+p' | \ |
Then restart the service:
/etc/init.d/xe-daemon restart _________________ format c:
emerge system |
|
Back to top |
|
|
Max Steel Advocate
Joined: 12 Feb 2007 Posts: 2242 Location: My own world! I and Gentoo!
|
Posted: Mon May 13, 2024 5:20 pm Post subject: |
|
|
Sooo. thank you for the patches. for todays systems with net-tools 2.10 and the "new" udev names we have to update that script again:
https://bpa.st/BNZA
Code: |
--- a/xe-update-guest-attrs 2024-04-11 16:39:54.883390718 +0200
+++ b/xe-update-guest-attrs 2024-05-13 18:16:30.085089792 +0200
@@ -178,9 +178,9 @@
# collisions:0 txqueuelen:0
# RX bytes:3604609 (3.4 MiB) TX bytes:3604609 (3.4 MiB)
-ifs=`/bin/ifconfig | sed -n -e 's/^\([a-z0-9]\+\).*/name \1/p' \
- -e 's/.*inet addr:\('$IPADDR_RE'\) .*/ipv4 \1/p' \
- -e 's+.*inet6 addr: \('$IPADDR6_RE'\)/.*+ipv6 \1+p' | \
+ifs=`/bin/ifconfig | sed -n -e 's/^\([a-zA-Z0-9]\+\).*/name \1/p' \
+ -e 's/.*inet \('$IPADDR_RE'\) .*/ipv4 \1/p' \
+ -e 's+.*inet6 \('$IPADDR6_RE'\)/.*+ipv6 \1+p' | \
while read tag value; do
case "${tag}" in
name)
@@ -189,6 +189,11 @@
if="${value}"
xenstore_rm_cached "attr/${if}"
echo "${if}"
+ ind=0;;
+ en*)
+ if="${value/nX/th}"
+ xenstore_rm_cached "attr/${if}"
+ echo "${if}"
ind=0;;
*)
unset if;;
|
It is still for the xe-guest-utilities 6.20 though... If newer ebuilds for todays xe-guest-utilities exist... i'm not able to write those as of today. _________________ mfg
Steel
___________________
Heim-PC: AMD Ryzen 5950X, 64GB RAM, GTX 1080
Laptop: Intel Core i5-4300U, 16GB RAM, Intel Graphic
Arbeit-PC: Intel i5-1145G7, 16GB RAM, Intel Iris Xe Graphic (leider WSL2) |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|