Ask Your Question
0

unable to open virsh console for an instance

asked 2013-10-11 01:29:37 -0600

RomilGupta gravatar image

Hi ,

I have a instance running on one of the compute node but I am unable to open console for that particular instance. Any help and suggestion.....

root@havana2-CN2:~# virsh list
 Id    Name                           State
----------------------------------------------------
 2     instance-00000030              running

root@havana2-CN2:~# virsh console 2
Connected to domain instance-00000030
Escape character is ^]
error: internal error character device (null) is not using a PTY
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2016-05-30 08:13:33 -0600

acbharadwaj gravatar image

you can append --devname serial1

since your xml looks like

  <serial type='pty'>
  <source path='/dev/pts/0'/>
  <target port='1'/>
  <alias name='serial1'/>

so,

virsh console --devname serial1 1

edit flag offensive delete link more
0

answered 2013-10-16 01:33:33 -0600

RomilGupta gravatar image

Pls find the output of " Virsh dumpxml 2 "

    <domain type='qemu' id='2'>
  <name>instance-00000030</name>
  <uuid>4a33582b-7a07-4a87-8cd4-37ae582b5439</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <sysinfo type='smbios'>
    <system>
      <entry name='manufacturer'>OpenStack Foundation</entry>
      <entry name='product'>OpenStack Nova</entry>
      <entry name='version'>2013.2</entry>
      <entry name='serial'>423f185b-dd26-7385-63e6-7aeb663bb743</entry>
      <entry name='uuid'>4a33582b-7a07-4a87-8cd4-37ae582b5439</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-model'>
    <model fallback='allow'/>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/nova/instances/4a33582b-7a07-4a87-8cd4-37ae582b5439/disk'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci0'/>
    </controller>
    <interface type='bridge'>
      <mac address='fa:16:3e:2b:7c:03'/>
      <source bridge='qbred89a477-a4'/>
      <target dev='taped89a477-a4'/>
      <model type='virtio'/>
      <driver name='qemu'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='file'>
      <source path='/var/lib/nova/instances/4a33582b-7a07-4a87-8cd4-37ae582b5439/console.log'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='1'/>
      <alias name='serial1'/>
    </serial>
    <console type='file'>
      <source path='/var/lib/nova/instances/4a33582b-7a07-4a87-8cd4-37ae582b5439/console.log'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='apparmor' relabel='yes'>
    <label>libvirt-4a33582b-7a07-4a87-8cd4-37ae582b5439</label>
    <imagelabel>libvirt-4a33582b-7a07-4a87-8cd4-37ae582b5439</imagelabel>
  </seclabel>
</domain>
edit flag offensive delete link more
0

answered 2013-10-11 03:27:21 -0600

Looks like the console is missing. Can you provide the output of "virsh dumpxml 2"?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-10-11 01:29:37 -0600

Seen: 9,968 times

Last updated: May 30 '16