Archives for: June 2008

June 17th 2008

PermaLink Tuesday 17:46 pm, by JeZZo >>>MSGFORM<<<, 321 words, VIEWED 430 TIMES   English (AU)
Categories: Virutalisation

This post title is "Script to Backup VM on ESX"

Hi,

For a while now we have been testing various 3rd party tools to backup our vmware servers. Most of them are doing snapshot or some other ninja stuff, which i dislike due to my old schoolness.

I finally had some brain space to think about this issue and this is what I came up with.

From a putty shell on the console. (Don’t forget the case sentivitiy & make sure your servers are running vmwaretools)

switch to root

su

create a directory in the vmfs

cd /
mkdir /vmfs/volumes/XenApp/backup

create a local scripts directory

mkdir /myscripts

using vi I created a script

cd /myscripts
vi vmbackup.cgi

Code:

#!/bin/sh
echo Clearing Backup
rm -f /vmfs/volumes/XenApp/backup/*.*
echo Shutting Down Server
vmware-cmd /vmfs/volumes/XenApp/SRV1/SRV1.vmx stop trysoft
echo waiting 10m
sleep 10m
echo Performing Backup to Local Disk
cp /vmfs/volumes/XenApp/SRV1/*.* /vmfs/volumes/XenApp/backup
echo Starting Server Up
vmware-cmd /vmfs/volumes/XenApp/SRV1/SRV1.vmx start

I did a chmod to allow root the excute the file, i used 0777 because i am lazy

chmod 0777 vmbackup.cgi

ESX uses crontab, to setup the scheduled job

crontab -e

Code:

MAILTO=team@ozctx.local
30 23 * * * /myscripts/vmbackup.cgi

I believe the crontab works best with cgi, i added to sleep to make sure, also i am unsure if the MAILTO will acutally work.
Now you can sit back and relax! :)

Handy Crontab Header
MAILTO=mycronic@example.com
# minute (0-59),
# |      hour (0-23),
# |      |       day of the month (1-31),
# |      |       |       month of the year (1-12),
# |      |       |       |       day of the week (0-6 with 0=Sunday).
# |      |       |       |       |       commands
3       2       *       *       0,6     /some/command/to/run
3       2       *       *       1-5     /another/command/to/run



Shortcut Crontab Header
Instead of the first five fields as above, one of these special strings may be used: 

string          meaning
------          -------
@yearly         Run once a year, "0 0 1 1 *".
@annually       (same as @yearly)
@monthly        Run once a month, "0 0 1 * *".
@weekly         Run once a week, "0 0 * * 0".
@daily          Run once a day, "0 0 * * *".
@midnight       (same as @daily)
@hourly         Run once an hour, "0 * * * *".
Permalink BEFORE3 feedbacksAFTER
PermaLink Tuesday 17:55 pm, by Paullo >>>MSGFORM<<<, 272 words, VIEWED 248 TIMES   English (AU)
Categories: XenServer Virutalisation

This post title is "Add a physical hard disk drive to XenServer"

Aspired by Citrix Conference, decided to go VIRTUAL. Look at my desk, the only physical thing (you have more, mate, keyboard, mouse…) I have is the desktop PC. So……XenServer is the solution.

…Install XenServer 4.1 on a HP7800 (E6550)
…Push XP CD in the CD Rom to make a Template VM
…Copy the XP image and customize my own
…Decommission my desktop PC (!!!)

Wait, you have got a 250GB hard disk there, with NTFS format, what about that?

…Put on the XenServer PC, can see /dev/sdb
…Mount as a NTFS disk, READONLY

Googling…Tired…The only thing I can do is to format it as Linux format (ext3) and use it as a Storage Repository.

…BACKUP the 250GB somewhere
…dd if=/dev/zero of=/dev/sdb bs=512 count=1 (change to your own device)
…fdisk /dev/sdb (to create the partition)
…pvcreate /dev/sdb
…xe sr-create content-type="Local SR” host-uuid=YOUR_XENServer_UUID
type=ext device-config-device=/dev/sdb1 shared=false name-label="Second HDD”

Done, now I can see from XenCenter the second Storage Repository.

…xe sr-list (let me have a look what has been created)

A lot of fun, isn’t it.

Reference:
How To Add Disk Storage to the XenServer Host http://support.citrix.com/article/ctx116176
How to Create a Local File-based Storage Repository http://support.citrix.com/article/CTX116322

Please note, when you read the second KB from Citrix, you do not need to remove the current SR (which can be disastrous), just create one with the “xe sr-create” command will suffice. You can change the new SR as the default by either command line tool, or in XenCenter GUI.

Permalink BEFORESend feedbackAFTER

June 4th 2008

PermaLink Wednesday 4:08 pm, by Thommo >>>MSGFORM<<<, 229 words, VIEWED 82 TIMES   English (AU)
Categories: Presentation Server

This post title is "Installing .NET 2 + SP1 onto our CPS 4.0 farm"

One of the pre-requisites of migrating a 4.0 farm to 4.5 is that 4.5 requires .NET 2 to be installed.

To deploy I used the following steps:

Download .NET2 and .NET 2 SP1 from MS

Extract contents of .NET installer to new folder in the temp directory:
c:\>\dotnetfx.exe /T:C:\Temp\dotnet2 /C

Edited netfx.msi with Orca and added the property
REBOOT=ReallySuppress

Copied dotnet2 folder to IM network share

Added package in CMC, point to the netfx.msi as the package to add
Specified the following command line parameter:
USING_EXUIH=1

This option will turn off the UI block that the .NET developers wrote into the .msi. The reason they did this was to ‘encourage’ people to use the install wrapper rather than the internal msi.

Don’t specify /q, this will throw up an error and fail the install, and IM always installs msi files quietly so it is not needed.

Service pack 1 for .NET can then be added also.
For this I created a WSF package with IM packager and pointed it to the install wrapper, as there was no need to suppress reboot with the SP1
Use this line in the WSF file:
ShellExecute=\\’servername’\installationmanager$\dotnet2\dotnetsp1.exe,T,open,%TEMPDIR%,/q,NORMAL

Create a Package Group in IM and add the two packages, chain the install (in the proper order of course) and Bob’s your uncle

Permalink BEFORESend feedbackAFTER

Ozzy Citrix Noobs

Hi We call us Citrix Noobs, because we are noobs. We are a group of noobs that is heckless and restless. We are not fearing of anything, and we tend to do the best in daily noobing. Join us if you are also noobs, and will keep noobing.

June 2008
Mon Tue Wed Thu Fri Sat Sun
 << < Current> >>
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            

Search

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 1

powered by b2evolution free blog software