« Previous | Next » 

Revision 7dd6dd09

ID7dd6dd09df1e582a3157bce31d6e5c65fc476ed0
Parent 78d67a63
Child 4559fa24

Added by Dimitris Aragiorgis over 9 years ago

(2.13) Support disk hot-add even with chroot or SM

Up until now we did not allow disk hot-add in case of chroot
or pool/user security model because the running QEMU process
does not have access permissions on the disk link.

This patch slightly changes the way we hot-add a disk; before
issuing drive_add and device_add monitor commands we get the
disk's file descriptor and pass it to the QEMU process via SCM
rights (similar with NIC hot-add), by using the QMP monitor
and the add-fd command [1]. It adds the corresponding fd to an
fdset and then we use /dev/fdset/<fdset> for the file attribute
of drive_add command. Please note that we must keep qmp connection
open until after the hot-add takes place, so that hmp can "see" the
fd previously passed (see qemu commit efb87c1).

[1] https://www.redhat.com/archives/libvir-list/2012-July/msg01222.html

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences