PowerCLI: A Simple VM Backup Script

Just lately I've been doing a lot of work in a Lab environment. Some of the work I'm doing is quite important to me so I decided to workout a way I can backup my VM's onto a backup device. To my surprise this was pretty simple to do.

Here is how I decided the script should function:

  1. Send myself an email telling me that the backup process has started
  2. Import the name of the VM to be backed up and the destination datastore from a CSV file
  3. Create a Snapshot of the VM I want to backup
  4. Create a Clone'd VM from the Snapshot
    • Place the backup onto my Backup Datastore
    • Name the backup <master VM name>-<date stamp>
    • Thin provision the backup
  5. Remove the Snapshot from the master VM
  6. Send myself an email telling me that the backup process has completed

So that's what I wanted to do, this is what I ended up with.

Read the rest of this entry »

Bedtime Reading – EMC’s ISM Book

ISMbookIf you're a virtualisation enthusiast like myself, you'll understand that we don't only need to know about virtualisation. We also need to know about all of the other IT areas that are incorporated into our virtual environment. Storage is a massive part of this. Whether your using iSCSI, FC SAN, NFS or even local storage, it's crucial to make sure you have your storage set up correctly to get the best performance, reliability and availability for your data. Storage isn't one of my strengths. Even though I know the basics, I feel, and have also been told that this can hold me back in becoming a better virtualisation specialist.

Fortunately whilst visiting EMC at the GestalIT TechFieldDay earlier in April, each of the delegates, including myself were given a copy of EMC's book; Information, Storage And Management.

Read the rest of this entry »

London VMware Usergroup 6th May 2010

The Steering Committee are pleased to announce the next UK London VMware User Group meeting, kindly sponsored by RES Software, to be held on Thursday 6th May 2010. We hope to see you at the meeting, and afterwards for a drink or two, courtesy of VMware.

Our meeting will be held at the Thames Suite, London Chamber of Commerce and Industry, 33 Queen Street, London EC4R 1AP, +44 (0)20 7248 4444. The nearest tube station is Mansion House, location information is available here. Reception is from 1230 for a prompt 1pm start, to finish around 5pm. Our agenda is not final at the moment, but looks something like this:

Read the rest of this entry »

VMware vSphere 4.0 Security Hardening Guide – Released

You may or many not have read my Post back in January about the VMware vSphere 4.0 Security Hardening Guide Draft. Well the guide has now been released fully for you to download and review against your Virtual Infrastructure

Overall, there are more than 100 guidelines, with the following major sections:

  • Introduction
  • Virtual Machines
  • Host (both ESXi and ESX)
  • vNetwork
  • vCenter
  • Console OS (for ESX only)

The Guide can be downloaded here: http://communities.vmware.com/docs/DOC-12306

Source

Drobo FS, Where does it fit?

DroboFS-Front-Angle-Press

During GestalIT TechFieldDay, myself and the other bloggers were introduced to the new Data Robotic’s product called the Drobo FS.

About the Drobo FS

The revolutionary Drobo FS was designed with one purpose in mind: to deliver the best file sharing experience ever. From the moment you plug it in and see it instantly appear on your desktop, you’ll know there’s nothing like it. The all-in-one Drobo FS is perfect any connected home, home office, or small office environment needing a simple, safe device for sharing and backing up files over the network.

Read the rest of this entry »

Free! HDS Storage Virtualization for Dummies eBook

Storage Virtualization For Dummies

I came across this free eBook today on the Hitachi website. If you're like me and work with Virtualization products but would like to learn more about Storage Virtualization then is a great freebie to download.

Just click on the following link and fill out the form to get your copy. HDS: eBook – Storage Virtualization for Dummies by Hitachi Data Systems

The object has already been deleted or has not been completely created

Problem

When trying to Power On an old VM I was greeted with this message:

