virsh failed to get local hostname

View: New views
6 Messages — Rating Filter:   Alert me  

virsh failed to get local hostname

by Rodrique Heron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

On my fresh install of Fedora 11, I am trying to connect to a running guest console with virsh. When I execute virsh console I get the error below.

 

[root@N1-I-FKVM-01 ~]# virsh list

 Id Name                 State

----------------------------------

  3 N1ISPWALK01          running

 

[root@N1-I-FKVM-01 ~]# virsh console 3

error: Failed to get local hostname

 

I figured this may be because my /etc/hosts did not have an entry for the host. I modified /etc/hosts, and reboot the server, but I’m still getting the error.

 

Any hints?

 

Thanks


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Re: virsh failed to get local hostname

by Cole Robinson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rodrique Heron wrote:

> On my fresh install of Fedora 11, I am trying to connect to a running guest console with virsh. When I execute virsh console I get the error below.
>
> [root@N1-I-FKVM-01 ~]# virsh list
>  Id Name                 State
> ----------------------------------
>   3 N1ISPWALK01          running
>
> [root@N1-I-FKVM-01 ~]# virsh console 3
> error: Failed to get local hostname
>
> I figured this may be because my /etc/hosts did not have an entry for the host. I modified /etc/hosts, and reboot the server, but I'm still getting the error.
>
> Any hints?
>

You probably want to set HOSTNAME in /etc/sysconfig/network . You can
then reboot the machine, or use the command:

'hostname <desired.host.name>'

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

RE: virsh failed to get local hostname

by Rodrique Heron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



-----Original Message-----
From: Cole Robinson [mailto:crobinso@...]
Sent: Tuesday, July 14, 2009 10:07 AM
To: Fedora/Linux Management Tools
Cc: Rodrique Heron
Subject: Re: [et-mgmt-tools] virsh failed to get local hostname

Rodrique Heron wrote:

> On my fresh install of Fedora 11, I am trying to connect to a running guest console with virsh. When I execute virsh console I get the error below.
>
> [root@N1-I-FKVM-01 ~]# virsh list
>  Id Name                 State
> ----------------------------------
>   3 N1ISPWALK01          running
>
> [root@N1-I-FKVM-01 ~]# virsh console 3
> error: Failed to get local hostname
>
> I figured this may be because my /etc/hosts did not have an entry for the host. I modified /etc/hosts, and reboot the server, but I'm still getting the error.
>
> Any hints?
>

You probably want to set HOSTNAME in /etc/sysconfig/network . You can
then reboot the machine, or use the command:

'hostname <desired.host.name>'

- Cole

I have /etc/sysconfig/network configured already.

[root@N1-I-FKVM-01 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=N1-I-FKVM-01

Thanks


_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Re: virsh failed to get local hostname

by Cole Robinson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rodrique Heron wrote:

>
>>
>
> You probably want to set HOSTNAME in /etc/sysconfig/network . You can
> then reboot the machine, or use the command:
>
> 'hostname <desired.host.name>'
>
> - Cole
>
> I have /etc/sysconfig/network configured already.
>
> [root@N1-I-FKVM-01 ~]# cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=N1-I-FKVM-01
>
> Thanks
>

Not really sure then. I'd say file a bug against libvirt.

- Cole

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

Re: virsh failed to get local hostname

by David Huff-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Cole Robinson wrote:

> Rodrique Heron wrote:
>> You probably want to set HOSTNAME in /etc/sysconfig/network . You can
>> then reboot the machine, or use the command:
>>
>> 'hostname <desired.host.name>'
>>
>> - Cole
>>
>> I have /etc/sysconfig/network configured already.
>>
>> [root@N1-I-FKVM-01 ~]# cat /etc/sysconfig/network
>> NETWORKING=yes
>> HOSTNAME=N1-I-FKVM-01
>>
>> Thanks
>>
>
> Not really sure then. I'd say file a bug against libvirt.
>
> - Cole

I ran across this issue this AM, make sure that dns queries work for the
hostname, once I added the host to my dns records everything started
working again.

-D

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

RE: virsh failed to get local hostname

by Rodrique Heron-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



-----Original Message-----
From: David Huff [mailto:dhuff@...]
Sent: Tuesday, July 21, 2009 3:02 PM
To: Fedora/Linux Management Tools
Cc: Rodrique Heron
Subject: Re: [et-mgmt-tools] virsh failed to get local hostname

Cole Robinson wrote:

> Rodrique Heron wrote:
>> You probably want to set HOSTNAME in /etc/sysconfig/network . You can
>> then reboot the machine, or use the command:
>>
>> 'hostname <desired.host.name>'
>>
>> - Cole
>>
>> I have /etc/sysconfig/network configured already.
>>
>> [root@N1-I-FKVM-01 ~]# cat /etc/sysconfig/network
>> NETWORKING=yes
>> HOSTNAME=N1-I-FKVM-01
>>
>> Thanks
>>
>
> Not really sure then. I'd say file a bug against libvirt.
>
> - Cole

I ran across this issue this AM, make sure that dns queries work for the
hostname, once I added the host to my dns records everything started
working again.

-D

Yep, works for me now!  This should not require a A record to work, /etc/hosts should be enough.

Thanks

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@...
https://www.redhat.com/mailman/listinfo/et-mgmt-tools