Agenda: ex-lvm-scripted-install.htm

File ex-lvm-scripted-install.htm, 68.1 KB (added by admin, 4 years ago)
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5  <meta http-equiv="Content-Style-Type" content="text/css" />
6  <meta name="generator" content="pandoc" />
7  <title>VM image management: Scripted installs and LVM</title>
8  <style type="text/css">code{white-space: pre;}</style>
9  <link href="data:text/css,%2F%2A%0A%20%20%20%20Buttondown%0A%20%20%20%20A%20Markdown%2FMultiMarkdown%2FPandoc%20HTML%20output%20CSS%20stylesheet%0A%20%20%20%20Author%3A%20Ryan%20Gray%0A%20%20%20%20Date%3A%2015%20Feb%202011%0A%20%20%20%20Revised%3A%2021%20Feb%202012%0A%20%20%20%0A%20%20%20%20General%20style%20is%20clean%2C%20with%20minimal%20re%2Ddefinition%20of%20the%20defaults%20or%20%0A%20%20%20%20overrides%20of%20user%20font%20settings%2E%20The%20body%20text%20and%20header%20styles%20are%20%0A%20%20%20%20left%20alone%20except%20title%2C%20author%20and%20date%20classes%20are%20centered%2E%20A%20Pandoc%20TOC%20%0A%20%20%20%20is%20not%20printed%2C%20URLs%20are%20printed%20after%20hyperlinks%20in%20parentheses%2E%20%0A%20%20%20%20Block%20quotes%20are%20italicized%2E%20Tables%20are%20lightly%20styled%20with%20lines%20above%20%0A%20%20%20%20and%20below%20the%20table%20and%20below%20the%20header%20with%20a%20boldface%20header%2E%20Code%20%0A%20%20%20%20blocks%20are%20line%20wrapped%2E%20%0A%20%0A%20%20%20%20All%20elements%20that%20Pandoc%20and%20MultiMarkdown%20use%20should%20be%20listed%20here%2C%20even%20%0A%20%20%20%20if%20the%20style%20is%20empty%20so%20you%20can%20easily%20add%20styling%20to%20anything%2E%0A%20%20%20%20%0A%20%20%20%20There%20are%20some%20elements%20in%20here%20for%20HTML5%20output%20of%20Pandoc%2C%20but%20I%20have%20not%20%0A%20%20%20%20gotten%20around%20to%20testing%20that%20yet%2E%0A%2A%2F%0A%20%0A%2F%2A%20NOTES%3A%0A%20%0A%20%20%20%20Stuff%20tried%20and%20failed%3A%0A%20%20%20%20%0A%20%20%20%20It%20seems%20that%20specifying%20font%2Dfamily%3Aserif%20in%20Safari%20will%20always%20use%20%0A%20%20%20%20Times%20New%20Roman%20rather%20than%20the%20user%27s%20preferences%20setting%2E%0A%20%20%20%20%0A%20%20%20%20Making%20the%20font%20size%20different%20or%20a%20fixed%20value%20for%20print%20in%20case%20the%20screen%20%0A%20%20%20%20font%20size%20is%20making%20the%20print%20font%20too%20big%3A%20Making%20font%2Dsize%20different%20for%20%0A%20%20%20%20print%20than%20for%20screen%20causes%20horizontal%20lines%20to%20disappear%20in%20math%20when%20using%20%0A%20%20%20%20MathJax%20under%20Safari%2E%0A%2A%2F%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Front%20Matter%20%2D%2D%2D%2D%20%2A%2F%0A%20%0A%2F%2A%20Pandoc%20header%20DIV%2E%20Contains%20%2Etitle%2C%20%2Eauthor%20and%20%2Edate%2E%20Comes%20before%20div%23TOC%2E%20%0A%20%20%20Only%20appears%20if%20one%20of%20those%20three%20are%20in%20the%20document%2E%0A%2A%2F%0A%20%0Adiv%23header%2C%20header%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Put%20border%20on%20bottom%2E%20Separates%20it%20from%20TOC%20or%20body%20that%20comes%20after%20it%2E%20%2A%2F%0A%20%20%20%20border%2Dbottom%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%2Etitle%20%2F%2A%20Pandoc%20title%20header%20%28h1%2Etitle%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20%7D%0A%20%0A%2Eauthor%2C%20%2Edate%20%2F%2A%20Pandoc%20author%28s%29%20and%20date%20headers%20%28h2%2Eauthor%20and%20h3%2Edate%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20Pandoc%20table%20of%20contents%20DIV%20when%20using%20the%20%2D%2Dtoc%20option%2E%0A%20%20%20NOTE%3A%20this%20doesn%27t%20support%20Pandoc%27s%20%2D%2Did%2Dprefix%20option%20for%20%23TOC%20and%20%23header%2E%20%0A%20%20%20Probably%20would%20need%20to%20use%20div%5Bid%24%3D%27TOC%27%5D%20and%20div%5Bid%24%3D%27header%27%5D%20as%20selectors%2E%0A%2A%2F%0A%20%0Adiv%23TOC%2C%20nav%23TOC%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Put%20border%20on%20bottom%20to%20separate%20it%20from%20body%2E%20%2A%2F%0A%20%20%20%20border%2Dbottom%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20div%23TOC%2C%20nav%23TOC%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20Don%27t%20display%20TOC%20in%20print%20%2A%2F%0A%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Headers%20and%20sections%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Ah1%2C%20h2%2C%20h3%2C%20h4%2C%20h5%2C%20h6%0A%7B%0A%20%20%20%20font%2Dfamily%3A%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20%22Liberation%20Sans%22%2C%20Calibri%2C%20Arial%2C%20sans%2Dserif%3B%20%2F%2A%20Sans%2Dserif%20headers%20%2A%2F%0A%20%0A%20%20%20%20%2F%2A%20font%2Dfamily%3A%20%22Liberation%20Serif%22%2C%20%22Georgia%22%2C%20%22Times%20New%20Roman%22%2C%20serif%3B%20%2F%2A%20Serif%20headers%20%2A%2F%0A%20%0A%20%20%20%20page%2Dbreak%2Dafter%3A%20avoid%3B%20%2F%2A%20Firefox%2C%20Chrome%2C%20and%20Safari%20do%20not%20support%20the%20property%20value%20%22avoid%22%20%2A%2F%0A%7D%0A%20%0A%2F%2A%20Pandoc%20with%20%2D%2Dsection%2Ddivs%20option%20%2A%2F%0A%20%0Adiv%20div%2C%20section%20section%20%2F%2A%20Nested%20sections%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dleft%3A%202em%3B%20%2F%2A%20This%20will%20increasingly%20indent%20nested%20header%20sections%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Ap%20%7B%7D%0A%20%0Ablockquote%0A%20%20%20%20%7B%20%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20%7D%0A%20%0Ali%20%2F%2A%20All%20list%20items%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ali%20%3E%20p%20%2F%2A%20Loosely%20spaced%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dtop%3A%201em%3B%20%2F%2A%20IE%3A%20lack%20of%20space%20above%20a%20%3Cli%3E%20when%20the%20item%20is%20inside%20a%20%3Cp%3E%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Aul%20%2F%2A%20Whole%20unordered%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aul%20li%20%2F%2A%20Unordered%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aol%20%2F%2A%20Whole%20ordered%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Aol%20li%20%2F%2A%20Ordered%20list%20item%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ahr%20%7B%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Some%20span%20elements%20%2D%2D%2D%20%2A%2F%0A%20%0Asub%20%2F%2A%20Subscripts%2E%20Pandoc%3A%20H%7E2%7EO%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Asup%20%2F%2A%20Superscripts%2E%20Pandoc%3A%20The%202%5End%5E%20try%2E%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aem%20%2F%2A%20Emphasis%2E%20Markdown%3A%20%2Aemphasis%2A%20or%20%5Femphasis%5F%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aem%20%3E%20em%20%2F%2A%20Emphasis%20within%20emphasis%3A%20%2AThis%20is%20all%20%2Aemphasized%2A%20except%20that%2A%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dstyle%3A%20normal%3B%0A%20%20%20%20%7D%0A%20%0Astrong%20%2F%2A%20Markdown%20%2A%2Astrong%2A%2A%20or%20%5F%5Fstrong%5F%5F%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Links%20%28anchors%29%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aa%20%2F%2A%20All%20links%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Keep%20links%20clean%2E%20On%20screen%2C%20they%20are%20colored%3B%20in%20print%2C%20they%20do%20nothing%20anyway%2E%20%2A%2F%0A%20%20%20%20text%2Ddecoration%3A%20none%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20screen%0A%20%20%20%20%7B%0A%20%20%20%20a%3Ahover%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20On%20hover%2C%20we%20indicate%20a%20bit%20more%20that%20it%20is%20a%20link%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20text%2Ddecoration%3A%20underline%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20a%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20In%20print%2C%20a%20colored%20link%20is%20useless%2C%20so%20un%2Dstyle%20it%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20color%3A%20black%3B%0A%20%20%20%20%20%20%20%20background%3A%20transparent%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20a%5Bhref%5E%3D%22http%3A%2F%2F%22%5D%3Aafter%2C%20a%5Bhref%5E%3D%22https%3A%2F%2F%22%5D%3Aafter%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20However%2C%20links%20that%20go%20somewhere%20else%2C%20might%20be%20useful%20to%20the%20reader%2C%0A%20%20%20%20%20%20%20%20%20%20%20so%20for%20http%20and%20https%20links%2C%20print%20the%20URL%20after%20what%20was%20the%20link%20%0A%20%20%20%20%20%20%20%20%20%20%20text%20in%20parens%0A%20%20%20%20%20%20%20%20%2A%2F%0A%20%20%20%20%20%20%20%20content%3A%20%22%20%28%22%20attr%28href%29%20%22%29%20%22%3B%0A%20%20%20%20%20%20%20%20font%2Dsize%3A%2090%25%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Images%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aimg%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Let%20it%20be%20inline%20left%2Fright%20where%20it%20wants%20to%20be%2C%20but%20verticality%20make%20%0A%20%20%20%20%20%20%20it%20in%20the%20middle%20to%20look%20nicer%2C%20but%20opinions%20differ%2C%20and%20if%20in%20a%20multi%2Dline%20%0A%20%20%20%20%20%20%20paragraph%2C%20it%20might%20not%20be%20so%20great%2E%20%0A%20%20%20%20%2A%2F%0A%20%20%20%20vertical%2Dalign%3A%20middle%3B%0A%20%20%20%20%7D%0A%20%0Adiv%2Efigure%20%2F%2A%20Pandoc%20figure%2Dstyle%20image%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Center%20the%20image%20and%20caption%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20auto%3B%0A%20%20%20%20margin%2Dright%3A%20auto%3B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20%7D%0A%20%0Ap%2Ecaption%20%2F%2A%20Pandoc%20figure%2Dstyle%20caption%20within%20div%2Efigure%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Inherits%20div%2Efigure%20props%20by%20default%20%2A%2F%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Code%20blocks%20and%20spans%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Apre%2C%20code%20%0A%20%20%20%20%7B%0A%20%20%20%20background%2Dcolor%3A%20%23fdf7ee%3B%0A%20%20%20%20%2F%2A%20BEGIN%20word%20wrap%20%2A%2F%0A%20%20%20%20%2F%2A%20Need%20all%20the%20following%20to%20word%20wrap%20instead%20of%20scroll%20box%20%2A%2F%0A%20%20%20%20%2F%2A%20This%20will%20override%20the%20overflow%3Aauto%20if%20present%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20pre%2Dwrap%3B%20%2F%2A%20css%2D3%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Dmoz%2Dpre%2Dwrap%20%21important%3B%20%2F%2A%20Mozilla%2C%20since%201999%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Dpre%2Dwrap%3B%20%2F%2A%20Opera%204%2D6%20%2A%2F%0A%20%20%20%20white%2Dspace%3A%20%2Do%2Dpre%2Dwrap%3B%20%2F%2A%20Opera%207%20%2A%2F%0A%20%20%20%20word%2Dwrap%3A%20break%2Dword%3B%20%2F%2A%20Internet%20Explorer%205%2E5%2B%20%2A%2F%0A%20%20%20%20%2F%2A%20END%20word%20wrap%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Apre%20%2F%2A%20Code%20blocks%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Distinguish%20pre%20blocks%20from%20other%20text%20by%20more%20than%20the%20font%20with%20a%20background%20tint%2E%20%2A%2F%0A%20%20%20%20padding%3A%200%2E5em%3B%20%2F%2A%20Since%20we%20have%20a%20background%20color%20%2A%2F%0A%20%20%20%20border%2Dradius%3A%205px%3B%20%2F%2A%20Softens%20it%20%2A%2F%0A%20%20%20%20%2F%2A%20Give%20it%20a%20some%20definition%20%2A%2F%0A%20%20%20%20border%3A%201px%20solid%20%23aaa%3B%0A%20%20%20%20%2F%2A%20Set%20it%20off%20left%20and%20right%2C%20seems%20to%20look%20a%20bit%20nicer%20when%20we%20have%20a%20background%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20%200%2E5em%3B%0A%20%20%20%20margin%2Dright%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0A%40media%20screen%0A%20%20%20%20%7B%0A%20%20%20%20pre%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20On%20screen%2C%20use%20an%20auto%20scroll%20box%20for%20long%20lines%2C%20unless%20word%2Dwrap%20is%20enabled%20%2A%2F%0A%20%20%20%20%20%20%20%20white%2Dspace%3A%20pre%3B%0A%20%20%20%20%20%20%20%20overflow%3A%20auto%3B%0A%20%20%20%20%20%20%20%20%2F%2A%20Dotted%20looks%20better%20on%20screen%20and%20solid%20seems%20to%20print%20better%2E%20%2A%2F%0A%20%20%20%20%20%20%20%20border%3A%201px%20dotted%20%23777%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%0Acode%20%2F%2A%20All%20inline%20code%20spans%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Ap%20%3E%20code%2C%20li%20%3E%20code%20%2F%2A%20Code%20spans%20in%20paragraphs%20and%20tight%20lists%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Pad%20a%20little%20from%20adjacent%20text%20%2A%2F%0A%20%20%20%20padding%2Dleft%3A%20%202px%3B%0A%20%20%20%20padding%2Dright%3A%202px%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Ali%20%3E%20p%20code%20%2F%2A%20Code%20span%20in%20a%20loose%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20We%20have%20room%20for%20some%20more%20background%20color%20above%20and%20below%20%2A%2F%0A%20%20%20%20padding%3A%202px%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Math%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aspan%2Emath%20%2F%2A%20Pandoc%20inline%20math%20default%20and%20%2D%2Djsmath%20inline%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%2F%2A%20Tried%20font%2Dstyle%3Aitalic%20here%2C%20and%20it%20messed%20up%20MathJax%20rendering%20in%20some%20browsers%2E%20Maybe%20don%27t%20mess%20with%20at%20all%2E%20%2A%2F%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Emath%20%2F%2A%20Pandoc%20%2D%2Djsmath%20display%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Aspan%2ELaTeX%20%2F%2A%20Pandoc%20%2D%2Dlatexmathml%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0Aeq%20%2F%2A%20Pandoc%20%2D%2Dgladtex%20math%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Tables%20%2D%2D%2D%2D%20%2A%2F%0A%20%0A%2F%2A%20%20A%20clean%20textbook%2Dlike%20style%20with%20horizontal%20lines%20above%20and%20below%20and%20under%20%0A%20%20%20%20the%20header%2E%20Rows%20highlight%20on%20hover%20to%20help%20scanning%20the%20table%20on%20screen%2E%0A%2A%2F%0A%20%0Atable%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dcollapse%3A%20collapse%3B%0A%20%20%20%20border%2Dspacing%3A%200%3B%20%2F%2A%20IE%206%20%2A%2F%0A%20%0A%20%20%20%20border%2Dbottom%3A%202pt%20solid%20%23000%3B%0A%20%20%20%20border%2Dtop%3A%202pt%20solid%20%23000%3B%20%2F%2A%20The%20caption%20on%20top%20will%20not%20have%20a%20bottom%2Dborder%20%2A%2F%0A%20%0A%20%20%20%20%2F%2A%20Center%20%2A%2F%0A%20%20%20%20margin%2Dleft%3A%20auto%3B%0A%20%20%20%20margin%2Dright%3A%20auto%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Athead%20%2F%2A%20Entire%20table%20header%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dbottom%3A%201pt%20solid%20%23000%3B%0A%20%20%20%20background%2Dcolor%3A%20%23eee%3B%20%2F%2A%20Does%20this%20BG%20print%20well%3F%20%2A%2F%0A%20%20%20%20%7D%0A%20%0Atr%2Eheader%20%2F%2A%20Each%20header%20row%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%20%0A%20%0Atbody%20%2F%2A%20Entire%20table%20%20body%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20Table%20body%20rows%20%2A%2F%0A%20%0Atr%20%20%7B%0A%20%20%20%20%7D%0Atr%2Eodd%3Ahover%2C%20tr%2Eeven%3Ahover%20%2F%2A%20Use%20%2Eodd%20and%20%2Eeven%20classes%20to%20avoid%20styling%20rows%20in%20other%20tables%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20background%2Dcolor%3A%20%23eee%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20Odd%20and%20even%20rows%20%2A%2F%0Atr%2Eodd%20%7B%7D%0Atr%2Eeven%20%7B%7D%0A%20%0Atd%2C%20th%20%2F%2A%20Table%20cells%20and%20table%20header%20cells%20%2A%2F%0A%20%20%20%20%7B%20%0A%20%20%20%20vertical%2Dalign%3A%20top%3B%20%2F%2A%20Word%20%2A%2F%0A%20%20%20%20vertical%2Dalign%3A%20baseline%3B%20%2F%2A%20Others%20%2A%2F%0A%20%20%20%20padding%2Dleft%3A%20%20%200%2E5em%3B%0A%20%20%20%20padding%2Dright%3A%20%200%2E5em%3B%0A%20%20%20%20padding%2Dtop%3A%20%20%20%200%2E2em%3B%0A%20%20%20%20padding%2Dbottom%3A%200%2E2em%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20Removes%20padding%20on%20left%20and%20right%20of%20table%20for%20a%20tight%20look%2E%20Good%20if%20thead%20has%20no%20background%20color%2A%2F%0A%2F%2A%0Atr%20td%3Alast%2Dchild%2C%20tr%20th%3Alast%2Dchild%0A%20%20%20%20%7B%0A%20%20%20%20padding%2Dright%3A%200%3B%0A%20%20%20%20%7D%0Atr%20td%3Afirst%2Dchild%2C%20tr%20th%3Afirst%2Dchild%20%0A%20%20%20%20%7B%0A%20%20%20%20padding%2Dleft%3A%200%3B%0A%20%20%20%20%7D%0A%2A%2F%0A%20%0Ath%20%2F%2A%20Table%20header%20cells%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%20%0A%20%20%20%20%7D%0A%20%0Atfoot%20%2F%2A%20Table%20footer%20%28what%20appears%20here%20if%20caption%20is%20on%20top%3F%29%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0Acaption%20%2F%2A%20This%20is%20for%20a%20table%20caption%20tag%2C%20not%20the%20p%2Ecaption%20Pandoc%20uses%20in%20a%20div%2Efigure%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20caption%2Dside%3A%20top%3B%0A%20%20%20%20border%3A%20none%3B%0A%20%20%20%20font%2Dsize%3A%200%2E9em%3B%0A%20%20%20%20font%2Dstyle%3A%20italic%3B%0A%20%20%20%20text%2Dalign%3A%20center%3B%0A%20%20%20%20margin%2Dbottom%3A%200%2E3em%3B%20%2F%2A%20Good%20for%20when%20on%20top%20%2A%2F%0A%20%20%20%20padding%2Dbottom%3A%200%2E2em%3B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20%2D%2D%2D%2D%20Definition%20lists%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Adl%20%2F%2A%20The%20whole%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%202pt%20solid%20black%3B%0A%20%20%20%20padding%2Dtop%3A%200%2E5em%3B%0A%20%20%20%20border%2Dbottom%3A%202pt%20solid%20black%3B%0A%20%20%20%20%7D%0A%20%0Adt%20%2F%2A%20Definition%20term%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20font%2Dweight%3A%20bold%3B%0A%20%20%20%20%7D%0A%20%0Add%2Bdt%20%2F%2A%202nd%20or%20greater%20term%20in%20the%20list%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%201pt%20solid%20black%3B%0A%20%20%20%20padding%2Dtop%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%20%20%20%0Add%20%2F%2A%20A%20definition%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20margin%2Dbottom%3A%200%2E5em%3B%0A%20%20%20%20%7D%0A%20%0Add%2Bdd%20%2F%2A%202nd%20or%20greater%20definition%20of%20a%20term%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20border%2Dtop%3A%201px%20solid%20black%3B%20%2F%2A%20To%20separate%20multiple%20definitions%20%2A%2F%0A%20%20%20%20%7D%0A%20%20%20%20%0A%2F%2A%20%2D%2D%2D%2D%20Footnotes%20%2D%2D%2D%2D%20%2A%2F%0A%20%0Aa%2Efootnote%2C%20a%2EfootnoteRef%20%7B%20%2F%2A%20Pandoc%2C%20MultiMarkdown%20footnote%20links%20%2A%2F%0A%20%20%20%20font%2Dsize%3A%20small%3B%20%0A%20%20%20%20vertical%2Dalign%3A%20text%2Dtop%3B%0A%7D%0A%20%0Aa%5Bhref%5E%3D%22%23fnref%22%5D%2C%20a%2Ereversefootnote%20%2F%2A%20Pandoc%2C%20MultiMarkdown%2C%20%3F%3F%20footnote%20back%20links%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20a%5Bhref%5E%3D%22%23fnref%22%5D%2C%20a%2Ereversefootnote%20%2F%2A%20Pandoc%2C%20MultiMarkdown%20%2A%2F%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%2F%2A%20Don%27t%20display%20these%20at%20all%20in%20print%20since%20the%20arrow%20is%20only%20something%20to%20click%20on%20%2A%2F%0A%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Efootnotes%20%2F%2A%20Pandoc%20footnotes%20div%20at%20end%20of%20the%20document%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%20%20%20%0Adiv%2Efootnotes%20li%5Bid%5E%3D%22fn%22%5D%20%2F%2A%20A%20footnote%20item%20within%20that%20div%20%2A%2F%0A%20%20%20%20%7B%0A%20%20%20%20%7D%0A%20%0A%2F%2A%20You%20can%20class%20stuff%20as%20%22noprint%22%20to%20not%20print%2E%20%0A%20%20%20Useful%20since%20you%20can%27t%20set%20this%20media%20conditional%20inside%20an%20HTML%20element%27s%20%0A%20%20%20style%20attribute%20%28I%20think%29%2C%20and%20you%20don%27t%20want%20to%20make%20another%20stylesheet%20that%20%0A%20%20%20imports%20this%20one%20and%20adds%20a%20class%20just%20to%20do%20this%2E%0A%2A%2F%0A%20%0A%40media%20print%0A%20%20%20%20%7B%0A%20%20%20%20%2Enoprint%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20display%3Anone%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A" rel="stylesheet" type="text/css" />
10</head>
11<body>
12<div id="header">
13<h1 class="title">VM image management: Scripted installs and LVM</h1>
14</div>
15<div id="TOC">
16<ul>
17<li><a href="#scripted-installs"><span class="toc-section-number">1</span> Scripted installs</a><ul>
18<li><a href="#install-grml-debootstrap"><span class="toc-section-number">1.1</span> Install grml-debootstrap</a></li>
19</ul></li>
20<li><a href="#build-a-vm-image-file"><span class="toc-section-number">2</span> Build a VM image file</a><ul>
21<li><a href="#check-the-image"><span class="toc-section-number">2.1</span> Check the image</a></li>
22<li><a href="#convert-the-image"><span class="toc-section-number">2.2</span> Convert the image</a></li>
23<li><a href="#start-a-vm"><span class="toc-section-number">2.3</span> Start a VM</a></li>
24</ul></li>
25<li><a href="#lvm"><span class="toc-section-number">3</span> LVM</a></li>
26<li><a href="#build-a-vm-filesystem-in-a-logical-volume"><span class="toc-section-number">4</span> Build a VM filesystem in a logical volume</a><ul>
27<li><a href="#examine-the-image"><span class="toc-section-number">4.1</span> Examine the image</a></li>
28<li><a href="#booting-the-image"><span class="toc-section-number">4.2</span> Booting the image</a></li>
29</ul></li>
30<li><a href="#optional-exercises"><span class="toc-section-number">5</span> Optional exercises</a><ul>
31<li><a href="#cloning-virtual-machines"><span class="toc-section-number">5.1</span> Cloning virtual machines</a><ul>
32<li><a href="#duplicate-the-image-file"><span class="toc-section-number">5.1.1</span> Duplicate the image file</a></li>
33<li><a href="#create-a-new-vm-definition"><span class="toc-section-number">5.1.2</span> Create a new VM definition</a></li>
34<li><a href="#patch-up-the-vm"><span class="toc-section-number">5.1.3</span> Patch up the VM</a></li>
35</ul></li>
36<li><a href="#examining-and-modifying-image-files"><span class="toc-section-number">5.2</span> Examining and modifying image files</a><ul>
37<li><a href="#raw-images"><span class="toc-section-number">5.2.1</span> Raw images</a></li>
38<li><a href="#qcow2-images"><span class="toc-section-number">5.2.2</span> qcow2 images</a></li>
39<li><a href="#guestfish-libguestfs"><span class="toc-section-number">5.2.3</span> guestfish / libguestfs</a></li>
40</ul></li>
41</ul></li>
42</ul>
43</div>
44<p>Objectives:</p>
45<ul>
46<li>perform a scripted install for a fully-automatic OS installation</li>
47<li>use LVM commands to create and manage logical volumes</li>
48</ul>
49<p>Most of the actions in this exercise are done as &quot;root&quot;, so if you are not root already type:</p>
50<pre><code>$ sudo -s
51#</code></pre>
52<p>Any set of actions/commands that starts with <code>#</code> is to be run as root and any that starts with a <code>$</code> should be run as the normal class user.</p>
53<h1 id="scripted-installs"><a href="#scripted-installs"><span class="header-section-number">1</span> Scripted installs</a></h1>
54<p>Scripted installs can be used to automate the creation of new VM images, and avoid most of the interactive questions asked during a CD install.</p>
55<p>Under Ubuntu, the tool &quot;python-vm-builder&quot; can be used for this; under Debian the equivalent tool is &quot;grml-debootstrap&quot;, and this is what you will use in this exercise.</p>
56<h2 id="install-grml-debootstrap"><a href="#install-grml-debootstrap"><span class="header-section-number">1.1</span> Install grml-debootstrap</a></h2>
57<pre><code># apt-get install grml-debootstrap</code></pre>
58<p>The configuration settings are available by reading <code>man grml-debootstrap</code> and by looking in the file <code>/etc/debootstrap/config</code></p>
59<h1 id="build-a-vm-image-file"><a href="#build-a-vm-image-file"><span class="header-section-number">2</span> Build a VM image file</a></h1>
60<p><code>grml-debootstrap</code> creates a familiar disk image file, containing an MBR and a partition table, so it can be booted directly. This is the direct equivalent of what we did earlier using virt-manager to install Ubuntu inside our debian hosts.</p>
61<pre><code># grml-debootstrap --vmfile --target /var/lib/libvirt/images/debian1.img \
62    --hostname debian1 -v \
63    --mirror http://apt.ws.nsrc.org:3142/cdn.debian.net/debian</code></pre>
64<p>This will take a few minutes. It builds a raw image, default size 2GB. If you watch carefully, you will see messages about loopback devices like <code>/dev/mapper/loop0p1</code>. This is explained in the optional exercises at the end.</p>
65<p>Near the end of the process you will be prompted for a root password for your new VM.</p>
66<h2 id="check-the-image"><a href="#check-the-image"><span class="header-section-number">2.1</span> Check the image</a></h2>
67<p>This file is &quot;sparse&quot; - the host operating system has only allocated space for blocks which have been written to. You can see this by comparing the size of the file with the disk space allocated to the file.</p>
68<pre><code># ls -lh /var/lib/libvirt/images/debian1.img      # size of file = 2GB
69# ls -sh /var/lib/libvirt/images/debian1.img      # space used &lt; 2GB
70# du -h /var/lib/libvirt/images/debian1.img       # another way to get the same info</code></pre>
71<p>From our terminology presentation this is the sparse disk image that is supported by some filesystems. We had it illustrated thusly:</p>
72<div class="figure">
73<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAABKCAYAAABD9zDJAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ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j0COCXxOzNaPwoFf/eSEaPYF16PqAWi4AIiIAIiIAIiIAIiMBPncDcY8D43RpWtm3btgo2sRYgP3X0qkAEREAEREAEREAEREAELj0C/HECfvi7s2w99vkTfBW7AMHqBKdqrzbytggzhL6oamXoPxEQAREQAREQAREQAREQgUuGAO96TE9Pm/HxcbY5qv95gn/93HPPffDZZ5/Nc91hFyBu0eF+ttASwpe52yaXDDI1VAREQAREQAREQAREQAREwJeAW4CMjY3Zv6XDOyD4e0g34e+y3MSfUecvGea4KsEfHxlBJRn8jYA8XhLpZ0Ym/ul5JREQAREQAREQAREQAREQARHolgAXIfzjzO6vomNNUS2Xy+6BK5O77LLL/lkU5dYiz2SpVLoVGe5hBixGMvwLkvy4BUm3lSqfCIiACIiACIiACIiACIjApU3ArSGwXfDLu7mNGzd+xaE5c+bMaSw87pmamppbobiCLo+2IiACIiACIiACIiACIiACIuBLIOKKZO/evfZdENz56OGCo/HjK1jlREAEREAEREAEREAEREAERGAxgQjPaFVPnTplX/rA+yC1lz8W59J3ERABERABERABERABERABEUiBwILnsVKQJxEiIAIiIAIiIAIiIAIiIAIi0JKAFiAt0eiECIiACIiACIiACIiACIhA2gS0AEmbqOSJgAiIgAiIgAiIgAiIgAi0JKAFSEs0OiECIiACIiACIiACIiACIpA2AS1A0iYqeSIgAiIgAiIgAiIgAiIgAi0JaAHSEo1OiIAIiIAIiIAIiIAIiIAIpE1AC5C0iUqeCIiACIiACIiACIiACIhASwJagLREoxMiIAIiIAIiIAIiIAIiIAJpE9ACJG2ikicCIiACIiACIiACIiACItCSgBYgLdHohAiIgAiIgAiIgAiIgAiIQNoEcmkLlDwREAEREAEREAEREAEREAERyGQyJo5jguB/scnU9rQAIRIlERABERABERABERABERCBVAhw0VGNqyZTrS1A8vl8JpfLZeqLEZPbvXt3dv369XwUq4IUcaWiJAIiIAIiIAIiIAIiIAIiIAJJCXCR0dvbawb6BwzXFdlsltuX8HkdsnI4H+d27NhRwRd+TH9//9Ts7KyJosjdLpnb8rySCIiACIiACIiACIiACIiACLQiwAUI1hR2EYI81b6+vgh3QB5cuXLln+L7MI/lnn766V/HTh6f6cOHD9+K2yOmVCrZWyTc7+vvw+NauisCPkoiIAIiIAIiIAIiIAIiIAIdCHARwrsf/ETZyFSr1Sns8z2QURbN4cvvuUwTExNmenqaJ+2Ko6enxxQKBYNVi+6EkJaSCIiACIiACIiACIiACIhAVwS4xuDr53gfJMsCe/fuzW3durWSGx8ft49fxTgbZaIMntOK3IKEz2wpiYAIiIAIiIAIiIAIiIAIiIAvAawpeIPDnDp1KuadEP4Kll1l8DEru0qpS+Z+4/f6YW1EQAREQAREQAREQAREQAREwJuA/hChNzoVFAEREAEREAEREAEREAERSEpAC5CkxJRfBERABERABERABERABETAm4AWIN7oVFAEREAEREAEREAEREAERCApAS1AkhJTfhEQAREQAREQAREQAREQAW8CWoB4o1NBERABERABERABERABERCBpAS0AElKTPlFQAREQAREQAREQAREQAS8CWgB4o1OBUVABERABERABERABERABJIS0AIkKTHlFwEREAEREAEREAEREAER8CagBYg3OhUUAREQAREQAREQAREQARFISkALkKTElF8EREAEREAEREAEREAERMCbQM67pAqKgAiIgAiIgAiIgAiIgAiIQAcC1WrV3vTYvn17tHv3bqMFSAdgOi0CIiACIiACIiACIiACIpCMQCaTMfxEUcTtNEtjW+JWCxBSUBIBERABERABERABERABEUiFQBzHplgsGmwz3MfC4/pjx44dLJfLA7lcrprDgSpPsjbs24xun9+VREAEREAEREAEREAEREAERKAbArzjMTo6as6ePcu7H3Yxge192Wz2U27NgUVILqpUKlh9GBNXYy5A5mQ37s8d1I4IiIAIiIAIiIAIiIAIiIAItCCAOx3Gri9wHqsLri968L3HZecC5MWBgYFZHKgi82p8ruHCgx/eAdFdEIdKWxEQAREQAREQAREQAREQgU4E3BrCriNq9zawtJi/yZHbvHnzL09MTKwZHh4exa2Su3Dyt2ZmZpgpw1soWKAsuCvSqUKdFwEREAEREAEREAEREAEREAG36OC6opFGDnc/3sABfszJkydf40oFt0i4RLEZX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wsQnoXS9DzbeGRwXui2VkDof6jDDuY7d+4koUSyMUGxVOFAMVaxoaq48ry9bnVC0K3awO7OdLEFJqsT9KmEXH11VfGOLpQpFHKVE6/0rvzExrWn9504V1nBpYnLc7FuXZdhr75qLX6JqJA1O35xhVkxzJ8lbv1LSshufXbr1q2Vug93jWjeze0lkq7LdcrofAoLiCoG50S2cz5Vv9ratirGGU7yb7xu0Nx3+4z588fHzHq8ZsU7SBc8QZer1hQMrnOYe35huXnbmh7YjRcvWmtCezlWPvbDJM4KB7NEjFtrVIuDTh6CbwWT/USyUdbGNcpAEG9XVaJzuL1uhf3N34zb7a+9f/O/uv/YEz8/mS3ciJheRF1pLsIS6VbLHHYX0qPCBUVcX1g9lMczLpnohmt7Zu+549onH/ycMZs2beXVt0QDO+yXwTgV42NwFX1BXSFf3BiYdKxpqLPWo7DIajgWtFuPm/RzyuQ4mEh23eWpQ6JyLNAu8ZEinudFgKS8oJPVBQv3RHZvpw/PObmM7Ul1YnkXsyiK31NIVImy+KgMdxPbD3Mry4ixGDJSUMmKsLpwLzSO1tuVil6Y+Fqf8tTJLjrIOBVl6kLQPiev4uNTBE1R5JSWXriYE5NRnb23T2HBbp9ldXqB/xHMl2fz2fyX/z+mUxij5w6djAAAAABJRU5ErkJggg==" alt="Sparse Disk Image" /><p class="caption">Sparse Disk Image</p>
74</div>
75<p>However, such a file may lose its &quot;sparseness&quot; when copied: that is, it could grow to take 2GB of disk space, with all the unused blocks being filled with zeros.</p>
76<h2 id="convert-the-image"><a href="#convert-the-image"><span class="header-section-number">2.2</span> Convert the image</a></h2>
77<p>If you want the image in a different format, e.g. qcow2, then use <code>qemu-img convert</code> to convert it. This will take a little while as it has to read and rewrite the entire image.</p>
78<pre><code># qemu-img convert -f raw -O qcow2 /var/lib/libvirt/images/debian1.img /var/lib/libvirt/images/debian1.qcow2</code></pre>
79<p>qemu-img is part of the <code>qemu-utils</code> package. <code>-f raw</code> selects the input format and <code>-O qcow2</code> selects the desired output format.</p>
80<p>Once it is finished, compare the file sizes:</p>
81<pre><code># du -sh /var/lib/libvirt/images/debian1.*</code></pre>
82<p>The two image file sizes may be slightly different.</p>
83<p>This qcow2 image is what we illustrated as a growable image file in our terminology presentation:</p>
84<div class="figure">
85<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM8AAABKCAYAAAAc/AA0AAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cA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eaNqdJCWDcEAWrVD8vMyf9Q86/Dl20ORxWFC63+qgodI4PTQmCBSqJhUyXBGLdGOM8N0WekapMF0o4LylD/RK9mDg2KhSd07c8iKGA9PWRdYkef84CMP/qKHCKx8czmPvOCuOlcyfq6tSnSNA8fV0Qi7tPRU7VNYx/UcBD/7w8OUgRuRbMphXB8rAoLGZ5kRfVPqmlmDyLxlg+3Gnlkeq0vKTVYy6qq4K9RuwXzbe6hmanYHPTj2EfoMW8iT07Rq02qdlmGGAGqK25M9UJB30maJVbow5aqCn3NDsBvgFKoC8G0lixfW7ohdMo4rJgDXru6CRkg+HQMW9PYSvC4CQqmaI8l/VnxqDXHKGGFPIsC+JcPCbKJLSsFy+cuWl/5hObP/F7Awyy1cvf+QXwAvIcWAbdsl2Ws81ysQxS3QxRuMWZ4H1sZ4fOnu24ffuLr3/+jRfW/T+sDN2YuyP4XaH6DIEZuooUgkCtCPAA58rF4c2rL56/u7k++NH/AaOO63Styg5WAAAAAElFTkSuQmCC" alt="Growable custom image file" /><p class="caption">Growable custom image file</p>
86</div>
87<h2 id="start-a-vm"><a href="#start-a-vm"><span class="header-section-number">2.3</span> Start a VM</a></h2>
88<p>Finally, to boot this as a VM using libvirt, you need to create a VM inside libvirt and attach the image.</p>
89<p>Rather than write the libvirt XML for this all by hand, you could use the virt-manager GUI, but this time you will use the command line tool &quot;virt-install&quot; to create the machine. You pass a number of parameters telling it the parameters of the machine to build.</p>
90<blockquote>
91<p>Hint: if you are inside the X11 graphical environment then it's better to run this as a regular user, not root, so that it can open the graphical console window for you.</p>
92</blockquote>
93<p>Note: the password below is &quot;xyzzy&quot; when prompted for this to connect to the VM once it is started.</p>
94<pre><code>$ virt-install --name debian1 --ram 512 \
95  --graphics vnc,listen=0.0.0.0,password=xyzzy \
96  --import --disk /var/lib/libvirt/images/debian1.qcow2,format=qcow2 \
97  --network=bridge:br-lan</code></pre>
98<p>This image has a partition table and Grub so it's very easy to boot. However, since it has a partition table inside the image growing it beyond the initial 2GB specified at creation time is not that easy to do.</p>
99<p>When your VM is running, move onto the next section about LVM.</p>
100<h1 id="lvm"><a href="#lvm"><span class="header-section-number">3</span> LVM</a></h1>
101<p>The Logical Volume Manager gives an approach to disk space management which is much more flexible than partitioning.</p>
102<p>First, try each of the following commands to list the logical volumes you have:</p>
103<pre><code># lvscan
104# lvs
105# lvdisplay</code></pre>
106<p>Compare the output - it has differing levels of detail but should show the same logical volumes.</p>
107<p>Have a look at the device nodes:</p>
108<pre><code># ls -l /dev/mapper
109# ls -l /dev/ganeti</code></pre>
110<p>Now create a new logical volume called &quot;foo&quot; (or some other name you choose) inside the &quot;ganeti&quot; volume group:</p>
111<pre><code># lvcreate --size 1G --name foo ganeti</code></pre>
112<p>Use these commands to check that the device node exists, and to see the size of the block device you have created:</p>
113<pre><code># ls -l /dev/ganeti
114# blockdev --getsize64 /dev/ganeti/foo</code></pre>
115<p>Now we can create a filesystem within it, and mount it. MAKE SURE YOU DO THESE OPERATIONS ON THE CORRECT DEVICE NODE - if you write to your root, var or swap volumes you will break your system!</p>
116<pre><code># mkfs.ext4 /dev/ganeti/foo
117# mkdir /opt                 # if /opt already exists, ignore the error
118# mount /dev/ganeti/foo /opt
119# df -h /opt</code></pre>
120<p>You should now be able to create files in /opt if you wish, and they will be stored in this logical volume.</p>
121<pre><code># echo &quot;testing this&quot; &gt; /opt/file1.txt
122# cp /etc/motd /opt
123# mkdir /opt/bin
124# cp -p /bin/ls /opt/bin/.
125# ls -l /opt/*</code></pre>
126<p>Now let's grow the filesystem. This requires two steps: firstly add some extents to the logical volume.</p>
127<pre><code># lvextend --size +1G /dev/ganeti/foo
128# blockdev --getsize64 /dev/ganeti/foo
129# df -h /opt</code></pre>
130<p>You'll see that although the logical volume is bigger, the filesystem is still the same size. You need to resize the filesystem to fill the larger space available. Fortunately, with ext4 you can do this even while the filesystem is mounted:</p>
131<pre><code># resize2fs /dev/ganeti/foo
132# df -h /opt</code></pre>
133<p>Now let's undo everything. Unmount the filesystem and delete the logical volume.</p>
134<pre><code># umount /opt
135# lvremove /dev/ganeti/foo
136# lvscan</code></pre>
137<p>As you can see, creating and destroying logical volumes is a straightforward process. There is plenty of additional LVM documentation online that you can read.</p>
138<p>From the point of view of a virtual machine, a logical volume behaves much like a raw disk image file, but avoids the overhead of going through the host filesystem.</p>
139<h1 id="build-a-vm-filesystem-in-a-logical-volume"><a href="#build-a-vm-filesystem-in-a-logical-volume"><span class="header-section-number">4</span> Build a VM filesystem in a logical volume</a></h1>
140<p>Since you now know how to create logical volumes, you will create one for this image. We will then install debian into it directly treating the volume as a single straight partition.</p>
141<pre><code># lvcreate --size 4G --name debian2 ganeti
142# grml-debootstrap --target /dev/ganeti/debian2 --hostname debian2 -v \
143    --mirror http://apt.ws.nsrc.org:3142/cdn.debian.net/debian</code></pre>
144<p>You will be asked to confirm the settings. If it looks ok, answer <code>y</code>.</p>
145<p>This will take a few minutes. You will see it installing the packages into the filesystem. After the initial confirmation to proceed, the only questions you are asked are to set a root password.</p>
146<p>Once finished, you should see:</p>
147<pre><code> * Finished execution of grml-debootstrap. Enjoy your Debian system.</code></pre>
148<h2 id="examine-the-image"><a href="#examine-the-image"><span class="header-section-number">4.1</span> Examine the image</a></h2>
149<p>When built this way, the logical volume contains a single filesystem (with no partition table), and it is easy to mount and examine, which is very useful.</p>
150<pre><code># mount /dev/ganeti/debian2 /mnt
151# ls /mnt</code></pre>
152<p>Let's make a small change to the filesystem: we will enable the serial console. For a Debian image it's done like this:</p>
153<pre><code># vi /mnt/etc/inittab
154
155---- Uncomment this line (remove the '#' in front of it) ----
156T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100</code></pre>
157<p>Save the change. Finally, unmount the fileystem:</p>
158<pre><code># umount /mnt</code></pre>
159<p>NOTE: to avoid filesystem corruption, it's VERY IMPORTANT that the same block device is not mounted in two places at once. So NEVER mount a volume like this while it is attached to a running VM; and always remember to unmount it before you start a VM which uses it.</p>
160<h2 id="booting-the-image"><a href="#booting-the-image"><span class="header-section-number">4.2</span> Booting the image</a></h2>
161<p>Now we want to boot the image as a VM.</p>
162<p>However there is a problem. Because this image is a straight filesystem, without a partition table, it does not contain a Master Boot Record (MBR) and doesn't have the GRUB boot loader. So it won't boot in the way a normal PC does.</p>
163<p>What we can do instead is to pass KVM two files (a kernel and init ramdisk) stored on the host. KVM will then do the work grub would have done and boot the kernel for us. We will use the same kernel and initrd as is used to boot the Debian host you have built. You will use virt-install as before to set this up.</p>
164<pre><code>$ virt-install --name debian2 --ram 512 \
165  --graphics vnc,listen=0.0.0.0,password=xyzzy \
166  --import --disk /dev/ganeti/debian2 --network=bridge:br-lan \
167  --boot kernel=/vmlinuz,initrd=/initrd.img,kernel_args=&quot;root=/dev/sda&quot;</code></pre>
168<blockquote>
169<p>Hint: If you don't get a console, use your laptop's VNC client to connect. <code>virsh vncdisplay debian2</code> will show you which VNC screen to connect to.</p>
170</blockquote>
171<blockquote>
172<p>Hint: Note the password option above. Password to connect is &quot;xyzzy&quot;</p>
173</blockquote>
174<p><code>kernel_args=&quot;root=/dev/sda&quot;</code> tells the kernel which device to mount as its root filesystem.</p>
175<p>You should now have a running VM using the image you built. If not, ask for help. Remember to do some basic debugging first:</p>
176<pre><code># virsh list
177# virsh dumpxml debian2
178# virsh console debian2</code></pre>
179<h1 id="optional-exercises"><a href="#optional-exercises"><span class="header-section-number">5</span> Optional exercises</a></h1>
180<h2 id="cloning-virtual-machines"><a href="#cloning-virtual-machines"><span class="header-section-number">5.1</span> Cloning virtual machines</a></h2>
181<p>Another approach to creating VMs is to clone one you have already installed. This can be much faster than doing an installation from scratch, but some work may be needed to update the clone before it can be used.</p>
182<p>You need to duplicate the disk image or logical volume, create a new VM definition, start it, and then patch up the new VM.</p>
183<h3 id="duplicate-the-image-file"><a href="#duplicate-the-image-file"><span class="header-section-number">5.1.1</span> Duplicate the image file</a></h3>
184<p>This part is easy! Let's say you have a VM backed by &quot;debian1.qcow2&quot;, and we want to create &quot;debian3.qcow2&quot;; you simply copy it. Make sure the original VM is shutdown first, so its filesystem is in a consistent state.</p>
185<pre><code># virsh shutdown debian1
186# cd /var/lib/libvirt/images
187# cp debian1.qcow2 debian3.qcow2
188# ls -l</code></pre>
189<h3 id="create-a-new-vm-definition"><a href="#create-a-new-vm-definition"><span class="header-section-number">5.1.2</span> Create a new VM definition</a></h3>
190<p>We will take the libvirt XML definition of debian1, and make some minimal changes to make a machine called debian3 with the same parameters.</p>
191<pre><code># cd
192# virsh dumpxml debian1 &gt;debian3.xml
193# vi debian3.xml
194
195-- CHANGE the name
196&lt;name&gt;debian3&lt;/name&gt;
197
198-- DELETE the &lt;uuid&gt;...&lt;/uuid&gt; line
199
200-- CHANGE the source file line
201&lt;source file='/var/lib/libvirt/images/debian3.qcow2'/&gt;
202
203-- DELETE the &lt;mac address='52:54:xx:xx:xx:xx'/&gt; line</code></pre>
204<p>Save and exit from the file.</p>
205<p>Now define the new VM from this file (the missing UUID and MAC address should be assigned automatically).</p>
206<pre><code># virsh define debian3.xml</code></pre>
207<p>If that gives no error, then start your new VM:</p>
208<pre><code># virsh start debian3</code></pre>
209<h3 id="patch-up-the-vm"><a href="#patch-up-the-vm"><span class="header-section-number">5.1.3</span> Patch up the VM</a></h3>
210<p>Get a console onto your new VM (using VNC), and you'll find there are some changes you would need to make.</p>
211<p>Firstly, this host still thinks its name is &quot;debian1&quot;. So you need to edit <code>/etc/hostname</code>, <code>/etc/hosts</code>, <code>/etc/mailname</code> and maybe others.</p>
212<p>Secondly, this host may still be configured with the IP address of debian1. In our case we're using DHCP so it's not a problem, but with static addressing you would have to be very careful to avoid conflicts.</p>
213<p>Thirdly, this host may still remember the MAC address which used to be on <code>eth0</code>, and so call its primary interface something else (like eth1), because it doesn't recognize the MAC address assigned when we did a virsh define - and thinkg it's a new interface.</p>
214<p>If the VM is Ubuntu, check <code>/etc/udev/rules.d/70-persistent-net.rules</code>. If it is CentOS, check for MAC addresses in <code>/etc/sysconfig/network-scripts/ifcfg-eth*</code></p>
215<p>For operating systems like Windows, there may be other things to do such as changing the machine ID in the registry. We do not have time in this workshop to go into details.</p>
216<p>In many cases you will have a local cloning script or utility that takes care of these details for you.</p>
217<h2 id="examining-and-modifying-image-files"><a href="#examining-and-modifying-image-files"><span class="header-section-number">5.2</span> Examining and modifying image files</a></h2>
218<h3 id="raw-images"><a href="#raw-images"><span class="header-section-number">5.2.1</span> Raw images</a></h3>
219<p>It would be very useful if we could look inside an image <em>file</em> to see its contents. The &quot;loop&quot; device lets us attach a file as if it were a block device. However it's slightly awkward because the image we have is not just a filesystem - it's an image of a disk containing a partition table <em>and</em> a filesystem within a partition, which is offset from the beginning of the disk.</p>
220<p>Try running the <code>file</code> command on the <code>debian1.img</code> file:</p>
221<pre><code># file /var/lib/libvirt/images/debian1.img
222
223/var/lib/libvirt/images/debian1.img: x86 boot sector; partition 1: ID=0x83, starthead 0, startsector 4096, 4190208 sectors, code offset 0x31</code></pre>
224<p>This shows it's a PC disk image with a boot sector and partition table.</p>
225<p>(Note: you would not mount the disk image of a running VM to avoid corruption)</p>
226<p>The 'kpartx' utility is able to set up separate loopback devices for each partition contained within the image:</p>
227<pre><code># kpartx -av /var/lib/libvirt/images/debian1.img
228# ls /dev/mapper/loop*</code></pre>
229<p>You should now see you have a device <code>/dev/mapper/loop0p1</code> which is a block device to access the data in partition 1 of the image, and now you can mount the filesystem and look inside:</p>
230<pre><code># mount /dev/mapper/loop0p1 /mnt
231# ls /mnt
232... do whatever you need inside the /mnt directory</code></pre>
233<p><em>IMPORTANT!!</em> As before, once you have finished using the mount, it's vital to unmount it and deconfigure the loopback device - otherwise you risk corruption if you start running a VM on this image at the same time as the host system has it mounted.</p>
234<pre><code># umount /mnt
235# kpartx -d /var/lib/libvirt/images/debian1.img</code></pre>
236<p>If you want to learn more about loopback devices, read the documentation for the <code>losetup</code> tool.</p>
237<h3 id="qcow2-images"><a href="#qcow2-images"><span class="header-section-number">5.2.2</span> qcow2 images</a></h3>
238<p>qcow2 images need to be mounted in a different way, since they are a custom format with a header and data, and the tool to do this is qemu-nbd (network block device). Be sure you stop your debian1 virtual image before mounting its filesystem:</p>
239<pre><code># virsh list --all</code></pre>
240<p>Verify if debian1 is running. If it is, then:</p>
241<pre><code># virsh shutdown debian1</code></pre>
242<p>And, now use the ndb module and qemu-nbd:</p>
243<pre><code># modprobe nbd max_part=4
244# qemu-nbd -c /dev/nbd0 /var/lib/libvirt/images/debian1.qcow2
245# mount /dev/nbd0p1 /mnt
246# ls /mnt
247... do work here
248# umount /mnt
249# qemu-nbd -d /dev/nbd0</code></pre>
250<h3 id="guestfish-libguestfs"><a href="#guestfish-libguestfs"><span class="header-section-number">5.2.3</span> guestfish / libguestfs</a></h3>
251<p>Another tool to access the data inside a VM image is 'guestfish' - the shell frontend to <a href="http://libguestfs.org/">libguestfs</a>. Install it, read the documentation and try it out.</p>
252<pre><code># apt-get install guestfish    # say &quot;Yes&quot; to &quot;Install supermin appliance now&quot;
253# man guestfish</code></pre>
254<p>It works by building a tiny VM (the &quot;supermin appliance&quot;) and running it with the disk image attached. It's especially helpful in complex scenarios, such as when the guest disk is a logical volume but the guest is also using LVM inside that.</p>
255<p>The related package 'libguestfs-tools' includes further tools such as <a href="http://libguestfs.org/virt-resize.1.html">virt-resize</a></p>
256</body>
257</html>