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

Liu, Guang Jun (Gene) Gene.Liu at alcatel-lucent.com
Tue Nov 12 06:59:11 PST 2013


Hi Javier,

My fault. :(
You are right, it worked with the correction of the typo.

Thanks very much!

Gene Liu

On Tue 12 Nov 2013 09:34:04 AM EST, Javier Fontan wrote:
> There's a typo, it should read:
>
> <console type="tcp"><source mode="bind"...
>
> not:
>
> <console type="tcp" <source mode="bind"
>
> On Tue, Nov 12, 2013 at 3:21 PM, Liu, Guang Jun (Gene)
> <Gene.Liu at alcatel-lucent.com> wrote:
>> No, it does not. With ERROR like below:
>>
>> Tue Nov 12 09:19:29 2013 [VMM][I]: error: Failed to create domain from
>> /var/lib/one//datastores/0/34/deployment.0
>> Tue Nov 12 09:19:29 2013 [VMM][I]: error: (domain_definition):28: error
>> parsing attribute name
>> Tue Nov 12 09:19:29 2013 [VMM][I]: <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>
>>
>> Thanks,
>> Gene Liu
>>
>> On Tue 12 Nov 2013 04:11:03 AM EST, Javier Fontan wrote:
>>> 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
>>>
>>>
>>>
>
>
>



More information about the Users mailing list