Want to list out the files in your virtual machine? Step forward virt-ls:
# virt-ls CentOS5x32 / .autofsck bin boot dev etc [...]
# virt-ls -R CentOS5x32 /etc/httpd modules conf conf/httpd.conf conf/magic run logs conf.d conf.d/welcome.conf conf.d/README conf.d/proxy_ajp.conf
See also: virt-cat, guestfish.
Do you want to suggest an addition to the virt-* tools family? Please comment here or let me know.
Not sure if it’s in already, but how about status monitoring from outside the guest? service status, /proc foo?
Jeroen, thanks for commenting.
General monitoring of guests is something we’ve been thinking long and hard about, and part of that is available with virt-top and with the underlying libvirt APIs which I implemented like virDomainBlockStats and virDomainInterfaceStats. virt-df is also worth mentioning.
A lot of people ask me if we can use (eg.) virt-cat to look at /proc of a guest, but that’s not possible because /proc is a generated filesystem. However we want to implement process lists (virt-ps) and other stats monitoring through the virt-tools project, which uses a small SNMP agent inside the guest and is compatible with Windows guests too. You can grab that code now if you want to play with it or make contributions.
Hi Richard,
thanks for your answer. It gives me a little more insight on how these tools work, I think. Assuming I’m right with what I’m thinking right now, noted I’m often not, would the ultimate way forward not be a channel much like a host kernel enabled communication interface with the guest?
I’m saying this without regard to any Microsoft product that would need to be supported as well; obviously challenges are greater there, and quite frankly I think they just lose.
Either way, what are your thoughts on letting the host (directed by “management” maybe?) monitor the guest(s) for both system & service performance & availability? Possibly even configuration management could be applied through the host? One could centralize a lot more, reduce footprints (in/on the guest) and possibly account for much more resources much more efficiently given accounting features in the manager.
The longer I’m thinking about this, the more I think this isn’t a topic to discuss in a blog post. Are you going to be in Toronto by any chance? ๐
Yes, it would be nice. This is loosely what we might call the “vmchannel problem”. “vmchannel” is the feature we’d all like — a general, non-network specific communications channel between host and guest — but no one can agree what it should look like or implement something that everyone wants.
If we had such a thing obviously monitoring and management would be much easier. But we don’t.
About reducing footprints — take a look at KSM.
Sorry, I won’t be in Toronto in the foreseeable future ๐
How does one get this virt goodness on Debian, Ubuntu, OpenSUSE or Slackware?
See the FAQ. There is a package for Debian already, and that probably works on Ubuntu. We’re looking for people to help package for the other distributions, so join the mailing list if you want to help out.
I suppose you just install Fedora in a libvirt/KVM guest and use it from there via an nfs mount from the host and have fun eh?
๐