[Libvirt-cim] Difference in the value assigned to port field for Xen, KVM, LXC
Deepti B Kalakeri
deeptik at linux.vnet.ibm.com
Tue Jan 27 10:28:20 UTC 2009
Kaitlin Rupert wrote:
> Deepti B Kalakeri wrote:
>> Hi,
>>
>> I am trying to verify the KVMRedirectionSAP. I am seeing difference
>> in the way the port value is getting assigned.
>> I am trying to create a guest using DefineSystem(). Here is the
>> Details of the GraphicsRASD I am passing as part of the
>> ResourceSetting Parameter.
>>
>>
>> KVM_GraphicsResourceAllocationSettingData {
>> InstanceID = "test_redsap_dom/graphics";
>> ResourceType = 24;
>> KeyMap = "en-us";
>> ResourceSubType = "vnc";
>> Address = "127.0.0.1:5931";
>> };
>>
>> My intention is to create a guest whose vnc port has a specific
>> value, ex: 5931 in the above case.
>> Though the guest is getting created, the dumpxml of the guest shows
>> that the port value is getting assigned to -1.
>> Hence the port part of the Address field in GraphicsRASD is set to
>> -1. Hence the port value in the ElementName/Name is supplied as -1.
>
> Hi Deepti,
>
> I'm not clear which virt type you are seeing this issue on. Is this
> with LXC only?
Nopes this is not LXC only issue. I am seeing different problems for
different virt types.
For Xen & LXC:
Though the virsh shows the guest as running the EnabledState value for
Xen and LXC guest is still set to 3 instead of setting a value of 6.
For Xen:
I am not able to create a guest of desired port num for Graphics
information.
And the KVMRedirectionSAP's ElementName/Name is set to -1.
For KVM:
I am able to create a guest of desired port num for Graphics information.
And the KVMRedirectionSAP's ElementName/Name is set to the portnum
supplied to the graphics tag.
Also, the EnabledState value is set appropriately. For ex: when the
guest is running but the vnc session not in active use, it is getting
set to 6 [PS: I did not find the vncserver running on the host].
> I wasn't able to reproduce this use. See below for the steps I
> followed. Let me know if these steps don't work for you.
>
>
>> Also, though the virsh shows the guest as running the EnabledState
>> value for Xen and LXC guest is still set to 3 instead of setting a
>> value of 6.
>>
>
> The EnabledState of the KVMRedirectionSAP changes whenever the
> connection is available. In this case, you'll need to be running a
> VNC server on your guest in order for the EnabledState to
> active/available. Otherwise, the KVMRedirectionSAP is offline.
What steps will you follow to verify the EnabledState in the available
state value ?
>
> ===================================
>
> Steps to define an LXC guest with vnc graphics console:
>
> 1) Open file and define XML with the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <CIM CIMVERSION="2.0" DTDVERSION="2.0">
> <MESSAGE ID="5" PROTOCOLVERSION="1.0">
> <SIMPLEREQ>
> <METHODCALL NAME="DefineSystem">
> <LOCALINSTANCEPATH>
> <LOCALNAMESPACEPATH>
> <NAMESPACE NAME="root"/><NAMESPACE NAME="virt"/>
> </LOCALNAMESPACEPATH>
> <INSTANCENAME CLASSNAME="LXC_VirtualSystemManagementService">
> <KEYBINDING NAME="CreationClassName">
> <KEYVALUE
> VALUETYPE="string">LXC_VirtualSystemManagementService</KEYVALUE>
> </KEYBINDING>
> <KEYBINDING NAME="SystemName">
> <KEYVALUE VALUETYPE="string">hostname</KEYVALUE>
> </KEYBINDING>
> </INSTANCENAME>
> </LOCALINSTANCEPATH>
> <PARAMVALUE NAME="SystemSettings" PARAMTYPE="string">
> <VALUE>
> instance of LXC_VirtualSystemSettingData {
> CreationClassName = "LXC_VirtualSystemSettingData";
> VirtualSystemIdentifier = "test";
> ElementName = "test";
> VirtualSystemType = "LXC";
> AutomaticShutdownAction = 2;
> AutomaticRecoveryAction = 3;
> BootDevice = "hd";
> };
> </VALUE>
> </PARAMVALUE>
> <PARAMVALUE NAME="ResourceSettings" PARAMTYPE="string">
> <VALUE.ARRAY>
> <VALUE>
> instance of LXC_GraphicsResourceAllocationSettingData {
> InstanceID = "test/graphics";
> ResourceType = 24;
> KeyMap = "en-us";
> ResourceSubType = "vnc";
> Address = "127.0.0.1:5931";
> };
> </VALUE>
> </VALUE.ARRAY>
> </PARAMVALUE>
>
> </METHODCALL>
> </SIMPLEREQ>
> </MESSAGE>
> </CIM>
With what command did you execute the above XML.
>
> 2) Check the defined guest:
>
> $ virsh -c lxc:///system dumpxml test
>
> <domain type='lxc'>
> <name>test</name>
> <uuid>46c027c3-d143-4b37-97c3-ac86c9c3bca6</uuid>
> <memory>0</memory>
> <currentMemory>0</currentMemory>
> <vcpu>0</vcpu>
> <os>
> <type arch='x86_64'>exe</type>
> <init>/bin/false</init>
> </os>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>restart</on_crash>
> <devices>
> <console type='pty'>
> <target port='0'/>
> </console>
> <input type='mouse' bus='xen'/>
> <graphics type='vnc' port='5931' autoport='no' listen='127.0.0.1'
> keymap='en-us'/>
> </devices>
> </domain>
>
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list