mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-25 06:03:52 +03:00
vm_devices_list : also list block devices
This allow scsi disk to be plug|unplug Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
7946e0fa42
commit
f78cc802cf
@ -2876,7 +2876,14 @@ sub vm_devices_list {
|
||||
foreach my $pcibus (@$res) {
|
||||
foreach my $device (@{$pcibus->{devices}}) {
|
||||
next if !$device->{'qdev_id'};
|
||||
$devices->{$device->{'qdev_id'}} = $device;
|
||||
$devices->{$device->{'qdev_id'}} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
my $resblock = vm_mon_cmd($vmid, 'query-block');
|
||||
foreach my $block (@$resblock) {
|
||||
if($block->{device} =~ m/^drive-(\S+)/){
|
||||
$devices->{$1} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user