2012년 9월 9일 일요일

Deploying VM from Template VMware 5

I'm going to describe how to deploy a Linux virtual machine (CentOS 6.2) from the template on VMware 5. This is preferred way when creating VM on other hypervisors like Hyper-V and Xen. 

I installed vCenter server and Infrastructure client on Windows machine to centrally manage ESXi host and then I converted a running vm into a template which was for ready deploying new VM.

I used "Deploy virtual machine from template" menu on client. (you can see the menu when click right button of the mouse after select a template.)

This menu has below four sections: 

  • Name and Location: Name of the VM and location where to deploy.
  • Host / Cluster: Host and Cluster which is located at 
  • Storage: Select provisioning type and repository
  • Guest Customization

I'd like to focus on explaining Guest Customization section

Guest Customization


Guest Customization: Computer name


Guest Customization: Time Zone


Guest Customization: Network 


Guest Customization: Network -> Custom Setting


Guest Customization: Network -> Custom Setting


Guest Customization: DNS and Domain Setting


Guest Customization: Save spec.


Guest Customization: Save spec.



As a result, 
1) I had easier configuration way to deploy Linux VM from template on VMware than Xen. When I had configure network on Xen, It needed more complex steps for network setting.

2) I couldn't find to change property values related to How many CPU and Memory I allocate for the VM. It needs to further test.

3) Network didn't work after finishing deploy of the VM.
I checked configuration file of the network in the VM.
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
USECTL=no
NETMASK=255.255.255.0
IPADDR=192.168.20.172
GATEWAY=192.168.20.1
PEERDNS=no

check_link_down() {
    return 1;
}

DNS information was added neither in /etc/sysconfig/network-scripts/ifcfg-eth1 or in /etc/resolv.conf

I manually changed ifcfg-eth1 file, looking at the following:


I could able to ping to the outside. I resolved the network problem. But, I wondered what PEERDNS meant in ifcfg-eth1 ( I'd never used this option)
The meaning of PEERDNS  (yes and no)
  • yes(default):  This interface will modify your system's /etc/resolv.conf file entries to use the DNS servers provided by the remote system when a connection is established. That is, If you define the DNS setting in ifcfg-eth*, the system automatically change entries in /etc/resolv.conf whenever connection is established.
  • no:  Do not modify /etc/resolv.conf. 
To make network available with using PEERDNS=no, you should put your DNS addresses in your /etc/resolv.conf 

댓글 없음:

댓글 쓰기