Skip to content

console: add option to launch telnet session#297

Merged
retspen merged 1 commit intoretspen:masterfrom
EmbeddedAndroid:master
May 5, 2014
Merged

console: add option to launch telnet session#297
retspen merged 1 commit intoretspen:masterfrom
EmbeddedAndroid:master

Conversation

@EmbeddedAndroid
Copy link
Copy Markdown
Contributor

Over the coming months I would like to add supporting features to webvirtmgr needed for ARM KVM hosts. This is the first piece needed to make webvirtmgr useful with ARM hosts. As of right now, there is no video/graphic devices supported on ARM guests, and so VNC cannot be used for console. The best solution to control the virtual machine is to redirect the serial console over telnet.

<serial type='tcp'>
  <source mode='bind' host='0.0.0.0' service='4555'/>
  <protocol type='telnet'/>
  <target port='0'/>
  <alias name='serial0'/>
</serial>
<console type='tcp'>
  <source mode='bind' host='0.0.0.0' service='4555'/>
  <protocol type='telnet'/>
  <target type='serial' port='0'/>
  <alias name='serial0'/>
</console>

This change adds the option to launch a telnet console session if one exists.

Here is a quick demo of this feature:

https://docs.google.com/file/d/0B9DbsE2BbZ7uWmNnTHQxYW1IZVE/edit

@retspen
Copy link
Copy Markdown
Owner

retspen commented May 5, 2014

Thanks for pull request! A have question about ARM. What do you use it for?

retspen added a commit that referenced this pull request May 5, 2014
console: add option to launch telnet session
@retspen retspen merged commit 8767891 into retspen:master May 5, 2014
@EmbeddedAndroid
Copy link
Copy Markdown
Contributor Author

At this point I am using Samsung Chromebooks. You can enable hardware acceleration using this guide here:

https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-discuss/aKvYIQDok-4

If you want to try the images out, you can grab them here:

http://images.armcloud.us/linaro/kvm/ (convert qcow2 -> raw)

Here is my working config:

  <domain type='kvm'>
  <name>arm-kvm-01</name>
  <uuid>851826aa-6926-779f-2f17-626140141412</uuid>
  <description>None</description>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='armv7l' machine='vexpress-a15'>hvm</type>
    <kernel>/var/lib/libvirt/images/zImage</kernel>
    <cmdline>root=/dev/vda2 rw rootwait mem=768M console=ttyAMA0 38400n8</cmdline>
    <dtb>/var/lib/libvirt/images/vexpress-v2p-ca15-tc1.dtb</dtb>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-arm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/linaro-14.04-ubuntu-nano-01.img'/>
      <target dev='vda' bus='virtio'/>
      <address type='virtio-mmio'/>
    </disk>
    <controller type='ide' index='0'/>
    <interface type='network'>
      <mac address='52:54:00:d2:d8:75'/>
      <source network='bridged'/>
      <model type='virtio'/>
      <address type='virtio-mmio'/>
    </interface>
    <serial type='tcp'>
      <source mode='bind' host='0.0.0.0' service='4555'/>
      <protocol type='telnet'/>
      <target port='0'/>
    </serial>
    <console type='tcp'>
      <source mode='bind' host='0.0.0.0' service='4555'/>
      <protocol type='telnet'/>
      <target type='serial' port='0'/>
    </console>
    <memballoon model='virtio'>
      <address type='virtio-mmio'/>
    </memballoon>
  </devices>
  </domain>

@retspen
Copy link
Copy Markdown
Owner

retspen commented May 5, 2014

How do you think, maybe add this to github wiki?

@EmbeddedAndroid
Copy link
Copy Markdown
Contributor Author

Sure will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants