guestfs_h *g;
int read_only = 1;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
*/
assert (read_only == 1);
assert (inspector == 1);
+ assert (live == 0);
/* User must specify at least one filename on the command line. */
if (optind >= argc || argc - optind < 1)
guestfs_h *g;
int read_only = 1;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
*/
assert (read_only == 1);
assert (inspector == 0);
+ assert (live == 0);
/* Must be no extra arguments on the command line. */
if (optind != argc)
guestfs_h *g;
int read_only = 1;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
*/
assert (read_only == 1);
assert (inspector == 1);
+ assert (live == 0);
/* User must specify at least one directory name on the command line. */
if (optind >= argc || argc - optind < 1)
guestfs_h *g;
int read_only = 1;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
*/
assert (read_only == 1);
assert (inspector == 0);
+ assert (live == 0);
/* Must be no extra arguments on the command line. */
if (optind != argc)
guestfs_h *g;
int read_only = 0;
+int live = 0;
int quit = 0;
int verbose = 0;
int remote_control_listen = 0;
" -i|--inspector Automatically mount filesystems\n"
" --keys-from-stdin Read passphrases from stdin\n"
" --listen Listen for remote commands\n"
+ " --live Connect to a live virtual machine\n"
" -m|--mount dev[:mnt] Mount dev on mnt (if omitted, /)\n"
" -n|--no-sync Don't autosync\n"
" -N|--new type Create prepared disk (test1.img, ...)\n"
{ "inspector", 0, 0, 'i' },
{ "keys-from-stdin", 0, 0, 0 },
{ "listen", 0, 0, 0 },
+ { "live", 0, 0, 0 },
{ "mount", 1, 0, 'm' },
{ "new", 1, 0, 'N' },
{ "no-dest-paths", 0, 0, 'D' },
format = optarg;
} else if (STREQ (long_options[option_index].name, "csh")) {
remote_control_csh = 1;
+ } else if (STREQ (long_options[option_index].name, "live")) {
+ live = 1;
} else {
fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
program_name, long_options[option_index].name, option_index);
Fork into the background and listen for remote commands. See section
L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below.
+=item B<--live>
+
+Connect to a live virtual machine.
+(Experimental, see L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>).
+
=item B<-m dev[:mountpoint]>
=item B<--mount dev[:mountpoint]>
void
inspect_mount (void)
{
+ if (live) {
+ fprintf (stderr, _("%s: don't use --live and -i options together\n"),
+ program_name);
+ exit (EXIT_FAILURE);
+ }
+
inspect_do_decrypt ();
char **roots = guestfs_inspect_os (g);
/* Provided by guestfish or guestmount. */
extern guestfs_h *g;
extern int read_only;
+extern int live;
extern int verbose;
extern int inspector;
extern int keys_from_stdin;
optargs.bitmask |= GUESTFS_ADD_DOMAIN_READONLY_BITMASK;
optargs.readonly = 1;
}
+ if (live) {
+ optargs.bitmask |= GUESTFS_ADD_DOMAIN_LIVE_BITMASK;
+ optargs.live = 1;
+ }
return guestfs_add_domain_argv (g, guest, &optargs);
}
guestfs_h *g = NULL;
int read_only = 0;
+int live = 0;
int verbose = 0;
int inspector = 0;
int keys_from_stdin = 0;
" -i|--inspector Automatically mount filesystems\n"
" --help Display help message and exit\n"
" --keys-from-stdin Read passphrases from stdin\n"
+ " --live Connect to a live virtual machine\n"
" -m|--mount dev[:mnt] Mount dev on mnt (if omitted, /)\n"
" -n|--no-sync Don't autosync\n"
" -o|--option opt Pass extra option to FUSE\n"
{ "help", 0, 0, HELP_OPTION },
{ "inspector", 0, 0, 'i' },
{ "keys-from-stdin", 0, 0, 0 },
+ { "live", 0, 0, 0 },
{ "mount", 1, 0, 'm' },
{ "no-sync", 0, 0, 'n' },
{ "option", 1, 0, 'o' },
keys_from_stdin = 1;
} else if (STREQ (long_options[option_index].name, "echo-keys")) {
echo_keys = 1;
+ } else if (STREQ (long_options[option_index].name, "live")) {
+ live = 1;
} else {
fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
program_name, long_options[option_index].name, option_index);
Read key or passphrase parameters from stdin. The default is
to try to read passphrases from the user by opening C</dev/tty>.
+=item B<--live>
+
+Connect to a live virtual machine.
+(Experimental, see L<guestfs(3)/ATTACHING TO RUNNING DAEMONS>).
+
=item B<-m dev[:mnt]> | B<--mount dev[:mnt]>
Mount the named partition or logical volume on the given mountpoint
guestfs_h *g;
int read_only = 1;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
*/
assert (read_only == 1);
assert (inspector == 1);
+ assert (live == 0);
/* Must be no extra arguments on the command line. */
if (optind != argc)
guestfs_h *g;
int read_only = 0;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
assert (inspector == 0);
assert (keys_from_stdin == 0);
assert (echo_keys == 0);
+ assert (live == 0);
/* Must be no extra arguments on the command line. */
if (optind != argc)