Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/1545#issuecomment-219152627
  
    @swill Yes, running this in production on our cloud
    
    I just started an Instance and the Agent (backport to 4.8, clean merge) 
produced this XML:
    
    ```
    <domain type='kvm'>
    <name>i-2-25-VM</name>
    <uuid>bd93ca81-d976-41be-823c-6fc0ea013111</uuid>
    <description>Ubuntu 12.04 (64-bit)</description>
    <cpu mode='host-passthrough'></cpu><sysinfo type='smbios'>
    <system>
    <entry name='manufacturer'>Apache Software Foundation</entry>
    <entry name='product'>CloudStack KVM Hypervisor</entry>
    <entry name='uuid'>bd93ca81-d976-41be-823c-6fc0ea013111</entry>
    </system>
    </sysinfo>
    <os>
    <type  arch='x86_64' machine='pc'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
    </os>
    <on_reboot>restart</on_reboot>
    <on_poweroff>destroy</on_poweroff>
    <on_crash>destroy</on_crash>
    <memory>4194304</memory>
    <devices>
    <memballoon model='none'/>
    </devices>
    <vcpu>2</vcpu>
    <features>
    <pae/>
    <apic/>
    <acpi/>
    </features>
    <cputune>
    <shares>1000</shares>
    </cputune>
    <clock offset='utc'>
    <timer name='kvmclock' >
    </timer>
    </clock>
    <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <interface type='bridge'>
    <source bridge='cloudbr0'/>
    <mac address='06:73:12:00:00:67'/>
    <model type='virtio'/>
    <bandwidth>
    <inbound average='128000' peak='128000'/>
    <outbound average='128000' peak='128000'/>
    </bandwidth>
    </interface>
    <console type='pty'>
    <target port='0'/>
    </console>
    <disk  device='disk' type='network'>
    <driver name='qemu' type='raw' cache='writeback' />
    <source  protocol='rbd' 
name='rbd-c01-p01/d70d7e6e-753d-4a0e-ad5f-ec8ac531e32b'>
    <host name='monitor.ceph.XXXX.XXXX.XXXXX.nl' port='6789'/>
    </source>
    <auth username='cloudstack'>
    <secret type='ceph' uuid='5e34fd37-1763-3092-9f51-280a31bdb36f'/>
    </auth>
    <target dev='vda' bus='virtio'/>
    <serial>d70d7e6e753d4a0ead5f</serial></disk>
    <disk  device='disk' type='network'>
    <driver name='qemu' type='raw' cache='writeback' />
    <source  protocol='rbd' 
name='rbd-c01-p01/3fcb9970-cf63-4251-b1b9-2d916f6ab1c6'>
    <host name='monitor.ceph.XXXXX.XXXXXX.XXXXXX.nl' port='6789'/>
    </source>
    <auth username='cloudstack'>
    <secret type='ceph' uuid='5e34fd37-1763-3092-9f51-280a31bdb36f'/>
    </auth>
    <target dev='vdb' bus='virtio'/>
    <serial>3fcb9970cf634251b1b9</serial></disk>
    <disk  device='cdrom' type='file'>
    <driver name='qemu' type='raw' cache='none' />
    <source file=''/>
    <target dev='hdc' bus='ide'/>
    </disk>
    <serial type='pty'>
    <target port='0'/>
    </serial>
    <graphics type='vnc' autoport='yes' listen='10.5.0.106' passwd='XXXXXXXX'/>
    <channel type='unix'>
    <source mode='bind' 
path='/var/lib/libvirt/qemu/i-2-25-VM.org.qemu.guest_agent.0'/>
    <address type='virtio-serial'/>
    <target type='virtio' name='org.qemu.guest_agent.0'/>
    </channel>
    <input type='tablet' bus='usb'/>
    </devices>
    </domain>
    ```
    
    There you see this channel added:
    
    ```
    <channel type='unix'>
    <source mode='bind' 
path='/var/lib/libvirt/qemu/i-2-25-VM.org.qemu.guest_agent.0'/>
    <address type='virtio-serial'/>
    <target type='virtio' name='org.qemu.guest_agent.0'/>
    </channel>
    ```
    
    In the Ubuntu 14.04 the Guest Agent is running:
    
    <pre>
    root@vhosting-relay:~# ps aux|grep qemu
    root      2789  0.0  0.0  17468   700 ?        Ss   22:19   0:00 
/usr/sbin/qemu-ga --daemonize -m virtio-serial -p 
/dev/virtio-ports/org.qemu.guest_agent.0
    root      2890  0.0  0.0  10460   908 pts/6    S+   22:20   0:00 grep qemu
    root@vhosting-relay:~#
    </pre>
    
    From the HV I can send commands through libvirt:
    
    <pre>
    [root@n06 ~]# virsh qemu-agent-command i-2-25-VM '{"execute":"guest-ping"}'
    {"return":{}}
    
    [root@n06 ~]#
    </pre>
    
    I also re-started a Console Proxy which has a additional channel, that 
works as well:
    
    ```
    <channel type='unix'>
    <source mode='bind' path='/var/lib/libvirt/qemu/v-215-VM.agent'/>
    <address type='virtio-serial'/>
    <target type='virtio' name='v-215-VM.vport'/>
    </channel>
    <channel type='unix'>
    <source mode='bind' 
path='/var/lib/libvirt/qemu/v-215-VM.org.qemu.guest_agent.0'/>
    <address type='virtio-serial'/>
    <target type='virtio' name='org.qemu.guest_agent.0'/>
    </channel>
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to