[libvirt-users] Error connecting to console

Anthony Davis tony at specialistdevelopment.com
Mon May 10 08:16:29 UTC 2010


Hi Chris,

Thanks for the response, will try and sort it out today...

Kind Regards

Tony

Quoting Chris Lalancette <clalance at redhat.com>:

> On 04/30/2010 09:11 AM, Anthony Davis wrote:
>> Hi,
>>
>> i have KVM running at the moment and im trying to do a text based
>> install of centos, so i need to connect to the console via virsh
>>
>> virsh console servername
>>
>> but i get this error:
>>
>> error: Failed to get local hostname
>
> Yeah, this is an unfortunate bug in the virsh console code at
> the moment.  It tries to fetch the hostname so that it can check
> whether the connection is local or remote (since we don't currently
> support the console on remote machines).
>
> The problem usually comes down to the fact that whatever "hostname"
> returns maps to localhost.  In /etc/hosts, make sure that the 127.0.0.1
> line only has "localhost" and "localhost.localdomain", and *not* the
> hostname of your server.  Then make sure /etc/hosts has an entry for
> the IP address of your machine.  If you can't get it to work, send
> a copy of your /etc/hosts, the output from "hostname" and the output
> from "ifconfig", and I can suggest modifications.
>
> Note that this is considered a bug, and we want to fix it, we just
> haven't gotten around to it yet.
>
> --
> Chris Lalancette
>
>





More information about the libvirt-users mailing list