[one-users] How to use RAW section in VM tempalte

Javier Fontan jfontan at opennebula.org
Tue Nov 12 01:11:03 PST 2013


Even if it creates a new devices section it should work. We've been
doing just that (adding serial console) this way in the past.

Doesn't it work?

On Mon, Nov 11, 2013 at 8:34 PM, Liu, Guang Jun (Gene)
<Gene.Liu at alcatel-lucent.com> wrote:
> Hi there,
>
> I have a need to define serial (and serial over tcp) in KVM VMs. I
> understood I can use RAW to specify in a template. However I the data is
> not just appended within the <domain> section, not merged into the
> <devices> section.
>
> My input of the "RAW" is like this:
>
> RAW=[DATA="<devices><serial type=\"tcp\"><source mode=\"bind\"
> host=\"0.0.0.0\" service=\"4056\"/><protocol type=\"telnet\"/><target
> port=\"0\"/></serial><console type=\"tcp\" <source mode=\"bind\"
> host=\"0.0.0.0\" service=\"4056\"/><protocol type=\"telnet\"/><target
> type=\"serial\" port=\"0\"/></console></devices>",TYPE="kvm"]
>
> And I got the deployment.0 as below which is not right. Can anyone help
> to give me suggestions?
>
> Thanks very much,
>
> Gene
>
>
> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
>     <name>one-33</name>
>     <cputune>
>         <shares>1024</shares>
>     </cputune>
>     <memory>2097152</memory>
>     <os>
>         <type arch='x86_64'>hvm</type>
>         <boot dev='network'/>
>     </os>
>     <devices>
>         <emulator>/usr/libexec/qemu-kvm</emulator>
>         <disk type='file' device='disk'>
>             <source file='/var/lib/one//datastores/0/33/disk.0'/>
>             <target dev='hda'/>
>             <driver name='qemu' type='qcow2' cache='none' io='native'/>
>         </disk>
>         <interface type='bridge'>
>             <source bridge='br1'/>
>             <mac address='de:ad:5f:01:38:01'/>
>             <model type='virtio'/>
>         </interface>
>         <graphics type='vnc' listen='0.0.0.0' port='5933'/>
>     </devices>
>     <features>
>         <acpi/>
>     </features>
>     <devices><serial type="tcp"><source mode="bind" host="0.0.0.0"
> service="4056"/><protocol type="telnet"/><target
> port="0"/></serial><console type="tcp" <source mode="bind"
> host="0.0.0.0" service="4056"/><protocol type="telnet"/><target
> type="serial" port="0"/></console></devices>
> </domain>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



-- 
Javier Fontán Muiños
Developer
OpenNebula - The Open Source Toolkit for Data Center Virtualization
www.OpenNebula.org | @OpenNebula | github.com/jfontan



More information about the Users mailing list