I checked the Datastore and everything seemed to be present and correct. I tried to migrate the VM to a different Host, but again I was shown this error. A quick Google didn't show up anything useful so I decided to check the logs.

running the command  tail /var/log/vmware/hostd.log -f whist trying to Power On the VM flagged these error messages:

  • [2010-03-24 12:11:10.547 'BaseLibs' 129907632 info] readlink /var/run/vmware/7f0f49adb5092b09694cdf456a488d6c: No such file or directory
  • [2010-03-24 12:11:10.547 'BaseLibs' 129907632 info] readlink /var/run/vmware/%2fvmfs%2fvolumes%2f4ad45c8d%2ddb2eadd5%2d411f%2d00237d3c8b86%2fTEST%2dVWB01%2fTEST%2dVWB01%2evmx: No such file or directory

Solution

Read the rest of this entry »

Using ESXTOP With VMware ESXi

Just a quick post about using ESXTOP with VMware ESXi. Obviously in ESXi there is no Service Console so we have to use the vMA (vSphere Management Assistant) to help us. If you haven't installed the vMA on your infrastructure yet, you can download it here: http://www.vmware.com/support/developer/vima/

Once install and configured, login and run the following command: resxtop –server <server name>

You will be prompted to login, use the root user/pass of the Host you want to run ESXTOP on (Note: Logging in as root will not work if the Host is in "Lockdown Mode".). You should then be presented with ESXTOP, I believe it has all of the same function as it did in the Service Console

Here you can see all avaliable options when connecting to a Host using RESXTOP

usage: resxtop [-h] [-v] [-b] [-s] [-a] [-c config file] [-d delay] [-n iterations]
               [--server server-name [--vihost host-name]] [--portnumber socket-port] [--username user-name]
              -h prints this help menu.
              -v prints version.
              -b enables batch mode.
              -s enables secure mode.
              -a show all statistics.
              -c sets the esxtop configuration file, which by default is .esxtop4rc
              -d sets the delay between updates in seconds.
              -n runs resxtop for only n iterations.
              --server      remote server name.
              --vihost      esx host name, if --server specifies vc server.
              --portnumber  socket port, default is 443.
              --username    user name on the remote server.
       for more information on interactive and batch modes
       please see man page for resxtop.

	

PowerCLI: Reconfiguring NTP Servers on ESX Hosts

Just lately I’ve been creating a lot of PowerCLI scripts to help configure various aspects of out ESX environment. We’ve just implemented a new NTP Server to our network. So I was given the job to update all of our ESX Hosts. I didn’t fancy spending all morning manually changing them, so I set to work in creating a PowerCLI script to do the business. Here is the result.

$Cluster = "<cluster name>" 
$Hosts = Get-Cluster $Cluster | Get-VMHost 
ForEach ($Host in $Hosts) 
{ 
Remove-VmHostNtpServer -NtpServer "<old ntp server>" -VMHost $Host | Out-Null  
Add-VmHostNtpServer -NtpServer "<new ntp server>" -VMHost $Host | Out-Null 
Get-VmHostService -VMHost $Host | Where-Object {$_.key -eq "ntpd"} | Restart-VMHostService -Confirm:$false | Out-Null 
write "NTP Server was changed on $Host" 
}

Is It A Bird? Is It A Plane? No, It’s….The Cloud!

 

Cloud

Why, oh why, oh why, has every man and his dog started calling everything Cloud? Cloud Hosting, Cloud Apps, Cloud Services? Is it me, or was it only 6 months ago that these were called Virtual Hosting, Web Apps, Web Services? What's changed? In my eyes, nothing! I hadn't really noticed this until the other day when I was attending a "Cloud" seminar.

Cloud Hosting: What makes it Cloud? It's just Hosting on a Virtualization platform. Cloud Apps: Why are they Cloud Apps? They are just applications hosted over the Web, no? If we follow this trend we'll soon be calling WebMail, CloudMail!

Read the rest of this entry »