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.
PS: I have used values between 5900 - 5999 for the port field in the
graphics part.
Here is the Xen XML details obtained from the debug statement.
<domain type="xen">
<name>test_redsap_dom</name>
<on_poweroff>destroy</on_poweroff>
<on_crash>destroy</on_crash>
<uuid>125f39c4-e0f0-4b2d-bb84-891700639af0</uuid>
<os>
<type>linux</type>
<kernel>/tmp/default-xen-kernel</kernel>
<initrd>/tmp/default-xen-initrd</initrd>
<cmdline/>
</os>
<currentMemory>131072</currentMemory>
<memory>131072</memory>
<vcpu>1</vcpu>
<devices>
<disk type="file" device="disk">
<source file="/tmp/default-xen-dimage"/>
<target dev="xvda"/>
</disk>
<interface type="network">
<mac address="11:22:33:aa:bb:cc"/>
<source network="cimtest-networkpool"/>
</interface>
<input type="mouse" bus="xen"/>
<graphics type="vnc" port="5931" listen="127.0.0.1"
keymap="en-us"/>
</devices>
</domain>
But I am able to create a guest with a port of my desired value for KVM.
For KVM I am able to get appropriate value for the port in the Address
and the ElementName/Name field of the GraphicsRASD/KVMRedirectionSAP.
Here is the XML used for creating KVM guest.
<domain type="kvm">
<name>test_redsap_dom</name>
<on_poweroff>destroy</on_poweroff>
<on_crash>destroy</on_crash>
<uuid>c1c5c50b-52ce-4ba3-868e-dee42708063a</uuid>
<os>
<type>hvm</type>
<boot dev="hd"/>
</os>
<currentMemory>131072</currentMemory>
<memory>131072</memory>
<vcpu>1</vcpu>
<devices>
<disk type="file" device="disk">
<source file="/tmp/default-kvm-dimage"/>
<target dev="hda"/>
</disk>
<interface type="network">
<mac address="11:22:33:aa:bb:cc"/>
<source network="cimtest-networkpool"/>
</interface>
<input type="mouse" bus="ps2"/>
<graphics type="vnc" port="5948" listen="127.0.0.1"
keymap="en-us"/>
</devices>
</domain>
In case of LXC I am able to assign port value of choice and able to get
the desired value in the Address and the ElementName/Name fields for the
defined guest.
But the problem with the LXC is that value of the rport in the
ElementName/Name and Address is getting set to -1 even when guest is
started.
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.
LXC:
<domain type='lxc'>
<name>test_redsap_dom</name>
<uuid>05e67d5e-7702-46c4-a90b-2f416001f95b</uuid>
<memory>131072</memory>
<currentMemory>131072</currentMemory>
<vcpu>0</vcpu>
<os>
<type arch='x86_64'>exe</type>
<init>/tmp/cimtest_lxc_init</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<filesystem type='mount'>
<source dir='/tmp/lxc_files'/>
<target dir='/tmp'/>
</filesystem>
<console type='pty' tty='/dev/pts/3'>
<source path='/dev/pts/3'/>
<target port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5914' autoport='no'
listen='127.0.0.1'
keymap='en-us'/>
</devices>
</domain>
Please let me know if there is something which I have missed.
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com