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

Badges
MCSE
Community

Cozumpark Bilisim Portali
Posted in Virtual Machine Manager | 3 Comments | 7,637 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.