- prepopulate: Use qemu-img to create the output disk.
- Change sizes for 1024x768 screen output.
- Add run script.
- Update notes.
- Misc updates.
400.d/disk.img
500.d/rhel6.img
500.d/win7.img
+600.d/disk.img
600.d/libguestfs-1.16.2.tar.gz
<h1>Library, API, tools</h1>
-<img style="position: absolute; top: 4em; left: 12em;" src="disk.png"/>
-<img style="position: absolute; top: 4em; left: 16em;" src="flash.png"/>
-<img style="position: absolute; top: 4em; left: 20em;" src="file.png"/>
+<img style="position: absolute; top: 4em; left: 12.5em;" src="disk.png"/>
+<img style="position: absolute; top: 4em; left: 16.5em;" src="flash.png"/>
+<img style="position: absolute; top: 4em; left: 20.5em;" src="file.png"/>
<img style="position: absolute; top: 4.75em; left: 12em;" src="arrows1.svg"/>
-<p class="bubble" style="position: absolute; top: 7em; left: 12em; width: 10em;">libguestfs.so</p>
+<p class="bubble" style="position: absolute; top: 7.5em; left: 13em; width: 10em;">libguestfs.so</p>
<img style="position: absolute; top: 9em; left: 12em;" src="arrows2.svg"/>
source functions
+# History.
remember 'ls -l -h'
remember 'file disk.img'
-remember 'guestfish --ro -i -a disk.img'
+remember 'guestfish -a disk.img -i --rw'
echo "Example: Modify a disk image"
echo "Example: Auditing"
remember 'ls -l -h'
-remember 'emacs -nw audit.py'
+remember 'emacs -nw +27 audit.py'
remember './audit.py win7.img'
remember './audit.py rhel6.img'
apps = g.inspect_list_applications (root)
for app in apps:
- if re.search ('firefox', app['app_name'], re.IGNORECASE):
- print ("%s: Firefox version %s" % (disk, app['app_version']))
+ if re.search ('firefox', app['app_name'], re.I):
+ print ("%s: Firefox version %s" %
+ (disk, app['app_version']))
g.umount_all ()
echo "Example: Prepopulate a disk image"
+remember 'ls -l -h'
remember 'emacs -nw prepopulate.py'
remember './prepopulate.py'
remember 'ls -l -h'
cd 600.d
-rm -f disk.img
-
terminal
input = "libguestfs-1.16.2.tar.gz"
output = "disk.img"
-g = guestfs.GuestFS ()
-
-f = open (output, "w")
-f.truncate (512 * 1024 * 1024)
-f.close ()
+os.system ("qemu-img create -f raw %s 512M >/dev/null 2>&1" %
+ output)
+g = guestfs.GuestFS ()
g.add_drive_opts (output, format = "raw", readonly = 0)
g.launch ()
[20 minutes + 5 for questions]
-!!!!! DISPLAY RESOLUTION !!!!!
-
-[BEFORE:
- guestfish -a /dev/null run
- ~/d/techtalk-pse/techtalk-pse
-]
+./run
[Audience is:
- cloud developers
--- /dev/null
+#!/bin/bash -
+# Run the talk.
+
+# Clean up everything.
+
+guestfish -a /dev/null run > /dev/null 2>&1 &
+
+find -name '*~' -delete
+
+rm -f 600.d/disk.img
+
+# Using a local copy of techtalk.
+
+$HOME/d/techtalk-pse/techtalk-pse
body {
background: url(redhat.jpg) no-repeat;
background-position: 98% 0;
- font-size: 24pt;
+ /*font-size: 24pt;*/ /* For max */
+ font-size: 20pt; /* For 1024x768 */
font-family: liberation, helvetica;
}
body td { /* why?? */
- font-size: 28pt;
+ /*font-size: 28pt;*/
+ font-size: 20pt;
}
h1 {
color: rgb(204,0,0);
- font-size: 48px;
+ /*font-size: 48px;*/
+ font-size: 40px;
top: 8;
left: 0;
border-bottom: 2px solid rgb(204,0,0);
p.bubbleinverse {
font-weight: bold;
color: rgb(204,0,0);
- width: 6em;
text-align: center;
background-color: white;
}
table.tools td {
+ font-size: 18pt;
padding-bottom: 0.5em;
padding-right: 0.5em;
}
\ No newline at end of file