-->
Would you like to learn how to create a Windows virtual machine template on Vmware ESXi? In this tutorial, we are going to show you how to create a Windows virtual machine template using Vmware ESXi server. This tutorial was tested on Vmware ESXi 6.5. This tutorial was tested on Vmware ESXi 6.7. This tutorial does not use Vcenter.
Learn how to create a virtual machine and install an operating system in your new virtual machine. You will need an .iso file for the operating system that you would like to run. If needed, grab an evaluation copy of Windows 10 from the TechNet Evaluation Center.
Create a Virtual Machine with Hyper-V Manager
We show how to set up a vmWare ESXi 6.0.0 virtual machine for a windows 10 64 bit guest OS. Run the server and connect to the server by typing the IP address in the Internet Explorer address. Choose the virtual switch. Click Create Virtual Machine to start the process. Starting a Hyper-V Virtual Machine. After you have created the VM, you can finally start working with it. For this purpose, open Hyper-V Manager, right-click on the VM that you want to start, and select Connect. The VMConnect tool will be launched.
- Open Hyper-V Manager by either pressing the Window's key and typing 'Hyper-V Manager' or by finding Hyper-V Manager in your applications.
- In Hyper-V Manager, click Action > New > Virtual Machine to bring up the New Virtual Machine Wizard.
- Review the ‘Before You Begin’ content and click Next.
- Give the virtual machine a name.
Note: This is the name Hyper-V uses for the virtual machine, not the computer name given to the guest operating system that will be deployed inside the virtual machine.
- Choose a location where the virtual machine files will be stored such as c:virtualmachine. You can also accept the default location. Click Next when done.
- Select a generation for the machine and click Next.
Generation 2 virtual machines were introduced with Windows Server 2012 R2 and provide a simplified virtual hardware model and some additional functionality. You can only install a 64-bit operating system on a Generation 2 virtual machine. For more information on Generation 2 virtual machines, see the Generation 2 Virtual Machine Overview.
If the new virtual machine is configured as Generation 2 and will be running a Linux distribution, secure boot will need to be disabled. For more information on secure boot, see Secure Boot.
- Select 2048 MB for the Startup Memory value and leave Use Dynamic Memory selected. Click the Next button.
Memory is shared between a Hyper-V host and the virtual machine running on the host. The number of virtual machines that can run on a single host is in part dependent on available memory. A virtual machine can also be configured to use Dynamic Memory. When enabled, dynamic memory reclaims unused memory from the running virtual machine. This allows more virtual machines to run on the host. For more information on Dynamic Memory, see the Hyper-V Dynamic Memory Overview.
- On the Configure Networking wizard, select a virtual switch for the virtual machine and click Next. For more information, see Create a Virtual Switch.
- Give the virtual hard drive a name, select a location or keep the default, and finally specify a size. Click Next when ready.
A virtual hard drive provides storage for a virtual machine similar to a physical hard drive. A virtual hard drive is required so that you can install an operating system on the virtual machine.
- On the Installation Options wizard, select Install an operating system from a bootable image file and then select an operating system .iso file. Click Next once completed.
When creating a virtual machine, you can configure some operating system installation options. The three options available are:
- Install an operating system later – this option makes no additional modification to the virtual machine.
- Install an operating system from a bootable image file – this is similar to inserting a CD into the physical CD-ROM drive of a physical computer. To configure this option, select a .iso image. This image will be mounted to the virtual CD-ROM drive of the virtual machine. The boot order of the virtual machine is changed to boot first from the CD-ROM drive.
- Install an operating system from a network-based installation server – This option is not available unless you have connected the virtual machine to a network switch. In this configuration, the virtual machine attempts to boot from the network.
- Review the virtual machine details and click Finish to complete the virtual machine creation.
Create a Virtual Machine with PowerShell
- Open up the PowerShell ISE as Administrator.
- Run the following script.
Complete the Operating System Deployment
In order to finish building your virtual machine, you need to start the virtual machine and walk through the operating system installation.
- In Hyper-V Manager, double-click on the virtual machine. This launches the VMConnect tool.
- In VMConnect, click on the green Start button. This is like pressing the power button on a physical computer. You may be prompted to ‘Press any key to boot from CD or DVD’. Go ahead and do so.
Note: You may need to click inside the VMConnect window to ensure that your keystrokes are sent to the virtual machine.
- The virtual machine boots into setup and you can walk through the installation like you would on a physical computer.
Note: Unless you're running a volume-licensed version of Windows, you need a separate license for Windows running inside a virtual machine. The virtual machine's operating system is independent of the host operating system.
To create a new virtual machine, you need to start VirtualBox. On the host where you installed Oracle VDI and VirtualBox, select the Applications menu on the desktop, then the System Tools menu, and then Oracle VM VirtualBox. Alternatively, you can run the VirtualBox command in a terminal. The Oracle VM VirtualBox Manager is displayed, as shown in Figure 6.4.
Figure 6.4. Oracle VM VirtualBox Manager
All the following steps for creating a virtual machine can be performed using the VirtualBox command line. However, if you are new to VirtualBox, you will probably find the Oracle VM VirtualBox Manager easier to use.
In the toolbar, click the New button. The New Virtual Machine Wizard is displayed in a new window, as shown in Figure 6.5.
Figure 6.5. New Virtual Machine Wizard
Click the Next button to move though the various steps of the wizard. The wizard enables you to configure the basic details of the virtual machine. On the VM Name and OS Type step, enter a descriptive name for the virtual machine in the Name field and select the operating system and version that you are going to install from the drop-down lists, as shown in Figure 6.6. It is important to select the correct operating system and version as this determines the default settings for VirtualBox uses for the virtual machine. You can change the settings later after you have created the virtual machine.
Figure 6.6. VM Name and OS Type Step
On the Memory step, you can simply accept the default. This is the amount of host memory (RAM) that VirtualBox assigns to the virtual machine when it runs. You can change the settings of the virtual machine later, when you import the template into Oracle VDI.
On the Virtual Hard Disk step, ensure Start-up Disk is selected (see Figure 6.7) , select Create new hard disk and click Next. The Virtual Disk Creation Wizard is displayed in a new window so you can create the new virtual disk.
Figure 6.7. Virtual Hard Disk Step
On the following steps, select VDI (VirtualBox Disk Image) as the file type, Dynamically allocated as the storage details, and accept the defaults for the virtual disk file location and size, and then click Create to create the virtual disk.
When the virtual disk is created, the Virtual Disk Creation Wizard is closed and you are returned to the Summary step of the New Virtual Machine Wizard. Click Create to create the virtual machine. The wizard is closed and the newly-created virtual machine is listed in Oracle VM VirtualBox Manager, as shown in Figure 6.8.
Figure 6.8. Virtual Machine Added
Since you want to install an operating system in the virtual machine, you need to make sure the virtual machine can access the installation media. To do this, you edit the virtual machine settings. In Oracle VM VirtualBox Manager, select the virtual machine and then in the toolbar click the Settings button. The Settings window is displayed. In the navigation on the left, select Storage as shown in Figure 6.9.
Figure 6.9. Virtual Machine Storage Settings
In the Storage Tree section, select Empty below the IDE Controller. The CD/DVD Drive attributes are displayed. Click the CD/DVD icon next to the CD/DVD Drive drop-down list and select the location of the installation media, as follows:
10 5 6 Create Virtual Machines Pdf
- To connect the virtual CD/DVD drive to the host's physical CD/DVD drive, select Host Drive
<drive‑name>
.To insert an ISO image in the virtual CD/DVD drive, select Choose a virtual CD/DVD disk file and browse for the ISO image.
Figure 6.10 shows an ISO image inserted in the virtual CD/DVD drive.
Figure 6.10. Virtual Machine CD/DVD Drive Settings
Create A Vm
Click OK to apply the storage settings. The Settings window is closed. If you connected the virtual machine's CD/DVD drive to the host's physical CD/DVD drive, insert the installation media in the host's CD/DVD drive now. You are now ready to start the virtual machine and install the operating system.
In Oracle VM VirtualBox Manager, select the virtual machine and click the Start button in the toolbar. A new window is displayed, which shows the virtual machine booting up. Depending on the operating system and the configuration of the virtual machine, VirtualBox might display some warnings first. It is safe to ignore these warnings. The virtual machine should boot from the installation media, as shown in Figure 6.11.
Figure 6.11. An Installation Program in a Running Virtual Machine
You can now perform all your normal steps for installing the operating system. Be sure to make a note of the user name and password of the administrator user account you create in the virtual machine, which you will need in order to log in to the virtual machine. Do not join the virtual machine to a Windows domain (it can be a member of a workgroup) as the domain configuration is performed later. The virtual machine might reboot several times during the installation. When the installation is complete, you might also want to let Windows Update to install any updates.
Next, you need to install the VirtualBox Guest Additions, as described in Section 6.4, “Installing the VirtualBox Guest Additions”.