Back to top
 
 
 

Creating Virtual Machine

Contents

1 Creating Virtual Machine

A template is a set of related configuration from which you can create one or more virtual machines. For example, one of the default Templates included with ConVirt is the Linux _CD_Install in the Common Template Group. It typically consists of default values for Virtual cpus, Memory, storage and network configurations.

1.1 Viewing and editing dafault Templates

To view or edit the existing Linux_CD_Install Template in the ConVirt console:

1.Expand Template Library > Common, then select Linux_CD_Install.


2 Right-click, then select Edit Settings on the context menu. By default, this template is configured to create a virtual machine with 512 MB of memory, one virtual CPU, the disk $VM_DISKS_DIR/$VM_NAME.disk.xm, and the cdrom device defined.


CPU/Memory
Cv template gen.png
Storage
Cv template storage.png
Template Parameters
Cv template params.png


The default $VM_DISKS_DIR and $VM_DISK_NAME variables are substituted with appropriate values when you provision the virtual machine. For example, by default the VM_DISKS_DIR variable is replaced with /var/cache/convirt/vm_disks if you provision a virtual machine using this template without making any changes to its settings.

You can set another location for the disk for the virtual machine by clicking the Template Parameters tab and changing the path.

1.2 Creating a new Template based on an existing one

The default Templates included with ConVirt give you a good starting point for creating new virtual machines without making changes. In most cases, however, you may find it useful to create custom Template by modifying an existing template to suit your needs. For example, you can create a new custom template for CentOS virtual machines by modifying the existing Linux_CD_Install template in the ConVirt.

To create a new CentOS Template by modifying the Linux_CD_Install template.

1 Expand Tempaltes Library > Common, then select Linux_CD_Install.

2 Right-click, then select Create Like on the context menu.

3 Type a descriptive name the new template, then click OK. For example, type CentOS_54 if you are creating a new template for deploying CentOS 5.4 virtual machines.

Create a custom Template
Cv template create like.png

4 Select the newly created Template, right-click, then select Edit Description on the context menu to display an editor window containing HTML-like syntax. This editor enables you to document the template-specific details or management processes that need to be followed in your organization.


5 Change the title from Linux CD Install to CentOS 5.4 and make any other changes to the description of this template, then click Save.


6 With the CentOS template selected, right-click, then select Edit Settings on the context menu. You can modify specific properties to customize the template to your needs.

  • Change the Virtual CPUs to 2 to specify that virtual machines using this template should be configured with two CPUs.
  • Select Storage section and select the /dev/cdrom storage disk. Then click Edit button and select Use ISO File so that virtual machines created using this template use an ISO file instead of the physical cdrom device. In the Disk Location, enter the full path to the ISO file. For example:
Change disk to and ISO
Cv template chg to iso.png

NOTE Make sure that there are no spaces in the path to the ISO file location.

Click the Provisioning tab and change VM_DISKS_DIR to /mnt/storage/vm_disks. Make sure that there are no spaces in the directory location.

Note During provisioning, the VM_DISKS_DIR directory and the .iso file location must be accessible on the server where the virtual machine is being deployed. In most cases, the VM_DISKS_DIR directory and the .iso file location are set up on shared storage to which the managed server has access. This ensures that when you create a virtual machine using the template on a particular managed server, the server can locate its disks and ISO file. If you are not using shared storage for the VM_DISKS_DIR directory and the .iso file location, you should verify the locations specified in the template exist on the managed server or change the settings during the provisioning process.


1.3 Provisioning a virtual machine from the custom Template

To provision a virtual machine from the CentOS_54 Template you created:

1 Select the CentOS_54 Template.

2 Right-click, then select Provision from the context menu.

3 Select a managed server or a server pool. For example:

Provisioning : Select Server
Cv select server.png


Note If you select a Server Pool, ConVirt will find a suitable managed server within that server pool for you. This simplifies the provisioning process when there are many servers and virtual machines already deployed.

4 Type the Virtual Machine name, then click OK. For example,type CentOS-VM, then click OK. Make sure there are no spaces in Virtual Machine name.

Note Keep in mind that the VM_DISKS_DIR directory and the .iso file location must be accessible on the server where the virtual machine is being deployed during provisioning. If the VM_DISKS_DIR directory and the .iso file location are set up on shared storage, you should be able to create a virtual machine without modifying these properties. If you are not using shared storage for the VM_DISKS_DIR directory and the .iso file location, you should verify the locations exist on the managed server or change the properties, as needed.

5 Expand the managed server selected in Step 3 to see the newly created Virtual Machine.

6 Select the Virtual Machine, right-click, then select Start on the context sensitive menu to start the virtual machine.

7 Select View Console from the context menu to get to the console of the virtual machine’s name.

8 If the .iso file you specified for the template is readable, the installation process for the virtual machine will begin. Follow the instructions displayed on the virtual machine tab to complete the installation.

9 When installation is complete, click Shutdown on the common tasks tool bar, then click Yes to confirm shutting down.

10 With the new virtual machine selected, right-click, then select Set Boot Device on the context menu.

11 Change the boot device to Disk. For example:

Select Boot Device
Cv set boot device.png


12 Click Start to restart the new virtual machine, then click Console to display the terminal console on the virtual machine.

You should see the log in prompt for the newly created CentOS installation. Congratulations, you are now ready to begin deploying applications and managing your new virtual machine.

 
Cet article vous a-t-il été utile ?
Utilisateurs qui ont trouvé cela utile : 0 sur 0

Commentaires