Re: Shared value between host and guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-01-26 09:03 AM, Stefan Hajnoczi wrote:
>
> The QEMU -uuid <uuid> option makes a UUID available to the guest via
> SMBIOS and fw_cfg on x86.  Inside the guest you can print it like this:
>
>   # dmidecode -s system-uuid
>   01020304-0506-0708-090A-0B0C0D0E0F10
>
> Maybe you can base the guest trace filename off the UUID:
>
>   guest-01020304-0506-0708-090A-0B0C0D0E0F10-trace-001.dat
>
> On the host you can either find the UUIDs in the libvirt domain XML:
>
>   # virsh dump my-domain
>   <domain ...>
>     <uuid>0102030405060708090a0b0c0d0e0f10</uuid>
>     ...
>
> Or you can use the kvm.ko uevent to find the QEMU PID and then check
> /proc/$PID/cmdline for the uuid.  The UUID can also be fetched via the
> query-uuid QMP command if you don't want to search /proc/$PID/cmdline
> for -uuid <uuid>.
>
> Maybe you can base the host trace filename off the UUID too:
>
>   host-01020304-0506-0708-090A-0B0C0D0E0F10-trace-001.dat
>
> Then the ask of correlating traces becomes pretty easy for
> post-processing scripts since they can look at the filenames.
>
> Stefan
I think this approach would work. Requiring users to set a uuid to their
VM if they plan on tracing it doesn't seem too bad a requirement.

Thanks for your help,
Geneviève



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux