VirtualBox

source: vbox/trunk/doc/manual/en_US/dita/topics/unattended-guest-install-example.dita@ 105841

Last change on this file since 105841 was 105841, checked in by vboxsync, 6 months ago

Docs: bugref:10705. The following commits from doc's team git repo has been applied:

24b92cd60f8a5bbffa8f66258d78050cfb0a6de2 Included review feedback on several topics

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 6.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE topic
3 PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
4<topic xml:lang="en-us" id="unattended-guest-install-example">
5 <title>Using VBoxManage Commands for Unattended Guest Installation</title>
6 <body>
7 <p>The following example shows how to perform an unattended guest installation for an Oracle Linux VM.
8 The example uses various <userinput>VBoxManage</userinput> commands to prepare the guest VM. The
9 <userinput>VBoxManage unattended install</userinput> command is then used to install and configure the guest OS. </p>
10 <ol>
11 <li>
12 <p>Create the virtual machine. </p>
13 <pre xml:space="preserve"># VM="ol7-autoinstall"
14# VBoxManage list ostypes
15# VBoxManage createvm --name $VM --ostype "Oracle_64" --register</pre>
16 <p>Note the following: </p>
17 <ul>
18 <li>
19 <p>The $VM variable represents the name of the VM. </p>
20 </li>
21 <li>
22 <p>The <userinput>VBoxManage list ostypes</userinput> command lists the guest OSes
23 supported by <ph conkeyref="vbox-conkeyref-phrases/product-name"/>, including the name used for each OS in
24 the <userinput>VBoxManage</userinput> commands. </p>
25 </li>
26 <li>
27 <p>A 64-bit Oracle Linux 7 VM is created and registered with <ph
28 conkeyref="vbox-conkeyref-phrases/product-name"/>. </p>
29 </li>
30 <li>
31 <p>The VM has a unique UUID. </p>
32 </li>
33 <li>
34 <p>An XML settings file is generated. </p>
35 </li>
36 </ul>
37 </li>
38 <li>
39 <p>Create a virtual hard disk and storage devices for the VM. </p>
40 <pre xml:space="preserve"># VBoxManage createhd --filename /VirtualBox/$VM/$VM.vdi --size 32768
41# VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
42# VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 \
43--type hdd --medium /VirtualBox/$VM/$VM.vdi
44# VBoxManage storagectl $VM --name "IDE Controller" --add ide
45# VBoxManage storageattach $VM --storagectl "IDE Controller" --port 0 --device 0 \
46--type dvddrive --medium /u01/Software/OL/OracleLinux-R7-U6-Server-x86_64-dvd.iso</pre>
47 <p>The previous commands do the following: </p>
48 <ul>
49 <li>
50 <p>Create a 32768 MB virtual hard disk. </p>
51 </li>
52 <li>
53 <p>Create a SATA storage controller and attach the virtual hard disk. </p>
54 </li>
55 <li>
56 <p>Create an IDE storage controller for a virtual DVD drive and attach an Oracle Linux
57 installation ISO. </p>
58 </li>
59 </ul>
60 </li>
61 <li>
62 <p>(Optional) Configure some settings for the VM. </p>
63 <pre xml:space="preserve"># VBoxManage modifyvm $VM --ioapic on
64# VBoxManage modifyvm $VM --boot1 dvd --boot2 disk --boot3 none --boot4 none
65# VBoxManage modifyvm $VM --memory 8192 --vram 128</pre>
66 <p>The previous commands do the following: </p>
67 <ul>
68 <li>
69 <p>Enable I/O APIC for the motherboard of the VM. </p>
70 </li>
71 <li>
72 <p>Configure the boot device order for the VM. </p>
73 </li>
74 <li>
75 <p>Allocate 8192 MB of RAM and 128 MB of video RAM to the VM. </p>
76 </li>
77 </ul>
78 </li>
79 <li>
80 <p>Perform an unattended install of the OS. </p>
81 <pre xml:space="preserve"># VBoxManage unattended install $VM \
82--iso=/u01/Software/OL/OracleLinux-R7-U6-Server-x86_64-dvd.iso \
83--user=<varname>login</varname> --full-user-name=<varname>name</varname> --user-password <varname>password</varname> \
84--install-additions --time-zone=CET</pre>
85 <p>The previous command does the following: </p>
86 <ul>
87 <li>
88 <p>Specifies an Oracle Linux ISO as the installation ISO. </p>
89 </li>
90 <li>
91 <p>Specifies a login name, full name, and login password for a default user on the guest
92 OS. </p>
93 <p>Note that the specified password is also used for the root user account on the guest. </p>
94 </li>
95 <li>
96 <p>Installs the Guest Additions on the VM. </p>
97 </li>
98 <li>
99 <p>Sets the time zone for the guest OS to Central European Time (CET). </p>
100 </li>
101 </ul>
102 </li>
103 <li>
104 <p>Start the virtual machine. </p>
105 <p>This step completes the unattended installation process. </p>
106 <pre xml:space="preserve"># VBoxManage startvm $VM --type headless</pre>
107 <p>The VM starts in headless mode, which means that the <ph
108 conkeyref="vbox-conkeyref-phrases/vbox-mgr"/> window does not open. </p>
109 </li>
110 </ol>
111 </body>
112 </topic>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette