=head2 guestfs_add_cdrom int guestfs_add_cdrom (guestfs_h *handle, const char *filename); This function adds a virtual CD-ROM disk image to the guest. This is equivalent to the qemu parameter C<-cdrom filename>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported by qemu such as C and C URLs. To specify those, use the general C call instead. This function returns 0 on success or -1 on error. =head2 guestfs_add_drive int guestfs_add_drive (guestfs_h *handle, const char *filename); This function adds a virtual machine disk image C to the guest. The first time you call this function, the disk appears as IDE disk 0 (C) in the guest, the second time as C, and so on. You don't necessarily need to be root when using libguestfs. However you obviously do need sufficient permissions to access the filename for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported by qemu such as C and C URLs. To specify those, use the general C call instead. This function returns 0 on success or -1 on error. =head2 guestfs_add_drive_ro int guestfs_add_drive_ro (guestfs_h *handle, const char *filename); This adds a drive in snapshot mode, making it effectively read-only. Note that writes to the device are allowed, and will be seen for the duration of the guestfs handle, but they are written to a temporary file which is discarded as soon as the guestfs handle is closed. We don't currently have any method to enable changes to be committed, although qemu can support this. This is equivalent to the qemu parameter C<-drive file=filename,snapshot=on>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported by qemu such as C and C URLs. To specify those, use the general C call instead. This function returns 0 on success or -1 on error. =head2 guestfs_aug_close int guestfs_aug_close (guestfs_h *handle); Close the current Augeas handle and free up any resources used by it. After calling this, you have to call C again before you can use any other Augeas functions. This function returns 0 on success or -1 on error. =head2 guestfs_aug_defnode struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *handle, const char *name, const char *expr, const char *val); Defines a variable C whose value is the result of evaluating C. If C evaluates to an empty nodeset, a node is created, equivalent to calling C C, C. C will be the nodeset containing that single node. On success this returns a pair containing the number of nodes in the nodeset, and a boolean flag if a node was created. This function returns a C, or NULL if there was an error. I after use>. =head2 guestfs_aug_defvar int guestfs_aug_defvar (guestfs_h *handle, const char *name, const char *expr); Defines an Augeas variable C whose value is the result of evaluating C. If C is NULL, then C is undefined. On success this returns the number of nodes in C, or C<0> if C evaluates to something which is not a nodeset. On error this function returns -1. =head2 guestfs_aug_get char *guestfs_aug_get (guestfs_h *handle, const char *path); Look up the value associated with C. If C matches exactly one node, the C is returned. This function returns a string, or NULL on error. I. =head2 guestfs_aug_init int guestfs_aug_init (guestfs_h *handle, const char *root, int flags); Create a new Augeas handle for editing configuration files. If there was any previous Augeas handle associated with this guestfs session, then it is closed. You must call this before using any other C commands. C is the filesystem root. C must not be NULL, use C instead. The flags are the same as the flags defined in Eaugeas.hE, the logical I of the following integers: =over 4 =item C = 1 Keep the original file with a C<.augsave> extension. =item C = 2 Save changes into a file with extension C<.augnew>, and do not overwrite original. Overrides C. =item C = 4 Typecheck lenses (can be expensive). =item C = 8 Do not use standard load path for modules. =item C = 16 Make save a no-op, just record what would have been changed. =item C = 32 Do not load the tree in C. =back To close the handle, you can call C. To find out more about Augeas, see L. This function returns 0 on success or -1 on error. =head2 guestfs_aug_insert int guestfs_aug_insert (guestfs_h *handle, const char *path, const char *label, int before); Create a new sibling C