Re: How to show underlying QEMU command line using virsh

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

 



On Wed, 24 May 2017 10:38:42 +0200
Erik Skultety <eskultet@xxxxxxxxxx> wrote:

> On Wed, May 24, 2017 at 10:49:23AM +0300, Roman Storozhenko wrote:
> > Hello, everybody
> >
> > I use virt to run my VM's and QEMU as a hypervisor. There is a file
> > describing my virtual machine:
> >
> > /etc/libvirt/qemu/centos7.0.xml  
> 
> Just a note, never edit ^these files directly behind libvirt's back and always
> use 'virsh edit' for all modifications.
> 
> >
> > As you know it contains xml representation of my VM. Is there any way to
> > show underlying qemu command that virsh runs using that file? For
> > example:  
> 
> virsh doesn't spawn the qemu process, it's a frontend to libvirtd daemon which
> will build the qemu cmdline according to the domain XML description and spawn
> the process. As for the qemu commandline, we don't have an API to query the
> command line, what you can do is get the qemu pid (e.g. with pgrep -f <VM_name>
> and then cat /proc/<pid>/cmdline) or use ps and pipe its output to grep.

Or look in /var/log/libvirt/qemu/centos7.0.log. AFAIK the qemu command
gets logged every time you start the VM.

    Tomas

> 
> Erik
> 
> >
> > qemu-system-x86-64 -m 1024 -smp 2 -...
> >
> > If no, is there any way to figure it out during VM run ?
> >
> > ---
> > Thanks in advance,
> > Roman Storozhenko
> >
> > _______________________________________________
> > libvirt-users mailing list
> > libvirt-users@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/libvirt-users  
> 
> _______________________________________________
> libvirt-users mailing list
> libvirt-users@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvirt-users


-- 
Tomáš Golembiovský <tgolembi@xxxxxxxxxx>

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux