ce7ed1dfed5b166462d0b80571382d974c04a1f3
[libguestfs.git] / edit / virt-edit.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 virt-edit - Edit a file in a virtual machine
6
7 =head1 SYNOPSIS
8
9  virt-edit [--options] -d domname file [file ...]
10
11  virt-edit [--options] -a disk.img [-a disk.img ...] file [file ...]
12
13  virt-edit [-d domname|-a disk.img] file -e 'expr'
14
15 Old-style:
16
17  virt-edit domname file
18
19  virt-edit disk.img [disk.img ...] file
20
21 =head1 WARNING
22
23 You must I<not> use C<virt-edit> on live virtual machines.  If you do
24 this, you risk disk corruption in the VM.  C<virt-edit> tries to stop
25 you from doing this, but doesn't catch all cases.
26
27 =head1 DESCRIPTION
28
29 C<virt-edit> is a command line tool to edit C<file> where each C<file>
30 exists in the named virtual machine (or disk image).
31
32 Multiple filenames can be given, in which case they are each edited in
33 turn.  Each filename must be a full path, starting at the root
34 directory (starting with '/').
35
36 If you want to just view a file, use L<virt-cat(1)>.
37
38 For more complex cases you should look at the L<guestfish(1)> tool
39 (see L</USING GUESTFISH> below).
40
41 C<virt-edit> cannot be used to create a new file.  L<guestfish(1)> can
42 do that and much more.
43
44 =head1 EXAMPLES
45
46 Edit the named files interactively:
47
48  virt-edit -d mydomain /boot/grub/grub.conf
49
50  virt-edit -d mydomain /etc/passwd
51
52 For Windows guests, some Windows paths are understood:
53
54  virt-edit -d mywindoma