summaryrefslogtreecommitdiffstats
path: root/src/virt.c
Commit message (Collapse)AuthorAgeFilesLines
* add-domain: Add readonlydisk optional argument (RHBZ#747290).Richard W.M. Jones2011-10-261-17/+91
| | | | | | | | | | | | | | | This optional argument controls how <readonly/> disks in the libvirt XML are handled. It can be set to one of: "write" (default) - add them R/W "read" - add them R/O "error" - throw an error if asked to add them R/W "ignore" - ignore these disks I have added limited regression tests for this feature. However libvirt's test:/// XML does not allow you to specify that a domain starts off shut down, so we cannot fully test this. Instead I tested it by hand.
* libvirt: Detect if a disk has the <readonly/> flag.Richard W.M. Jones2011-10-261-3/+17
| | | | | | This changes the private function guestfs___for_each_disk so that the <readonly/> flag on libvirt disks is detected and passed through to the callback function.
* launch: Store drive information in guestfs_hMatthew Booth2011-10-191-2/+2
| | | | | | | | | | | | | | | | | | This is a NFC on its own, but provides a place-holder for drive metadata which can be used after launch. Fixes by RWMJ: - Fix the tests: this requires a new internal function 'debug-drives' that dumps out the g->drives information so it can be checked in two of the tests. Previously these tests used 'debug-cmdline'. - Test file existence / use_cache_off in the add_drive_opts function, not when launching qemu in the child process. - Call free along error paths. - Add comments.
* add-domain: Add allowuuid flag to allow UUIDs to be used for names.Richard W.M. Jones2011-05-061-1/+11
| | | | | | This makes a backwards-compatible change to the add-domain API. If the optional allowuuid flag is true then UUIDs can be used instead of names in the domain name parameter.
* add-domain: Suppress libvirt errors on stderr.Richard W.M. Jones2011-05-061-0/+12
| | | | | | | | | | | Install an error handler on the libvirt error connection so that errors are not printed on stderr (instead they go up through the usual libguestfs error mechanism). Unfortunately this doesn't suppress initial connection error messages to stderr. I cannot see how to do this without affecting the global libvirt error handler, which is not acceptable for a library to be doing.
* internal: Use size_t instead of int for command line size.Richard W.M. Jones2011-04-301-1/+1
|
* Add documentation for attach method.Richard W.M. Jones2011-02-031-1/+2
|
* Add guestfs_add_domain 'live' flag.Richard W.M. Jones2011-02-031-25/+167
| | | | | | | | | | This optional flag controls whether this API call will try to connect to a running virtual machine 'guestfsd' process. If the flag is given and the virtual machine is running, then the libvirt XML is parsed looking for a suitable <channel> element, and 'guestfs_set_attach_method' is called with the corresponding virtio-serial socket path.
* lib: Fix use-after-free bug in XPath parsing code.Richard W.M. Jones2011-01-281-1/+1
|
* Export private function 'guestfs___for_each_disk' for use by virt-df.Richard W.M. Jones2010-11-251-45/+87
| | | | | | This private function (not part of the API) allows us to iterate over disks from a guest, avoiding the business of writing all the XPath code yet again.
* Fix memory leak (xptype XPath obj) in add-domain API.Richard W.M. Jones2010-11-251-0/+1
|
* New API: add-domainRichard Jones2010-11-111-0/+319
This new API allows you to add the disks from a libvirt domain. In guestfish you can use the 'domain' command to access the API, eg: ><fs> domain Fedora14 libvirturi:qemu:///system 1 The returned number is the number of disks that were added. Also here is a proposed (but commented out) low-level API which would allow you to add a domain from a virDomainPtr. However there are several problems with this API -- see discussion on the list: https://www.redhat.com/archives/libguestfs/2010-November/thread.html#00028