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

Liu, Guang Jun (Gene) Gene.Liu at alcatel-lucent.com
Mon Nov 11 11:34:54 PST 2013


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>



More information about the Users mailing list