Create Redhat Enterprise Linux Template VM in VMware vCenter
You can create a RHEL template VM in your VMware ESXi environment in order to make new VM deployment easier and faster.
You fisrt need to create a normal VM and install your RHEL inside it. You can also install other applications that you may need to have them in all your new VM employments.
After You are done with your installation and configuration of the VM that suppose to be used as Template, we need to carry following task inside guest OS before proceed to convert it to a VMware Template.
1. Flag the system for reconfiguration:
# touch /.unconfigured
2. Deactivate all the network cards of your VM:
example for eth0:
# ifdown eth0
Remove the HWADDR entry from the ifcfg-eth* files:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
...
HWADDR=00:50:56:b7:0e:6c
...
and activate you network cards again:
# ifup eth0
3. You need to delete entries regarding the network cards from 70-persistent-net.rules file as well:
# vi /etc/udev/rules.d/70-persistent-net.rules
...
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:b7:3b:f7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
You fisrt need to create a normal VM and install your RHEL inside it. You can also install other applications that you may need to have them in all your new VM employments.
After You are done with your installation and configuration of the VM that suppose to be used as Template, we need to carry following task inside guest OS before proceed to convert it to a VMware Template.
1. Flag the system for reconfiguration:
# touch /.unconfigured
2. Deactivate all the network cards of your VM:
example for eth0:
# ifdown eth0
Remove the HWADDR entry from the ifcfg-eth* files:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
...
HWADDR=00:50:56:b7:0e:6c
...
and activate you network cards again:
# ifup eth0
3. You need to delete entries regarding the network cards from 70-persistent-net.rules file as well:
# vi /etc/udev/rules.d/70-persistent-net.rules
...
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:b7:3b:f7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
...
Remove the lines started with SUBSYSTEM, save and exit the file.
4. Delete any SSH host keys:
# rm -rf /etc/ssh/ssh_host_*
And that's it, just remember to Shutdown or power off your VM immediately before you change any settings. It is now ready to be converted to a Template.
Note: If you happen to reboot your system, you need to repeat the step 3 and power off your VM,
Now, from the vCenter, right click on your VM and go to Template > Convert to Template.
Once it's ready, you can right click on your newly created Template and choose Deploy Virtual Machine from This Template. Follow on screen dialogues, give hostname and choose the location for your new VM.
And there you go, you have your new VM created without hassle of installing and configuring OS and applications each time you want a new server.
I admire the valuable information you offer in your articles. I will bookmark your blog and have my friends check up here often. I am quite sure they will learn lots of new stuff here than anybody else! Regards, vmware jobs in hyderabad
ReplyDeleteThis is my first time i visit here. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the good work. I have been meaning to write something like this on my website and you have given me an idea. hyip template
ReplyDeleteThank you so much for ding the impressive job here, everyone will surely like your post. hyip template
ReplyDeleteAfter reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article. hyip template
ReplyDeleteMore Activities carries you to the extra Google Locales choices which incorporates amendment history, page settings and erase. Wikipedia editors for hire
ReplyDeleteI found Hubwit as a transparent s ite, a social hub which is a conglomerate of Buyers and Sellers who are ready to offer online digital consultancy at decent cost. website builder best
ReplyDeleteI think about it is most required for making more on this get engaged uvc light
ReplyDeleteIt is the intent to provide valuable information and best practices, including an understanding of the regulatory process. iphone cases
ReplyDeleteGreat survey. I'm sure you're getting a great response. video course
ReplyDeleteI’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one black hair London
ReplyDeleteIt's late finding this act. At least, it's a thing to be familiar with that there are such events exist. I agree with your Blog and I will be back to inspect it more in the future so please keep up your act. Vacation Rental Missouri
ReplyDeleteI am genuinely thankful to the holder of this web page who has shared this wonderful paragraph at at this place IBS
ReplyDeleteWhat a really awesome post this is. Truly, one of the best posts I've ever witnessed to see in my whole life. Wow, just keep it up. Vanity mirror
ReplyDeleteI have a mission that I’m just now working on, and I have been at the look out for such information Vanity mirror
ReplyDeleteI really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. georgewashington
ReplyDeleteThere is definately a great deal to know about this subject. I like all of the points you've made. Enriching
ReplyDeletewow... what a great blog, this writter who wrote this article it's realy a great blogger, this article so inspiring me to be a better person lolitalempickaelle
ReplyDeleteI found your this post while searching for information about blog-related research ... It's a good post .. keep posting and updating information buy hyip
ReplyDeleteGreat Article Cloud Computing Projects
ReplyDeleteNetworking Projects
Final Year Projects for CSE
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training