Virtualization application (1) Start vsphere 4.1

Source: Internet
Author: User
Tags powergui
    1. New vsphere features

Download test code

Test environment:

Windows Server 2008 r2 datacenter

VMware Workstation 7.1

VMware vsphere 4.1

JDK 1.6 u-21 x64, eclipse for javaee 3.6x64

VMware vsphere Java API 2.1 beta, VMWare vsphere powercli 4.1 (powershell 2.0)

Powergui Script Editor Free Edition

 

Vsphere is the industry's first cloud computing operating system. VMWare recently released its latest version of vsphere 4.1. The new features are as follows:

Original ENGLISH

1.1Installation and deployment

VMware ESX

Install esxi as a script

Remove vsphere client from ESX/esxi

 

1.2Storage

Boot from San (storage region Network)

Hardware acceleration and storage APIs extended for integrated Arrays

Storage Performance Statistics

Storage I/O Control

ISCSI(Internet small computer system interface
Internet Minicomputer System Interface)Hardware uninstallation

NFS(Network File System)Performance Enhancement

 

1.3Network

Network I/O Control

IPv6 Enhancement

Load-based grouping

E1000 vnic(Virtual network interface controller virtual network card)Enhanced

 

1.4Availability

Built on Vmware ha(High Availability high availability)Windows failover Cluster

Scalability improvement of VMware ha

Monitor VMware ha healthcheck and running status

VMware Fault Tolerance Enhancement

Drs for VMware ha and fault tolerance(Distributed resource scheduler Distributed Resource Planning)

Enhanced network performance Logging

Parallel VMware data session recovery

Enhanced virtual storage API for Data Protection

 

1.5Management

Vcli(Vsphere command-line interface vsphere command line interface)Enhanced

Lock mode Enhancement

Access virtual machine serial port through network

Vcenter converter hyper-V Import

Host Configuration File Enhancement

Unattended vsphere certification management assistant technology

Deployment environment vsphere management assistant technology

Vcenter orchestrator 64-bit support

Vcenter update manager Improvement Support

License Report Management

Power Management Improvement

 

1.6Platform Enhancement

Performance and scalability Improvement

Reduce memory overhead

Drs(Distributed resource scheduler Distributed Resource Planning)VM host affinity rules

Memory Compression

Vmotion Enhancement

ESX/esxi Active Directory Integration

USB device from ESX/esxi host to Virtual Machine

Improve vmotion compatibility

 

1.7Partner Ecosystem

Vcenter update Manager supports the supply, repair, upgrade, and emc esx powerpath Module

Number of users that can be configured for each virtual outlet of the virtual CPU

Supports more CPUs

 

    1. Manage vsphere

I used vmware workstation 7.1 to install ESX Server 4.1. for testing purposes only, the actual production environment should be deployed on dedicated servers:

To manage the ESX Server, you also need to install the vsphere client. After installation, enter the ESX Server IP address, user name, and password to log on:

The ESX-Win2003 is a virtual machine installed in a virtual machine that supports direct installation in ESX Server 4.1 and requires modifications to the vmx configuration file in previous versions.

The Management Console is similar to hyper-V and is easy to use:

 

    1. Use vsphere Java API to manage ESX

VMware provides a large number of APIs to manage its products and supports Java, C #, Perl, and other languages. Here I use the vsphere Java API for testing.HereDownload. (C # API documentation and examples are incomplete. I tried to compile them and encountered many errors. I will try again later)

3.1 open eclipse and create a project:

Add the downloaded jar package of vsphere Java API to build path.

Code Package Brooks. chapter5.simpledemo;

Import Java.net. url;
Import Com. VMware. vim25.virtualmachinecapability;
Import Com. VMware. vim25.virtualmachineconfiginfo;
Import Com.vmware.vim25.mo. folder;
Import Com.vmware.vim25.mo. inventorynavigator;
Import Com.vmware.vim25.mo. managedentity;
Import Com.vmware.vim25.mo. serviceinstance;
Import Com.vmware.vim25.mo. virtualmachine;
Import Com.vmware.vim25.mo. util. commandlineparser;
Import Com.vmware.vim25.mo. util. optionspec;

Public ClassHellovi {

/**
* @ Param ARGs
*/
Public   Static   Void Main (string [] ARGs ){
Try {
Commandlineparser CLP =   New Commandlineparser ( New Optionspec [] {},
ARGs );
String urlstr = CLP. get_option ( " URL " );
String Username = CLP. get_option ( " Username " );
String Password = CLP. get_option ( " Password " );
Serviceinstance Si =   New Serviceinstance ( New URL (urlstr), username,
Password, True );
Folder rootfolder = Si. getrootfolder ();
Managedentity [] mes =   New Inventorynavigator (rootfolder)
. Searchmanagedentities ( " Virtualmachine " );
If (Mes =   Null   | Mes. Length =   0 ){
Si. getserverconnection (). logout ();
Return ;
}
Virtualmachine VM = (Virtualmachine) mes [ 0 ];
Virtualmachineconfiginfo vminfo = VM. getconfig ();
Virtualmachinecapability VMC = VM. getcapability ();
System. Out. println ( " Hello: "   + VM. getname ());
System. Out. println ( " Guestos: "   + Vminfo. getguestfullname ());
System. Out. println ( " Multiple snapshot supported: "
+ VMC. ismultiplesnapshotssupported ());
Si. getserverconnection (). logout ();
} Catch (Exception ex ){
Ex. printstacktrace ();
}
}
}

 

3.3 configure command line parameters: -- URL https: // 192.168.200.htm/SDK -- username root -- password ******(Replace your own esx ip address, user name, and password.)

 

3.4 The running result is as follows:

 

    1. Use powershell to manage ESX instances

VMware provides the extended vsphere powercli of powershell to facilitate management of ESX/esxi and so on.HereTo download the SDK, you must register it first.

4.1 After the download and installation, the command line interface is as follows:

 

4.2 to make it easier to use powershell, we use powergui Script Editor free Editon to compile powershell.HereDownload. It supports breakpoint debugging and powerful intelligent sensing.

To use the VMware powercli extension in the powergui Script Editor, you must first import:

Add-pssnapin
VMware. vimautomation. Core

 

Use connect-viserver to connect to ESX and start-VM to open an installed virtual machine:

If you use HTTP to connect to ESX, an error occurs. We recommend that you use HTTPS.

 

    1. Summary

with more and more application of virtualization technology in enterprises, the requirements for virtualization technology are also increasing, starting with the most basic Code and script, we have a basic understanding of the VMware vsphere 4.1 platform, some simple management operations are performed. The virtualization technology solution is very complex and involves a wide range of technical aspects. I also conducted tests with a research attitude. In the future, I will also focus on other virtualization solutions, for example, Microsoft's hyper-V and Oracle's virtualbox are combined with the corresponding SDK for some tests.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.