Nalini Vidapankal
2008-Feb-08 11:53 UTC
[Xen-users] Getting hostname of DomainU from domain0
Hi, I am a newbee to Xen.. was trying out something on RHEL5.1. I am hosting a VM that is RHEL4 on the dom0. Was looking for how to get the hostname of the domainU from dom0? Thanks for your help -N _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
trilok nuwal
2008-Feb-08 12:19 UTC
Re: [Xen-users] Getting hostname of DomainU from domain0
Could you mount root file system of the guest domain ? If yes then you could mount and can see the /et/hosts file to know the host name, but it should be there. Else if you know the ip address of the domain, then could ssh and see the hostname by running hostname command on domU via ssh. Else you have to see the console of domU and see the ip and hostname via console of domU. Thanks Trilok On Feb 8, 2008 5:23 PM, Nalini Vidapankal <nvidapan@in.ibm.com> wrote:> > Hi, > > I am a newbee to Xen.. was trying out something on RHEL5.1. I am hosting a > VM that is RHEL4 on the dom0. Was looking for how to get the hostname of the > domainU from dom0? > > Thanks for your help > -N > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2008-Feb-08 22:54 UTC
Re: [Xen-users] Getting hostname of DomainU from domain0
Nalini Vidapankal wrote:> > Hi, > > I am a newbee to Xen.. was trying out something on RHEL5.1. I am > hosting a VM that is RHEL4 on the dom0. Was looking for how to get the > hostname of the domainU from dom0? > > Thanks for your help > -NBesides running an "xm console" and logging into it? You can use the "xm list" verbose options to get the MAC address, and poke your local network to see what IP address and potentially what hostname are associated with it. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2008-Feb-08 22:59 UTC
Re: [Xen-users] Getting hostname of DomainU from domain0
trilok nuwal wrote:> > > Could you mount root file system of the guest domain ? If yes then you > could mount and can see the /et/hosts file to know the host name, but > it should be there. > > Else if you know the ip address of the domain, then could ssh and see > the hostname by running hostname command on domU via ssh. > > Else you have to see the console of domU and see the ip and hostname > via console of domU. > > Thanks > TrilokNo, you can''t. You will only see what the installer assigned there, if anything. The hostname is usually actually set in a configuration file read at boot time, /etc/sysconfig/network on RHEL and Fedora and many other Linuxes, or /etc/hostname on old BSD releases, etc., etc., etc. And for some setups, it is assigned by a DNS lookup from DHCP configurations at boot-time, and it can even be set in a dynamic DNS setup in /etc/dhclient-eth0 /etc/hosts is where a hostname may be *RECORDED* by many installers, but it''s not where it is set. I''ve previously spent a long time divorcing people from publishing all their internal DNS information via /etc/hosts, which is very fragile and can be overridden by local dynamic DNS setups common to Active Directory environments. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sadique Puthen
2008-Feb-09 10:45 UTC
Re: [Xen-users] Getting hostname of DomainU from domain0
Nalini Vidapankal wrote:> > Hi, > > I am a newbee to Xen.. was trying out something on RHEL5.1. I am > hosting a VM that is RHEL4 on the dom0. Was looking for how to get the > hostname of the domainU from dom0?There is no way to get it from Dom0. You should log in to guest and check the output of "hostname" command to get the actual hostname set for the guest or use "host <ip address>" if you know the ip address to return the hostname of the guest in DNS. --Sadique> > Thanks for your help > -N > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users