File: unattended-guest-install-example.dita

package info (click to toggle)
virtualbox 7.1.12-dfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 565,672 kB
  • sloc: ansic: 2,330,854; cpp: 2,193,228; asm: 230,777; python: 223,895; xml: 86,771; sh: 25,541; makefile: 8,158; perl: 5,697; java: 5,337; cs: 4,872; pascal: 1,782; javascript: 1,692; objc: 1,131; lex: 931; php: 906; sed: 899; yacc: 707
file content (112 lines) | stat: -rw-r--r-- 6,318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="unattended-guest-install-example">
               <title>Using VBoxManage Commands for Unattended Guest Installation</title>            
               <body>
                  <p>The following example shows how to perform an unattended guest installation for an Oracle Linux VM.
      The example uses various <userinput>VBoxManage</userinput> commands to prepare the guest VM. The
        <userinput>VBoxManage unattended install</userinput> command is then used to install and configure the guest OS. </p>
                  <ol>
                     <li>
                        <p>Create the virtual machine. </p>
                        <pre xml:space="preserve"># VM="ol7-autoinstall"
# VBoxManage list ostypes
# VBoxManage createvm --name $VM --ostype "Oracle_64" --register</pre>
                        <p>Note the following: </p>
                        <ul>
                           <li>
                              <p>The $VM variable represents the name of the VM. </p>
                           </li>
                           <li>
                              <p>The <userinput>VBoxManage list ostypes</userinput> command lists the guest OSes
              supported by <ph conkeyref="vbox-conkeyref-phrases/product-name"/>, including the name used for each OS in
              the <userinput>VBoxManage</userinput> commands. </p>
                           </li>
                           <li>
                              <p>A 64-bit Oracle Linux 7 VM is created and registered with <ph
                conkeyref="vbox-conkeyref-phrases/product-name"/>. </p>
                           </li>
                           <li>
                              <p>The VM has a unique UUID. </p>
                           </li>
                           <li>
                              <p>An XML settings file is generated. </p>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <p>Create a virtual hard disk and storage devices for the VM. </p>
                        <pre xml:space="preserve"># VBoxManage createhd --filename /VirtualBox/$VM/$VM.vdi --size 32768
# VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
# VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 \
--type hdd --medium /VirtualBox/$VM/$VM.vdi
# VBoxManage storagectl $VM --name "IDE Controller" --add ide
# VBoxManage storageattach $VM --storagectl "IDE Controller" --port 0 --device 0 \
--type dvddrive --medium /u01/Software/OL/OracleLinux-R7-U6-Server-x86_64-dvd.iso</pre>
                        <p>The previous commands do the following: </p>
                        <ul>
                           <li>
                              <p>Create a 32768 MB virtual hard disk. </p>
                           </li>
                           <li>
                              <p>Create a SATA storage controller and attach the virtual hard disk. </p>
                           </li>
                           <li>
                              <p>Create an IDE storage controller for a virtual DVD drive and attach an Oracle Linux
              installation ISO. </p>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <p>(Optional) Configure some settings for the VM. </p>
                        <pre xml:space="preserve"># VBoxManage modifyvm $VM --ioapic on
# VBoxManage modifyvm $VM --boot1 dvd --boot2 disk --boot3 none --boot4 none
# VBoxManage modifyvm $VM --memory 8192 --vram 128</pre>
                        <p>The previous commands do the following: </p>
                        <ul>
                           <li>
                              <p>Enable I/O APIC for the motherboard of the VM. </p>
                           </li>
                           <li>
                              <p>Configure the boot device order for the VM. </p>
                           </li>
                           <li>
                              <p>Allocate 8192 MB of RAM and 128 MB of video RAM to the VM. </p>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <p>Perform an unattended install of the OS. </p>
                        <pre xml:space="preserve"># VBoxManage unattended install $VM \
--iso=/u01/Software/OL/OracleLinux-R7-U6-Server-x86_64-dvd.iso \
--user=<varname>login</varname> --full-user-name=<varname>name</varname> --user-password <varname>password</varname> \
--install-additions --time-zone=CET</pre>
                        <p>The previous command does the following: </p>
                        <ul>
                           <li>
                              <p>Specifies an Oracle Linux ISO as the installation ISO. </p>
                           </li>
                           <li>
                              <p>Specifies a login name, full name, and login password for a default user on the guest
              OS. </p>
                              <p>Note that the specified password is also used for the root user account on the guest. </p>
                           </li>
                           <li>
                              <p>Installs the Guest Additions on the VM. </p>
                           </li>
                           <li>
                              <p>Sets the time zone for the guest OS to Central European Time (CET). </p>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <p>Start the virtual machine. </p>
                        <p>This step completes the unattended installation process. </p>
                        <pre xml:space="preserve"># VBoxManage startvm $VM --type headless</pre>
                        <p>The VM starts in headless mode, which means that the <ph
            conkeyref="vbox-conkeyref-phrases/vbox-mgr"/> window does not open. </p>
                     </li>
                  </ol>
               </body>              
            </topic>