Import old talks from 2010 and 2011 (Boston).
[libguestfs-talks.git] / 2010 / vm.tex
1 \documentclass{article}
2 \usepackage[utf8]{inputenc}
3 \usepackage{tikz}
4 \usetikzlibrary{arrows,positioning,fit,shapes,calc,trees}
5
6 \usepackage{verbatim}
7 \usepackage[active,tightpage]{preview}
8 \PreviewEnvironment{tikzpicture}
9 \setlength\PreviewBorder{5pt}%
10
11 \begin{document}
12
13 \tikzset{
14   every node/.style = {
15     fill = red!30, rounded corners,
16     font = \fontfamily{cmss}\Huge,
17     minimum width = 0.8in, minimum height = 0.7in
18   },
19   edge from parent/.style = { red, -, thick, draw },
20   level 1/.style = { sibling distance = 6in, level distance = 1in },
21   level 2/.style = { sibling distance = 1.6in },
22   level 3/.style = { sibling distance = 1.5in },
23   host/.style = {
24     fill=green!40
25   },
26   hdisk/.style = {
27     cylinder, draw, aspect=0.7,
28     text width = 2.2in,
29   },
30   hnet/.style = {
31     rectangle, draw,
32   },
33   hdisplay/.style = {
34     rectangle, draw,
35   },
36   hostline/.style = {
37     ultra thick, dashed, green
38   },
39 }
40
41 \begin{tikzpicture}
42
43 % Tree of emulated devices.
44
45 \begin{scope}[edge from parent fork down]
46
47 \node { emulation }
48   child { node { motherboard }
49     child { node { cpu }
50       child { node { insns } }
51       child { node { registers } }
52     }
53     child { node { memory } }
54   }
55   child { node { devices }
56     child { node (disk) { disk } }
57     child { node { usb } }
58     child { node (net) { net } }
59     child { node { timer } }
60     child { node (display) { display } }
61   };
62
63 \end{scope}
64
65 % Corresponding host devices.
66
67 \node [host, hdisk, below=of disk, yshift=-2in] (hdisk)
68       { Host file \\ ``disk.img'' };
69
70 \node [host, hnet, below=of net, yshift=-2in] (hnet) { Host vnet0 };
71
72 \node [host, hdisplay, below=of display, yshift=-2in] (hdisplay) { VNC };
73
74 \draw [hostline] (disk.south) -- (hdisk.north);
75
76 \draw [hostline] (net.south) -- (hnet.north);
77
78 \draw [hostline] (display.south) -- (hdisplay.north);
79
80 \end{tikzpicture}
81 \end{document}