Merge lp:~ted-m-cox/serverguide/virtualization_punctuation into lp:serverguide/trunk
- virtualization_punctuation
- Merge into trunk
Proposed by
Ted Cox
Status: | Merged |
---|---|
Approved by: | Doug Smythies |
Approved revision: | 250 |
Merged at revision: | 251 |
Proposed branch: | lp:~ted-m-cox/serverguide/virtualization_punctuation |
Merge into: | lp:serverguide/trunk |
Diff against target: |
226 lines (+31/-39) 1 file modified
serverguide/C/virtualization.xml (+31/-39) |
To merge this branch: | bzr merge lp:~ted-m-cox/serverguide/virtualization_punctuation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Doug Smythies | Approve | ||
Review via email: mp+258447@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'serverguide/C/virtualization.xml' | |||
2 | --- serverguide/C/virtualization.xml 2014-12-18 23:05:34 +0000 | |||
3 | +++ serverguide/C/virtualization.xml 2015-05-07 04:56:37 +0000 | |||
4 | @@ -112,9 +112,9 @@ | |||
5 | 112 | 112 | ||
6 | 113 | <para>Yet another way to install an Ubuntu virtual machine is to use | 113 | <para>Yet another way to install an Ubuntu virtual machine is to use |
7 | 114 | <application>uvtool</application>. | 114 | <application>uvtool</application>. |
9 | 115 | This application, available as of 14.04 allows you to set up | 115 | This application, available as of 14.04, allows you to set up |
10 | 116 | specific VM options, execute custom post-install scripts, etc. For | 116 | specific VM options, execute custom post-install scripts, etc. For |
12 | 117 | details see <xref linkend="cloud-images-and-uvtool"/></para> | 117 | details see <xref linkend="cloud-images-and-uvtool"/>.</para> |
13 | 118 | 118 | ||
14 | 119 | <para>Libvirt can also be configured work with | 119 | <para>Libvirt can also be configured work with |
15 | 120 | <application>Xen</application>. For details, see the Xen Ubuntu | 120 | <application>Xen</application>. For details, see the Xen Ubuntu |
16 | @@ -198,7 +198,7 @@ | |||
17 | 198 | 198 | ||
18 | 199 | <para>After launching <application>virt-install</application> you can | 199 | <para>After launching <application>virt-install</application> you can |
19 | 200 | connect to the virtual machine's console either locally using a GUI (if | 200 | connect to the virtual machine's console either locally using a GUI (if |
21 | 201 | your server has a GUI), or via a remote VNC client from a GUI based | 201 | your server has a GUI), or via a remote VNC client from a GUI-based |
22 | 202 | computer.</para> | 202 | computer.</para> |
23 | 203 | </sect2> | 203 | </sect2> |
24 | 204 | 204 | ||
25 | @@ -433,7 +433,7 @@ | |||
26 | 433 | </listitem> | 433 | </listitem> |
27 | 434 | 434 | ||
28 | 435 | <listitem> | 435 | <listitem> |
30 | 436 | <para>The <ulink url="http://virt-manager.et.redhat.com/">Virtual | 436 | <para>The <ulink url="http://virt-manager.org/">Virtual |
31 | 437 | Machine Manager</ulink> site has more information on | 437 | Machine Manager</ulink> site has more information on |
32 | 438 | <application>virt-manager</application> development.</para> | 438 | <application>virt-manager</application> development.</para> |
33 | 439 | </listitem> | 439 | </listitem> |
34 | @@ -466,8 +466,7 @@ | |||
35 | 466 | <sect2 id="cloud-image-introduction" status="review"> | 466 | <sect2 id="cloud-image-introduction" status="review"> |
36 | 467 | <title>Introduction</title> | 467 | <title>Introduction</title> |
37 | 468 | 468 | ||
40 | 469 | <para>With Ubuntu being one of the most used operating systems on most of | 469 | <para>With Ubuntu being one of the most used operating systems on many cloud platforms, the availability of stable and secure cloud images |
39 | 470 | the cloud platforms, the availability of stable and secure cloud images | ||
41 | 471 | has become very important. As of 12.04 the utilization of cloud | 470 | has become very important. As of 12.04 the utilization of cloud |
42 | 472 | images outside of a cloud infrastructure has been improved. It is now | 471 | images outside of a cloud infrastructure has been improved. It is now |
43 | 473 | possible to use those images to create a virtual machine without the | 472 | possible to use those images to create a virtual machine without the |
44 | @@ -486,7 +485,7 @@ | |||
45 | 486 | <sect3> | 485 | <sect3> |
46 | 487 | <title>Uvtool packages</title> | 486 | <title>Uvtool packages</title> |
47 | 488 | 487 | ||
49 | 489 | <para>The following packages and their dependancies will be required | 488 | <para>The following packages and their dependencies will be required |
50 | 490 | in order to use uvtool:</para> | 489 | in order to use uvtool:</para> |
51 | 491 | 490 | ||
52 | 492 | <para/> | 491 | <para/> |
53 | @@ -502,8 +501,7 @@ | |||
54 | 502 | 501 | ||
55 | 503 | </itemizedlist> | 502 | </itemizedlist> |
56 | 504 | 503 | ||
59 | 505 | <para>Installation of <application>uvtool</application> is done the same as | 504 | <para>To install <application>uvtool</application>, run:</para> |
58 | 506 | for any other application by using apt-get:</para> | ||
60 | 507 | <programlisting>$ apt-get -y install uvtool</programlisting> | 505 | <programlisting>$ apt-get -y install uvtool</programlisting> |
61 | 508 | 506 | ||
62 | 509 | <para>This will install uvtool's main commands: </para> | 507 | <para>This will install uvtool's main commands: </para> |
63 | @@ -523,7 +521,7 @@ | |||
64 | 523 | 521 | ||
65 | 524 | <programlisting>$ uvt-simplestreams-libvirt sync arch=amd64</programlisting> | 522 | <programlisting>$ uvt-simplestreams-libvirt sync arch=amd64</programlisting> |
66 | 525 | 523 | ||
68 | 526 | <para>After an amount of time required to download all the images from the internet, you will have | 524 | <para>After an amount of time required to download all the images from the Internet, you will have |
69 | 527 | a complete set of cloud images stored locally. To see what has been downloaded use the following | 525 | a complete set of cloud images stored locally. To see what has been downloaded use the following |
70 | 528 | command:</para> | 526 | command:</para> |
71 | 529 | 527 | ||
72 | @@ -545,9 +543,7 @@ | |||
73 | 545 | <sect3> | 543 | <sect3> |
74 | 546 | <title>Create the VM using uvt-kvm</title> | 544 | <title>Create the VM using uvt-kvm</title> |
75 | 547 | 545 | ||
79 | 548 | <para>In order to be able to connect to the virtual machine once it has been created, it is necessary to have a | 546 | <para>In order to connect to the virtual machine once it has been created, you must have a valid SSH key available for the Ubuntu user. If your environment does not have an SSH key, you can easily create one using the following command:</para> |
77 | 549 | valid SSH key available for the ubuntu user. If your environment does not have a ssh key, you can easily create | ||
78 | 550 | one using the following command:</para> | ||
80 | 551 | 547 | ||
81 | 552 | <programlisting> | 548 | <programlisting> |
82 | 553 | $ ssh-keygen | 549 | $ ssh-keygen |
83 | @@ -572,18 +568,17 @@ | |||
84 | 572 | | E | | 568 | | E | |
85 | 573 | +-----------------+ | 569 | +-----------------+ |
86 | 574 | </programlisting> | 570 | </programlisting> |
89 | 575 | <para>The creation of a new virtual machine using uvtool is easy. In its simplest form, | 571 | <para>To create of a new virtual machine using uvtool, run the following in a terminal:</para> |
88 | 576 | you only need to do:</para> | ||
90 | 577 | 572 | ||
91 | 578 | <programlisting>$ uvt-kvm create firsttest</programlisting> | 573 | <programlisting>$ uvt-kvm create firsttest</programlisting> |
92 | 579 | 574 | ||
93 | 580 | <para>This will create a VM named <emphasis role="bold">firsttest</emphasis> using the current LTS cloud image available locally. | 575 | <para>This will create a VM named <emphasis role="bold">firsttest</emphasis> using the current LTS cloud image available locally. |
95 | 581 | If you want to specify a release to be used to create the VM, you need to use the <emphasis role="bold">release=</emphasis> filter</para> | 576 | If you want to specify a release to be used to create the VM, you need to use the <emphasis role="bold">release=</emphasis> filter:</para> |
96 | 582 | 577 | ||
97 | 583 | <programlisting>$ uvt-kvm create secondtest release=trusty</programlisting> | 578 | <programlisting>$ uvt-kvm create secondtest release=trusty</programlisting> |
98 | 584 | 579 | ||
101 | 585 | <para>The <application>uvt-kvm wait {name}</application> can be used to wait until the creation of | 580 | <para><application>uvt-kvm wait</application> can be used to wait until the creation of |
102 | 586 | the VM has completed</para> | 581 | the VM has completed:</para> |
103 | 587 | 582 | ||
104 | 588 | <programlisting>$ uvt-kvm wait secondttest --insecure | 583 | <programlisting>$ uvt-kvm wait secondttest --insecure |
105 | 589 | Warning: secure wait for boot-finished not yet implemented; use --insecure. | 584 | Warning: secure wait for boot-finished not yet implemented; use --insecure. |
106 | @@ -591,16 +586,14 @@ | |||
107 | 591 | </sect3> | 586 | </sect3> |
108 | 592 | 587 | ||
109 | 593 | <sect3><title>Connect to the running VM</title> | 588 | <sect3><title>Connect to the running VM</title> |
111 | 594 | <para>Once the virtual machine creation is completed, you can connect to it using ssh: | 589 | <para>Once the virtual machine creation is completed, you can connect to it using SSH: |
112 | 595 | </para> | 590 | </para> |
113 | 596 | 591 | ||
114 | 597 | <programlisting>$ uvt-kvm ssh secondtest --insecure</programlisting> | 592 | <programlisting>$ uvt-kvm ssh secondtest --insecure</programlisting> |
115 | 598 | 593 | ||
118 | 599 | <para>For the time being, the <emphasis role="bold">--insecure</emphasis> is required so you should be | 594 | <para>For the time being, the <emphasis role="bold">--insecure</emphasis> is required, so use this mechanism to connect to your VM only if you completely trust your network infrastructure.</para> |
117 | 600 | using this mechanism to connect to your VM only if you completely trust your network infrastructure</para> | ||
119 | 601 | 595 | ||
122 | 602 | <para>You can also connect to your VM using a regular ssh session using the IP address of the VM. The address | 596 | <para>You can also connect to your VM using a regular SSH session using the IP address of the VM. The address can be queried using the following command:</para> |
121 | 603 | can be queried using the following command: </para> | ||
123 | 604 | 597 | ||
124 | 605 | <programlisting> | 598 | <programlisting> |
125 | 606 | $ uvt-kvm ip secondtest | 599 | $ uvt-kvm ip secondtest |
126 | @@ -629,7 +622,7 @@ | |||
127 | 629 | </sect3> | 622 | </sect3> |
128 | 630 | 623 | ||
129 | 631 | <sect3><title>Get the list of running VMs</title> | 624 | <sect3><title>Get the list of running VMs</title> |
131 | 632 | <para>You can get the list of VM running on your system with this command:</para> | 625 | <para>You can get the list of VMs running on your system with this command:</para> |
132 | 633 | 626 | ||
133 | 634 | <programlisting>$ uvt-kvm list | 627 | <programlisting>$ uvt-kvm list |
134 | 635 | secondtest | 628 | secondtest |
135 | @@ -637,29 +630,28 @@ | |||
136 | 637 | </sect3> | 630 | </sect3> |
137 | 638 | 631 | ||
138 | 639 | <sect3><title>Destroy your VM</title> | 632 | <sect3><title>Destroy your VM</title> |
140 | 640 | <para>Once you are done with your VM, you can proceed to destroy it with: </para> | 633 | <para>Once you are done with your VM, you can destroy it with:</para> |
141 | 641 | 634 | ||
142 | 642 | <programlisting>$ uvt-kvm destroy secondtest</programlisting> | 635 | <programlisting>$ uvt-kvm destroy secondtest</programlisting> |
143 | 643 | </sect3> | 636 | </sect3> |
144 | 644 | <sect3><title>More uvt-kvm options</title> | 637 | <sect3><title>More uvt-kvm options</title> |
145 | 645 | 638 | ||
148 | 646 | <para>The following options can be used to change some of the characteristics of | 639 | <para>The following options can be used to change some of the characteristics of the VM that you are creating:</para> |
147 | 647 | the virtual memory that you are creating</para> | ||
149 | 648 | 640 | ||
150 | 649 | <itemizedlist mark="bullet"> | 641 | <itemizedlist mark="bullet"> |
154 | 650 | <listitem><para>--memory : Amount of RAM in megabytes. Default: 512</para></listitem> | 642 | <listitem><para>--memory : Amount of RAM in megabytes. Default: 512.</para></listitem> |
155 | 651 | <listitem><para>--disk : Size of the OS disk in gigabytes. Default: 8</para></listitem> | 643 | <listitem><para>--disk : Size of the OS disk in gigabytes. Default: 8.</para></listitem> |
156 | 652 | <listitem><para>--cpu : Number of CPU cores. Default: 1</para></listitem> | 644 | <listitem><para>--cpu : Number of CPU cores. Default: 1.</para></listitem> |
157 | 653 | </itemizedlist> | 645 | </itemizedlist> |
158 | 654 | 646 | ||
160 | 655 | <para>Some other parameters will have an impact on the cloud-init configuration</para> | 647 | <para>Some other parameters will have an impact on the cloud-init configuration:</para> |
161 | 656 | <itemizedlist mark="bullet"> | 648 | <itemizedlist mark="bullet"> |
163 | 657 | <listitem><para>--password password : Allow login to the VM using the ubuntu account and this provided password</para></listitem> | 649 | <listitem><para>--password password : Allow login to the VM using the Ubuntu account and this provided password.</para></listitem> |
164 | 658 | <listitem><para>--run-script-once script_file : Run script_file as root on the VM the first time it is booted, but never again.</para></listitem> | 650 | <listitem><para>--run-script-once script_file : Run script_file as root on the VM the first time it is booted, but never again.</para></listitem> |
165 | 659 | <listitem><para>--packages package_list : Install the comma-separated packages specified in package_list on first boot.</para></listitem> | 651 | <listitem><para>--packages package_list : Install the comma-separated packages specified in package_list on first boot.</para></listitem> |
166 | 660 | </itemizedlist> | 652 | </itemizedlist> |
167 | 661 | 653 | ||
169 | 662 | <para>A complete description of all available modifiers is available in the manpage of uvt-kvm</para> | 654 | <para>A complete description of all available modifiers is available in the manpage of uvt-kvm.</para> |
170 | 663 | </sect3> | 655 | </sect3> |
171 | 664 | </sect2> | 656 | </sect2> |
172 | 665 | 657 | ||
173 | @@ -846,7 +838,7 @@ | |||
174 | 846 | <sect3> | 838 | <sect3> |
175 | 847 | <title>Basic privileged usage</title> | 839 | <title>Basic privileged usage</title> |
176 | 848 | <para> | 840 | <para> |
178 | 849 | To create a privileged container, you can simply to | 841 | To create a privileged container, you can simply do: |
179 | 850 | </para> | 842 | </para> |
180 | 851 | <screen> | 843 | <screen> |
181 | 852 | <command> | 844 | <command> |
182 | @@ -1027,7 +1019,7 @@ | |||
183 | 1027 | </para> | 1019 | </para> |
184 | 1028 | <para> | 1020 | <para> |
185 | 1029 | <filename>lxc.conf</filename> and <filename>default.conf</filename> are | 1021 | <filename>lxc.conf</filename> and <filename>default.conf</filename> are |
187 | 1030 | exist both under <filename>/etc/lxc</filename> and <filename>$HOME/.config/lxc</filename>, | 1022 | both under <filename>/etc/lxc</filename> and <filename>$HOME/.config/lxc</filename>, |
188 | 1031 | while <filename>lxc-usernet.conf</filename> is only host-wide. | 1023 | while <filename>lxc-usernet.conf</filename> is only host-wide. |
189 | 1032 | </para> | 1024 | </para> |
190 | 1033 | <para> | 1025 | <para> |
191 | @@ -1130,7 +1122,7 @@ | |||
192 | 1130 | </para> | 1122 | </para> |
193 | 1131 | </listitem> | 1123 | </listitem> |
194 | 1132 | <listitem> | 1124 | <listitem> |
196 | 1133 | <para><filename>/etc/init/lxc-instance.conf:</filename> | 1125 | <para><filename>/etc/init/lxc-instance.conf</filename> |
197 | 1134 | is used by <filename>/etc/init/lxc.conf</filename> | 1126 | is used by <filename>/etc/init/lxc.conf</filename> |
198 | 1135 | to autostart a container. | 1127 | to autostart a container. |
199 | 1136 | </para> | 1128 | </para> |
200 | @@ -1312,7 +1304,7 @@ | |||
201 | 1312 | If you wish to use libvirt inside containers, then you will need | 1304 | If you wish to use libvirt inside containers, then you will need |
202 | 1313 | to edit that policy (which is defined in | 1305 | to edit that policy (which is defined in |
203 | 1314 | <filename>/etc/apparmor.d/lxc/lxc-default-with-nesting</filename>) | 1306 | <filename>/etc/apparmor.d/lxc/lxc-default-with-nesting</filename>) |
205 | 1315 | to uncomment the following line | 1307 | by uncommenting the following line: |
206 | 1316 | <screen> | 1308 | <screen> |
207 | 1317 | mount fstype=cgroup -> /sys/fs/cgroup/**, | 1309 | mount fstype=cgroup -> /sys/fs/cgroup/**, |
208 | 1318 | </screen> | 1310 | </screen> |
209 | @@ -1452,7 +1444,7 @@ | |||
210 | 1452 | </command> | 1444 | </command> |
211 | 1453 | </screen> | 1445 | </screen> |
212 | 1454 | 1446 | ||
214 | 1455 | <para>A snapshot can be created using</para> | 1447 | <para>A snapshot can be created using:</para> |
215 | 1456 | <screen> | 1448 | <screen> |
216 | 1457 | <command> | 1449 | <command> |
217 | 1458 | sudo lxc-clone -s -o C1 -n C2 | 1450 | sudo lxc-clone -s -o C1 -n C2 |
218 | @@ -1588,7 +1580,7 @@ | |||
219 | 1588 | specified by the <command>lxc.tty</command> variable, and is usually | 1580 | specified by the <command>lxc.tty</command> variable, and is usually |
220 | 1589 | set to 4. Those consoles are shown on <filename>/dev/ttyN</filename> | 1581 | set to 4. Those consoles are shown on <filename>/dev/ttyN</filename> |
221 | 1590 | (for 1 <= N <= 4). To log into console 3 from the host, | 1582 | (for 1 <= N <= 4). To log into console 3 from the host, |
223 | 1591 | use</para> | 1583 | use:</para> |
224 | 1592 | 1584 | ||
225 | 1593 | <screen> | 1585 | <screen> |
226 | 1594 | <command> | 1586 | <command> |
O.K. thanks.
Ted: Please consider to not make long lines.