X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=contrib%2Fintro%2Flibguestfs-intro.html;fp=contrib%2Fintro%2Flibguestfs-intro.html;h=fe1e833b7d2b43a52cda3e98e4c2358bc9c8f9bf;hp=67bdf9b25ca7a22f4f429b9e90daeb43e1e96ba0;hb=7828f4dfe3d5ff4d086261218908c8da37bb9d97;hpb=8bc6e9d6a89672bbe1e7469774abe889354deb67 diff --git a/contrib/intro/libguestfs-intro.html b/contrib/intro/libguestfs-intro.html index 67bdf9b..fe1e833 100644 --- a/contrib/intro/libguestfs-intro.html +++ b/contrib/intro/libguestfs-intro.html @@ -179,16 +179,28 @@ get_blkid_tag (const char *device, const char *tag) - + + -
+
-guestfish -N fs -m /dev/sda1 <<EOF
-  mkdir /etc
-  upload /etc/resolv.conf /etc/resolv.conf
-  write /etc/hostname "test01.redhat.com"
+guestfish -N bootrootlv:/dev/VG/LV:ext4:ext4:10G:256M <<EOF
+  mount-options "" /dev/VG/LV /
+  mkdir /boot
+  mount-options "" /dev/sda1 /boot
+  txz-in filesystem.tar.xz /
+  write /etc/HOSTNAME "test01.example.com\n"
+  upload /etc/resolv.conf /etc/resolv.conf
 EOF
+guestmount -a test1.img -i mnt/
+ls mnt
+bin   dev  home        lib         mnt       proc  sbin  tmp  var
+boot  etc  initrd.img  lost+found  old-root  root  sys   usr  vmlinuz
+cat mnt/etc/HOSTNAME
+test01.example.com
+fusermount -u mnt
 
-

manual ...

-
+

manual for guestfish ...
+manual for guestmount ...

+
 virt-df -a /dev/vg/F15x32 -h
 Filesystem                    Size  Used Available Use%
@@ -196,14 +208,30 @@ F15x32:/dev/sda1              484M   31M      428M   7%
 F15x32:/dev/vg_f15x32/lv_root 5.5G  3.4G      1.8G  63%
 

manual ...

+
+
+virt-cat -c qemu:///system -d WinXP 'c:\boot.ini'
+[boot loader]
+timeout=30
+default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
+[operating systems]
+multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=
+"Microsoft Windows XP Professional" /noexecute=optin
+/fastdetect
+
+

manual ...

+
 virt-edit -c qemu:///system -d F15x32 /etc/passwd
-(launches editor)
+(launches text editor to edit guest /etc/passwd)
+
+virt-edit -c qemu:///system -d F15x32 /etc/passwd \
+  -e 's/^root:.*?:/root::/'
 

manual ...

-
+
 virt-win-reg -c qemu:///system --unsafe-printable-strings \
   Win7x32 'HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters' \
@@ -217,8 +245,20 @@ F15x32:/dev/vg_f15x32/lv_root 5.5G  3.4G      1.8G  63%
     

Inspection

-$ virt-inspector -c qemu:///system -d Win7x32
+$ virt-filesystems -c qemu:///system -d Win7x32 --all --long -h --uuid
+Name      Type       VFS  Label           MBR Size Parent   UUID
+/dev/sda1 filesystem ntfs System Reserved -   100M -        F81C92571C92112C
+/dev/sda2 filesystem ntfs -               -   20G  -        F2E8996AE8992E3B
+/dev/sda1 partition  -    -               07  100M /dev/sda -
+/dev/sda2 partition  -    -               07  20G  /dev/sda -
+/dev/sda  device     -    -               -   20G  -        -
+
+

+manual ... +

+
+$ virt-inspector -c qemu:///system -d Win7x32
 <?xml version="1.0"?>
 <operatingsystems>
   <operatingsystem>
@@ -235,18 +275,10 @@ $ virt-inspector -c qemu:///system -d Win7x32
     <hostname>win7x32</hostname>
 ... etc ...
 
-

full XML ...

- - - - -
- Click to enlarge the images -
- - - -
+

+full XML ...
+manual ... +

   char **roots;
@@ -290,15 +322,47 @@ $ virt-inspector -c qemu:///system -d Win7x32
 

full source ...

+ + + +
+ Click to enlarge the images +
+ + + +
+ + + + +

Graphical browsers

+ +

+ +

+

+ +

+

+ +

-

V2V & P2V

+

+ +

+

source ...

+

+ +

+

source ...

-

Read more ...

+

Find out more ...

libguestfs.org is the @@ -318,6 +382,11 @@ $ virt-inspector -c qemu:///system -d Win7x32 local man command.

+

+ For information about virt-v2v and virt-p2v, see + http://libguestfs.org/virt-v2v/ +

+