[pve-devel] vm_deviceunplug question

Alexandre DERUMIER aderumier at odiso.com
Tue Nov 25 10:37:10 CET 2014


>>I cannot see that: 
>>
>>3001 if ($deviceid =~ m/^(scsi)(\d+)$/) { 
>>3002 return undef if !qemu_devicedel($vmid, $deviceid); 
>>3003 return undef if !qemu_drivedel($vmid, $deviceid); 
>>3004 } 

>>so you also remove the device using qemu_devicedel()? 
>>What do I miss? 


for virtio:

-device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa
-drive file=/var/lib/vz/images/115/vm-115-disk-34.raw,if=none,id=drive-virtio4,format=raw,aio=native,cache=none,detect-zeroes=on

we remove virtio-blk-pci device and drive. (so we check that the pci device|controller is unplugged - need acpi hotplug)


for scsi:

-device virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5 
-drive file=/var/lib/vz/images/115/vm-115-disk-34.raw,if=none,id=drive-scsi0
-device scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0


we remove scsi-hd device and drive. (this is not a pci device|controler,so we don't need to check if removal is ok).




----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mardi 25 Novembre 2014 10:10:45 
Objet: RE: vm_deviceunplug question 

> This is because for virtio disk we remove the controller + drive, (1controller - 1 
> drive) 
> 
> and for scsi we only remove the drive (1controller - 256 drives) 

I cannot see that: 

3001 if ($deviceid =~ m/^(scsi)(\d+)$/) { 
3002 return undef if !qemu_devicedel($vmid, $deviceid); 
3003 return undef if !qemu_drivedel($vmid, $deviceid); 
3004 } 

so you also remove the device using qemu_devicedel()? 
What do I miss? 



More information about the pve-devel mailing list