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 |
|
|
|
|
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
|
|