Re: qemu/ftrace question

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

 



On Thu, Jun 22, 2017 at 05:58:52AM +0530, Prasun Ratn wrote:
> >
> > I see writes to fd 2 and 8:-
> >
> 
> Oops, I was using the log backend - 2 is stderr of course.
> 
> With the ftrace backend build, I see this. It looks like qemu must be
> run as root
> 
>         [pid 15759] open("/sys/kernel/debug/tracing/tracing_on",
> O_WRONLY) = -1 EACCES (Permission denied)
>         [pid 15759] open("/dev/null", O_WRONLY) = 10
> 
>         [pid 15759] stat("/var/lib/libvirt/images/generic.qcow2",
> {st_mode=S_IFREG|0644, st_size=21478375424, ...}) = 0
>         [pid 15759] write(10, "bdrv_open_common bs 0x7f77a19cfa"..., 116) = 116
>         [pid 15759] open("/dev/urandom", O_RDONLY) = 15
>         [pid 15759] read(15, "=S\202\372\17\17
> \317\n\201G{\353\300\310\307", 16) = 16
>         [pid 15759] close(15)                   = 0
>         [pid 15759] futex(0x7f779f31d4a8, FUTEX_WAKE, 2147483647) = 0
>         [pid 15759] open("/var/lib/libvirt/images/generic.qcow2",
> O_RDWR|O_CLOEXEC) = 15
>         [pid 15759] fstat(15, {st_mode=S_IFREG|0644,
> st_size=21478375424, ...}) = 0
>         [pid 15759] lseek(15, 0, SEEK_END)      = 21478375424
>         [pid 15759] fstat(15, {st_mode=S_IFREG|0644,
> st_size=21478375424, ...}) = 0
>         [pid 15759] write(10, "bdrv_open_common bs 0x7f77a19c94"..., 117) = 117
> 
> With simple trace backend
>         [pid 27775] open("trace-27775", O_WRONLY|O_CREAT|O_TRUNC,
> 0666) = -1 EACCES (Permission denied)
> 
> I assume, these methods work best when launching qemu directly, as
> compared to using libvirt.

Yes, it's easier if you invoke QEMU yourself.  Usually libvirt is
configured to run QEMU in an environment with reduced privileges
(separate uid/gid, SELinux, etc).  That said, I'm pretty sure you can
change the libvirt configuration so that QEMU is launched as root :).

Stefan

Attachment: signature.asc
Description: PGP signature


[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