Citrix XenApp

Your Journey towards cloud.

Virtualization Picking up Speed

Are your Skills keeping up? Skill up. Be Relevant

Are you a System Admin

Learn Citrix XenApp, Its future.

Citrix XenApp

Industry-leading virtualization platform for building cloud.

Cloud Computing in Demand

Learn how to build cloud on Citrix XenApp.

Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

Friday, 8 February 2013

Enable Auto Startup After Power Failure For Apple Mac Mini

I recently came across a very useful tidbit after receiving several inquires asking how to configure an Apple Mac Mini to automatically startup after a power failure. This is extremely useful for situations where power is eventually restored and you are not physically around to press the power button. Automatically starting up after a power failure is not a new feature of the Mac Mini and it actually exists on most modern day systems and can be configured using a variety of tools.

The challenge arises when you are running ESXi, how do you go about enabling this functionality in ESXi itself? Well the answer is actually quite simple, you can enable this outside of ESXi. Normally to enable this feature you can either run a setpci command on UNIX/Linux system or configure the energy saver settings in OS X. Several folks from the VMTN community such as zippytiff and twuhabro have already confirmed having success using the latter option when booting OS X off a USB or SD card to modify the energy saving settings.

I finally got a chance to look into this a bit more for myself and with a bit of research, I found several other methods which also works and may potentially be easier.

Note: I have heard that historically the auto startup flag has not persisted in older Apple hardware, but for the new Mac Mini 5,3 and 6,2, they seem to be persisting without any issue from my testing. YMMV depending on your hardware and/or firmware.


Method 1 (Configure in OS X)

If you already have OS X install on your Mac Mini, then you just need open up the System Preferences and enable auto startup under the Energy Saver section. Once that has been enabled, you can then perform your ESXi installation.

If you already have ESXi installed, then you can use either Method 2 or 3.

Method 2 (Configure using bootable Ubuntu on USB)

We can create a bootable Ubuntu image running off of a USB device (minimal footprint) and run the following setpci command to enable auto startup:
setpci -s 0:1f.0 0xa4.b=0
If you are interested in the gory details on the above command, please refer to this great article which breaks it all down for you. After you have created your Ubuntu image using the instructions in the above link, you can boot off of the USB device (Make sure to hold down ALT/OPT key so you can select to boot off of the USB device). Once Ubuntu has booted up, you will right click on the purple icon on the upper left hand corner and type in terminal.
You will then launch the terminal application and type the following to change over to root user.
sudo su -
Finally, you will enter the above setpci command which will enable the auto startup. At this point, you can type reboot and remove the USB device.

Method 3 (Configure using bootable OS X on USB)

Another method is to create a bootable OS X image running off of a USB device and change the power management settings by using the pmset utility. To enable auto startup, run the following command in the terminal:
pmset autorestart 1
You will need the original OS X installer and if you are using either Lion or Mountain Lion, you can use Lion DiskMaker to help you create the bootable USB image (Make sure to hold down ALT/OPT key so you can select to boot off of the USB device). Once the OS X installer boots up, at the top select Utilities and click on the Terminal application.
Go ahead and run the above command to enable auto start and then type reboot and remove the USB device.

The last thing to do of course is to actually test this out on your Mac Mini. Go ahead and let the system boot up and then yank the power cord and then give it a few seconds before plugging it back in. You should see the Mac Mini automatically power back on after you plug the power back in.

Sunday, 1 July 2012

How to make an OS X Lion USB thumb drive

Here are three different ways to put Lion on a USB thumb drive. If you buy and install Lion from the App Store  it downloads all 3Gigabytes from the App Store, installs Lion, then deletes the installer!  So when you go to install it on another machine it needs another 3Gigabyte download! Here’s how to make a re-usable installer.
Option 1: Put a full bootable Lion installation on the USB Drive with a recovery partition.
What you need: an 8G thumb drive and OS X Lion from the App Store.
What you get: A USB stick you can boot off and repair your Lion installation from.
Download the Lion installer from Apple App Store. DO NOT INSTALL IT ONTO YOUR COMPUTER OR THE INSTALLER WILL DELETE ITSELF. MAKE A COPY OF THE INSTALLER.  If you have already installed it and it has deleted itself,  go back into the App store and click on ‘purchases’ and next to Lion it will say ‘Installed’. Now option-click on ‘purchases’ and ‘installed’ will change to ‘install’ so that you can re-download the installer.
Format your Thumbdrive using a GUID Partition Table, and ‘ Mac OS Extended (Journaled)’, then you can run the Lion installer and install Lion onto the thumb drive.
Option 2: Create a Lion Recovery Disk.
You’ll only need a 4G USB Drive for this option.

