Added guestfish recipes.
[libguestfs.git] / recipes / clone.example
1 $ clone.sh /tmp/test.img /tmp/new.img /dev/sda1 192.168.1.1 newmachine
2 204800+0 records in
3 204800+0 records out
4 104857600 bytes (105 MB) copied, 2.02821 s, 51.7 MB/s
5 write-file /etc/resolv.conf "nameserver 192.168.1.1" 0
6 write-file /etc/HOSTNAME "newmachine" 0
7 sync
8
9 $ guestfish -a /tmp/new.img -m /dev/sda1
10
11 Welcome to guestfish, the libguestfs filesystem interactive shell for
12 editing virtual machine filesystems.
13
14 Type: 'help' for help with commands
15       'quit' to quit the shell
16
17 ><fs> cat /etc/resolv.conf 
18 nameserver 192.168.1.1
19 ><fs> cat /etc/HOSTNAME
20 newmachine