VirtualBox

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

Last change on this file since 108750 was 108599, checked in by vboxsync, 8 weeks ago

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

ab13e70df1f11d94f5aa74320f3d5bcd09eb0615 Merge branch 'VBP-1524_intro' into 'main'
2d22f9e3961d9af151d8fd68be179fe158ecdbe8 Updated 7.2 NAT topics
db0dea26b24752c0700fe2482c71096e5e34c144 Second draft for review
1ed94a09615e74cbefb40eae15334256716fce3e Updates to User Guide previously made by changesets 166326 and 166288 in vbox repo.
6dd488e154f44f2fe176a5a8b966c53b4dc9bc11 initial changes more to do
c5daadaa4ca2c9566a138d0f8747ac251409a597 more changes still more to do
f6485c3e017173701848468da9411723eeffaa7a Renamed topics and IDs
7ee42f9b5ec05968c90fdc476c2b2d63d9b729c2 Redrafted as two topics
3d44dd223c479bff7e5e7b4ff04551bf3e100a5c Tidied up unattended installation topics and removed duplication, corrected links.
e55738b05d654b7e3ad4e3bf9d085207703188b0 Updated overview of creating VM
168aee91e9dfffc02caaf409f35dd5a4087acfbe Merge branch 'VBP-1276_createVM' into 'main'
b51d42c208d4a5bc5c8cb0fc3a99180446ebe58e Removed obsolete note, and fixed typo
bf979f08427ff1dbb28c8a746789188416ffd137 Updated refs to Global Tools
e505a3f336b2dd2a8fb518b5dd6df4de3aa4e4be Removed unreferenced files
707ad04594a853717261ca66b320caaeb5b9ebbb Draft changes to network setup
ddda752407bad20a499b04206006b95fc1d6466d Restructured and updated network config topics
809714626c61832152b8f6d709abfbf750904af9 Updated topics for configuring vbox

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 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>Creating a New Virtual Machine Using VBoxManage</title>
6 <body>
7 <p>You can create a VM on the command line using VBoxManage. See also <xref href="../cli_topics/man_VBoxManage-createvm.ditamap" format="ditamap"/>.</p>
8 <p>The following example uses various <userinput>VBoxManage</userinput> commands to specify the VM and configure an unattended guest installation for an Oracle Linux VM on a Linux host.</p>
9 <p>It then shows the use of the <userinput>VBoxManage unattended install</userinput> command to install and configure the guest OS.</p>
10 <ol>
11 <li>
12 <p>Set a variable for the name of the OS.<pre xml:space="preserve"># VM="ol8-autoinstall"
13</pre></p>
14 </li>
15 <li>
16 <p>List the available guest OS types and note the exact name of the one you need. This is required in <userinput>VBoxManage</userinput> commands.<pre xml:space="preserve"># VBoxManage list ostypes</pre></p>
17 </li>
18 <li>
19 <p>Create the virtual machine.<pre xml:space="preserve"># VBoxManage createvm --name $VM --ostype "Oracle_64" --register</pre></p>
20 <p>The VM has a unique UUID.</p>
21 <p>An XML settings file is generated.</p>
22 </li>
23 <li>
24 <p>Create a 32768 MB virtual hard disk for the VM.<pre xml:space="preserve"># VBoxManage createhd --filename /VirtualBox/$VM/$VM.vdi --size 32768</pre></p>
25 </li>
26 <li>
27 <p>Create storage devices for the VM.</p>
28 <ul>
29 <li>
30 <p>Create a SATA storage controller and attach the virtual hard disk. <pre xml:space="preserve"># VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
31# VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 \
32--type hdd --medium /VirtualBox/$VM/$VM.vdi</pre></p>
33 </li>
34 <li>
35 <p>Create an IDE storage controller for a virtual DVD drive and attach an Oracle Linux installation ISO. <pre xml:space="preserve"># VBoxManage storagectl $VM --name "IDE Controller" --add ide
36# VBoxManage storageattach $VM --storagectl "IDE Controller" --port 0 --device 0 \
37--type dvddrive --medium /u01/Software/OL/OracleLinux-R7-U6-Server-x86_64-dvd.iso</pre></p>
38 </li>
39 </ul>
40 </li>
41 <li>
42 <p>(Optional) Configure some settings for the VM. </p>
43 <ul>
44 <li>
45 <p>Enable I/O APIC for the motherboard of the VM. <pre xml:space="preserve"># VBoxManage modifyvm $VM --ioapic on</pre></p>
46 </li>
47 <li>
48 <p>Configure the boot device order for the VM. <pre xml:space="preserve"># VBoxManage modifyvm $VM --boot1 dvd --boot2 disk --boot3 none --boot4 none</pre></p>
49 </li>
50 <li>
51 <p>Allocate 8192 MB of RAM and 128 MB of video RAM to the VM. <pre xml:space="preserve"># VBoxManage modifyvm $VM --memory 8192 --vram 128</pre></p>
52 </li>
53 </ul>
54 </li>
55 <li>
56 <p>Specify the Unattended Installation parameters, and then install the OS.</p>
57 <ul>
58 <li>
59 <p>Specify an Oracle Linux ISO as the installation ISO.<pre xml:space="preserve"># VBoxManage unattended install $VM \
60--iso=/u01/Software/OL/OracleLinux-R7-U6-Server-x86_64-dvd.iso \</pre></p>
61 </li>
62 <li>
63 <p>Specifiy a user name, full name, and password for a default user on the guest OS.<pre xml:space="preserve">--user=<varname>login</varname> --full-user-name=<varname>name</varname> --user-password <varname>password</varname> \</pre></p>
64 <p>Note that the specified password is also used for the root user account on the guest.</p>
65 </li>
66 <li>
67 <p>Specify that you want to install the VirtualBox Guest Additions on the VM.<pre xml:space="preserve">--install-additions \</pre></p>
68 </li>
69 <li>
70 <p>Sets the time zone for the guest OS to Central European Time (CET). <pre xml:space="preserve">--time-zone=CET</pre></p>
71 </li>
72 </ul>
73 </li>
74 <li>
75 <p>Start the virtual machine.</p>
76 <pre xml:space="preserve"># VBoxManage startvm $VM --type headless</pre>
77 <p>The VM starts in headless mode, which means that it does not have a GUI.</p>
78 </li>
79 </ol>
80 </body>
81 </topic>
Note: See TracBrowser for help on using the repository browser.

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