What you get: A USB stick you can repair your Lion installation from, but not run Lion from.
If your Macintosh has an existing Lion Recovery partition (this will be the case if Lion came pre-installed on your machine when you purchased your computer from Apple), you can use this method. It will not be a fill installer but it will use the internet to install Lion onto another computer. It involves downloading a program from apple called ‘Lion Recovery Disk Assistant’
To test if you have a Lion recovery partition, Just hold down Command-R during startup and Lion will give you the option of going into recovery mode if the recovery partition is there.

Option 3: Make a Lion Installation USB Thumb drive like the one you buy from Apple.
What you get: A USB stick you can install Lion from – like the one that comes from Apple.
You’ll need an 8G USB thumbdrive.
1. Purchase and download the Lion Installer via the App store as in Option 1 above.
2. Right-click on the installer and select “Show Package Contents” and find  the file called  ”InstallESD.dmg” in the SharedSupport folder.
3. Use Disk Utility to ‘Restore’ this dmg file to a thumb drive to make a Lion Installation USB drive like you buy from the Apple Store. (the thumb drive must first be formatted as Mac OS Extended (Journaled) with GUID Partition Table.)

Saturday, 30 June 2012

How to Air Print to ANY printer from your iPod, iPad or iPhone

Apple has introduced a ‘print’ button onto iPads, iPhones and iPods to allow you to print directly to a printer from your iOS device. Unfortunately  you need a special AirPrint enabled printer. Thankfully there is a free application called ‘AirPrint Activator’ that allows you to print to any printer, here’s where to get it and how to use it.
AIRPRINT
On your iPhone at the bottom of some apps is a ‘share’ button. If you click this button you get a menu of different ways to share the content, one of these options is ‘print’ as shown below.
Share Button


Print Button
When you press the ‘Print’ button you will be given an option to choose a printer, but unless you have a special AirPrint printer’ you will see no printers here at all.  (I have a Canon IR5000, a Canon inkjet, a Xerox and a HP and none of them are AirPrint!)
If you don't have an AirPrint printer there will be no printer here to select
AIRPRINT ON NON-AIRPRINT PRINTERS
If you want your non-airprint printer to appear then you can download the following free application called ‘AirPrint Activator’ from netputing.
Click here to go to the netting page to find the latest  AirPrint Activator.
Click here to download version 2  directly.
This will download a little application called ‘AirPrint Activator’. You may need to click on the ‘downloads’ button in Safari to find it.
Click on the 'Show Downloads' button to find it.
Now run airPrint Activator by  double clicking the AirPrint Activator application. You should get a window that looks like the one below. Press the slider to ‘Turn On’ AirPrint.
In order for a printer to appear in AirPrint Activator you need to give people permission to print to it by sharing it. To do this go to System Preferences (Under the Apple Menu on the top left of your screen) and then Click on ‘Print & Scan’.
To find printer sharing click on 'Print & Scan'

In printer sharing preferences you need to select your printer on the left and then click the ‘Share this Printer’ box.
The final step - turn on Printer Sharing

The Printer should now appear in your iPad or iPhone printing menu!

Sunday, 24 June 2012

How to create a disk image of a DVD or CD using the terminal


This is a little bit advanced, but useful.
1. Insert the DVD/CD into your drive.
2. Run the TERMINAL application (In your Appplications Utilities Folder)
You will get a little window with a prompt something this: Macintosh:~ wayne$
3.Type the following and then hit return:
drutil status
It will give you some info like this:
Vendor Product Rev
SONY DVD RW DW-U21A AADB
Type: DVD-R Name: /dev/disk2
Cur Write: 4x DVD Sessions: 1
Max Write: 4x DVD Tracks: 1
This is information about your DVD/CD drive and the important thing to notice is the name, it will be /dev/disk1 or /dev/disk2

