mirror of
https://github.com/retspen/webvirtmgr.git
synced 2026-04-25 23:55:57 +03:00
[PR #296] [MERGED] enable blockstats for network disks #609
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/retspen/webvirtmgr/pull/296
Author: @EmbeddedAndroid
Created: 4/29/2014
Status: ✅ Merged
Merged: 4/29/2014
Merged by: @retspen
Base:
master← Head:master📝 Commits (1)
4ca0e0eenable blockstats for network disks📊 Changes
1 file changed (+6 additions, -0 deletions)
View changed files
📝
vrtManager/instance.py(+6 -0)📄 Description
Reading through the libvirt API I found that it is possible to retrieve block stats from network disks.
'dev_file' is assumed to be the path to the virtual hard disk which is gathered from the source element. However, network disks do not have a 'dev' or 'file' attribute as documented here:
http://libvirt.org/formatdomain.html#elementsDisks
Libvirt:blockStats will not only accept a path to the virtual disk, but also a target block device such as 'vdz'. This change set detects a network disk, and set dev_file = dev_bus in only that case.
I've tested this change locally, and disk usage is shown for both virtual machines with physical virtual hard disks, and network (rbd) disks! It would be nice if anyone else using a network disk to test if this and validate that is working for them as well.
Here is a picture of disk usage reporting for a network disk:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.