search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
How to create CentOS 5.6 template on SCVMM 2008 R2 – Part 3
Posted in Virtual Machine Manager | 3 Comments | 7,649 views | 24/05/2011 01:24

Step 30: After first reboot, you’ll see this screan.

Step 31: Select “Firewall configuration” and disable it.

Step 32: Select “Services configuration”:

Step 33: Leave enable only these services for minimal installation:

acpid
auditd
crond
haldaemon
irqbalance
kudzu
lvm2-monitor
mdmonitor
messagebus
microcode_ctl
netfs
network
sshd
syslog

Step 34: Reboot your virtual machine.

Step 35: Login your VM and execute:

nano /etc/sysconfig/network-scripts/ifcfg-eth0

Step 36: Remove HWADDR line to prevent ethernet issues.
Save the document by typing CTRL + O, Enter, CTRL + X, Enter.

Step 37: Copy ethernet configuration.

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak

Step 38: Execute Set-LinuxVM to give internet access to VM. So we can do latest updates.

Set-LinuxVM -VM "CentOS 5.6 x64" -Distro "Centos" -Username "root" -Password "password" -Hostname "localhost.localdomain" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1"

Step 39: Execute the command below to update your VM.
Press “Yes” for the further questions.

yum update

Step 40: Clear ethernet configuration.

1
2
rm -rf /etc/sysconfig/network-scripts/ifcfg-eth0
mv /etc/sysconfig/network-scripts/ifcfg-eth0.bak /etc/sysconfig/network-scripts/ifcfg-eth0

Step 41: Clean bash history with the command below.

history -c

Step 42: Turn off your Virtual Machine.

Step 43: Right click on Virtual Machine and click “New template”.

Step 44: Put template information.

Step 45: Leave hardware properties as default.

Step 46: Most important! Choose “[Customization not required]” to provision Linux VMs.

Step 47: Choose your library server, then choose a share path.

Step 48: Click “Create” button to start creation process.

Step 49: Go to template properties. Type distro name to the “Tag” field.

Step 50: Go to “Custom Properties” tab. Type username into first field, type password into second field.

So with these changes, Set-LinuxVM looks for distro, username and password information from template.
You won’t need to use them again.

If you create a Linux VM from this template, use Set-LinuxVM like below:

Set-LinuxVM -VM "Linux Test 01" -Distro "Template" -Username "Template" -Password "Template" -Hostname "centos.yusufozturk.info" -IPAddress "192.168.2.2" -SubnetMask "255.255.255.0" -GatewayAddress "192.168.2.1" -VMTemplateName "CentOS 5.6 x64" -NewPassword "NewRootPassword!"

You should use Set-LinuxVM version 2.3 or newer to use template functionality.


Comments (3)

Yusuf Ozturk » New Release: Set-LinuxVM v2.3 (Unattended Linux VM Configuration Tool)

June 30th, 2011
23:49:29

[…] How to create Linux VM template for Set-LinuxVM: how-to-create-centos-5-6-template-on-scvmm-2008-r2-part-1 how-to-create-centos-5-6-template-on-scvmm-2008-r2-part-2 how-to-create-centos-5-6-template-on-scvmm-2008-r2-part-3 […]


Polk

December 27th, 2011
09:17:48

You said “You should use Set-LinuxVM version 3.3 or newer to use template functionality.” on http://www.yusufozturk.info/virtual-machine-manager/how-to-create-centos-5-6-template-on-scvmm-2008-r2-part-3.html I have only been able to locate 2.3 is there a 3.3?


admin

December 27th, 2011
09:24:09

Sorry, that should be 2.3 instead of 3.3.

I’m still working on version 3 but it will be released with Windows Server 8. There are many improvements for Linux server with Server 8.

Thanks.
Yusuf



Leave a Reply