diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-10-05 14:56:35 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-10-08 20:04:53 +0100 |
commit | 18b7f09f366d518050f467d0944c81c82fd5e39e (patch) | |
tree | 6f89801dec73c60eb05cc01160544d76782e454a /fish | |
parent | 7786d56db8c22413949f98ef6b15fe0ea367d195 (diff) | |
download | libguestfs-18b7f09f366d518050f467d0944c81c82fd5e39e.tar.gz libguestfs-18b7f09f366d518050f467d0944c81c82fd5e39e.tar.xz libguestfs-18b7f09f366d518050f467d0944c81c82fd5e39e.zip |
Add support for hotplugging (adding disks) to the libvirt attach-method.
When libvirt is used, we can allow disks to be hotplugged.
guestfs_add_drive can be called after launch to hot-add a disk.
When a disk is hot-added, we first ask libvirt to add the disk to the
appliance, then we make an internal call into the appliance to get it
to wait for the disk to appear (ie. udev_settle ()).
Hot-added disks are tracked in the g->drives array.
This also adds a test.
Diffstat (limited to 'fish')
-rw-r--r-- | fish/alloc.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fish/alloc.c b/fish/alloc.c index f6e5b8ff..7454fb73 100644 --- a/fish/alloc.c +++ b/fish/alloc.c @@ -72,11 +72,6 @@ alloc_disk (const char *filename, const char *size_str, int add, int sparse) if (parse_size (size_str, &size) == -1) return -1; - if (!guestfs_is_config (g)) { - fprintf (stderr, _("can't allocate or add disks after launching\n")); - return -1; - } - fd = open (filename, O_WRONLY|O_CREAT|O_NOCTTY|O_TRUNC|O_CLOEXEC, 0666); if (fd == -1) { perror (filename); |