Console of P2V?

W wkern at pixelgate.net
Mon May 24 01:12:15 UTC 2021


well libvirt has to know about the serial port and attach it to the 
console.

do you have something like this in your XML file?


   <serial type='pty'>
       <source path='/dev/pts/0'/>
       <target type='isa-serial' port='0'>
         <model name='isa-serial'/>
       </target>
       <alias name='serial0'/>
     </serial>
     <console type='pty' tty='/dev/pts/0'>
       <source path='/dev/pts/0'/>
       <target type='serial' port='0'/>
       <alias name='serial0'/>
     </console>

at that point I just type in "virsh console $DOM" in the command line

# virsh console XXXX
Connected to domain XXXX
Escape character is ^]

XXXX4 login:

I often have to hit the enter key a once or twice to get the login 
prompt once connected.



On 5/23/2021 12:52 AM, vrms wrote:

> hi William
>
> On 22.05.21 23:59, William wrote:
>> I generally use
>>
>> GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
>> and redo grub.cfg (i.e. update-grub, grub2-mkconfig)
> thanks for the pointer.
>
> I literally ran in the guests commandline
>
>      GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200n8"
>      sudo update-grub
>
> which did change anything to the behavior on the hosts cli
>
>     Connected to domain '[domain]'
>     Escape character is ^] (Ctrl + ])
>
> and then nothing
>
> so ... what is the error I am making?
>
>
>
>
>
>
>> On 5/22/2021 2:49 PM, Ken D'Ambrosio wrote:
>>>> On 22.05.21 18:52, Ken D'Ambrosio wrote:
>>>> ... apologies if this isn't quite the right list, I tried to get the
>>>> right one.
>>>> But, my problem: I'm firing up a Centos 6.5 box > with virt-install,
>>>> [...] and
>>>> it boots fine, etc., etc., but I can't get to the console except
>>>> through vnc;
>>>> "virsh console" just shows a blank screen.
>>>> 1. I think this is absolutely the right list for your issue
>>> Yay. :-)
>>>
>>>> 2. is it really blank? or something like
>>>>
>>>>     Connected to domain '[domain]'
>>>>     Escape character is ^] (Ctrl + ])
>>> Okay, it *does* say those things -- but that's all it says. <CR> gets
>>> me nowhere, as opposed to the other KVM hosts we have running.
>>>
>>>> 3. If I am not mistaken the guest needs to be configured in a
>>>> certain way for
>>>> virsh console [domain] to work. I can't say how though
>>> Hmmm... well, if anyone knows, I'm all ears.
>>>
>>> Thanks for the reply!
>>>
>




More information about the libvirt-users mailing list