3

I am debugging a problem with a libvirt VM starting, and I want to see the exact command line that it is going to use to start qemu. Is this possible using virsh or some other utility?

Jonathon Reinhart
  • 3,384
  • 12
  • 35
  • 54

3 Answers3

4

You can consult the libvirt logs in:

/var/log/libvirt/qemu/$vmname.log

Source: https://fedoraproject.org/wiki/Windows_Virtio_Drivers

Jonathon Reinhart
  • 3,384
  • 12
  • 35
  • 54
2

Just saw this question. In the hope it helps others, the easiest way to see the qemu command that was used, while the VM is running, is:

ps -ef | grep qemu-system-x86
powerhouse
  • 131
  • 2
  • Thanks but this doesn't help. Like I said in the question, I was trying to debug a VM that wouldn't start. The qemu process exited immediately, so looking at the running process list doesn't show what I was looking for. – Jonathon Reinhart Sep 01 '18 at 12:25
2

It is also possible using virsh with the domxml-to-native subcommand:

virsh domxml-to-native qemu-argv --domain mydomain
Kevinoid
  • 156
  • 1
  • 3