<div dir="ltr">Hi<div><br></div><div>I have added channel device to vm already. And viewing vdsm/virt/guestagent.py now.</div><div><br></div><div>Can give me some suggesting.</div><div><br></div><div>Thanks</div><div><br></div><div>Nick Xiao</div><div><br><div class="gmail_quote"><span style="font-size:large;font-weight:bold">Forwarded conversation</span><br>Subject: <b class="gmail_sendername">How to use ovirt-guest-agent without VDSM?</b><br>------------------------<br><br><span><font color="#888">From: <b>Nick Xiao</b> <span dir="ltr"><<a href="mailto:nicks.xiao@gmail.com" target="_blank">nicks.xiao@gmail.com</a>></span><br>Date: 2015-09-09 18:58 GMT+08:00<br>To: <a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a><br></font><br></span><br><div dir="ltr">In my environment i want to use ovirt-ga replace qemu-ga.<div> Hypervisor is Ubuntu 14.04 (OpenStack Icehouse) and the virtual machine is Ubuntu 14.04 cloudimage.</div><div><br></div><div>In Hypervisor launch a instance and attach a chardev, like:</div><div># ps -ef | grep guest_agent<br></div><div>libvirt+ 2649 1 1 Sep08 ? 00:15:36 /usr/bin/qemu-system-x86_64 ...</div><div>-chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/org.qemu.guest_agent.0.instance-00000210.sock,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 ...<br></div><div><br></div><div>In virtual machine was installed ovirt-guest-agent 1.0.11-1.1 and service running OK.</div><div><br></div><div>But i don't know how to get memory usage and other information in hypervisor(OpenStack compute node)? I have failed when i try to use linux command 'socat' and python socket.</div><div><br></div><div>I need some sample or link.</div><div><br></div><div>Thanks a lot!</div><span><font color="#888888"><div><br></div><div>Nick Xiao</div></font></span></div>
<br>----------<br><span><font color="#888">From: <b>Adam Litke</b> <span dir="ltr"><<a href="mailto:alitke@redhat.com" target="_blank">alitke@redhat.com</a>></span><br>Date: 2015-09-09 23:10 GMT+08:00<br>To: Nick Xiao <<a href="mailto:nicks.xiao@gmail.com" target="_blank">nicks.xiao@gmail.com</a>><br>Cc: <a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a><br></font><br></span><br><span>On 09/09/15 18:58 +0800, Nick Xiao wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
In my environment i want to use ovirt-ga replace qemu-ga.<br>
Hypervisor is Ubuntu 14.04 (OpenStack Icehouse) and the virtual machine<br>
is Ubuntu 14.04 cloudimage.<br>
<br>
In Hypervisor launch a instance and attach a chardev, like:<br>
# ps -ef | grep guest_agent<br>
libvirt+ 2649 1 1 Sep08 ? 00:15:36<br>
/usr/bin/qemu-system-x86_64 ...<br>
-chardev<br>
socket,id=charchannel0,path=/var/lib/libvirt/qemu/org.qemu.guest_agent.0.instance-00000210.sock,server,nowait<br>
-device<br>
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0<br>
...<br>
<br>
In virtual machine was installed ovirt-guest-agent 1.0.11-1.1 and service<br>
running OK.<br>
<br>
But i don't know how to get memory usage and other information in<br>
hypervisor(OpenStack compute node)? I have failed when i try to use linux<br>
command 'socat' and python socket.<br>
<br>
I need some sample or link.<br>
</blockquote>
<br></span>
I took a look at the libvirt domain XML from one of my running oVirt<br>
VMs and found the following device:<br>
<br>
<channel type='unix'><br>
<source mode='bind'<br>
path='/var/lib/libvirt/qemu/channels/14182ea9-c01f-428d-ac67-5a7e2639c931.com.redhat.rhevm.vdsm'/><br>
<target type='virtio' name='com.redhat.rhevm.vdsm'<br>
state='disconnected'/><br>
<alias name='channel0'/><br>
<address type='virtio-serial' controller='0' bus='0' port='1'/><br>
</channel><br>
<br>
You might try adding this to your VM. I'm almost certain that<br>
ovirt-ga searches for a device with the name 'com.redhat.rhevm.vdsm'<br>
when starting up. Once you are connected, take a look at<br>
vdsm/virt/guestagent.py in the vdsm source code for hints about how to<br>
talk to the agent.<span><font color="#888888"><br>
<br>
-- <br>
Adam Litke<br>
</font></span><br></div><br></div></div>