4. If it is disk1 type this: (If the name is different (eg disk2) then just replace all the disk1 references with disk2.)
diskutil unmountDisk /dev/disk1
This will make the DVD icon disappear from the desktop.
5. Type the following:
dd if=/dev/disk1 of=~/Desktop/file.iso bs=2048
6. Wait about 10 or 20 minutes while it now makes an image of the CD/DVD onto your desktop.
When it’s finished it will give a message like this:
2170784+0 records in
2170784+0 records out
4445765632 bytes transferred in 1335.111379 secs (3329884 bytes/sec)
7. Type this to make the DVD reappear on the desktop and you are done:
diskutil mountDisk /dev/disk1

Friday, 22 June 2012

How to connect your iPhone or iPod to your home stereo.


To connect your iPhone, iPad or iPod to your home stereo you just need a 3.5mm to RCA cable like this cable here. The RCA cable plugs into the rear of your stereo and the 3.5mm plugs into your iPhone headphone jack.
When plugging into the back of the Stereo Amplifier, you can use almost whatever inout you want: CD-INPUT, TAPE-IN, TV-IN, DVD-IN or the AUX-IN,  but do not use the PHONO-IN as it is designed specifically for a record player and won’t sound as good.
For the best results set your iPhone volume to about half. If it’s too quiet you may get noise and hiss. If it’s too loud you may get some distortion.
You can have the USB charger plugged into the iPod at the same time.
If you want you can use an Apple iPod dock, and leave the audio and charger cable plugged into the dock permanently. The dock has a line out so that it doesn’t matter what volume the iPod is set to, and it will also charge your iPod, and has a remote control.


If you are buying a new Stereo, Pioneer and others are now including AIRPLAY into some of their amplifiers. The amplifiers have a Wi-Fi receiver built in which means you can play from your iOS device over your Wi-Fi (Airport) network directly to your Stereo with no loss of quality. You don’t need to connect any cables.

Friday, 25 May 2012

iPhone Error 3194 and Solution

If you have been using iOS 4 on iPhone and if you have downgraded iOS4 to 3.1.3 then you might have encountered this Error 3194. This error is associated with firmware.
iPhone Error 3194

This error occurs when you have an unsigned firmware. This is because, Apple now signs the firmware and if your firmware has no authenticity then you are bound to get this error. However, getting back on the signed firmware might not solve this error.
So, how do you fix this error?

Solution to Error 3194

In order to fix the Error 3194 and enable the users to downgrade iOS 4 to 3.1.3, you need to follow the steps discussed below.
It is important to note that this solution is applicable to all the operating systems and any version you are using.
Now quickly follow these steps:
  • First, you have to quit iTunes.
  • In  Mac OS X, search out for host file: /etc/hosts
  • If you are using Windows OS,then locate c:\windows\system32\drivers\etc\hosts
  • Now using the administrator privileges open the host files.
  • Now, at the bottom of the host file, you have to add the following line:
  • 74.208.105.171 gs.apple.com
  • Once you have done this, connect your iPhone to your computer or laptop.
  • Plus, now launch the iTunes.
  • Now put your iPhone in the Device Firmware Upgrade (DFU) mode.
  • In order to put the phone in DFU mode, first turn off the phone.
  • Now hold the Home and Power button simultaneously for exactly 10 seconds.
  • The computer should give you a beep sound and the screen would turn black and blank.
  • Now you are in the DFU mode.
  • Now use the normal Restore option in iTunes.
  • After your upgrade is finished, you will have to remove “74.208.105.171 gs.apple.com” from your host files.
  • This will update the iTunes properly.
  • This is the IP address of signing server to associate with apple.com
This process is applicable to iPad and iPod as well.
So, now that you have learnt this process, you can be free from Error 3194.

Thursday, 5 January 2012

How To Edit Your Hosts File : Snow Leopard (OS X 10.6)

In Snow Leopard, accessing the hosts file is very similar to Ubuntu. Begin in terminal and use your favorite editor, even is you wish to call a GUI text editor, it is easier to do so from terminal.
The file will look a bit more like Windows, only with a little less explanation. Again we are going to redirect Facebook.
This time it seems that 0.0.0.0 is a loopback and will direct you to the computers Apache test page.