Showing posts with label VMWare. Show all posts
Showing posts with label VMWare. Show all posts

15 Jan 2012

How to install Vmware Vsphere Hypervisor (ESXi 4.1.0) onto a USB stick.

Want to have a portable ESXi on a stick? Here's how to do it.

Purpose


To demonstrate how to install Vmware Vsphere Hypervisor (ESXi 4.1.0) on a USB stick.
We'll be covering two different methods to accomplish the task.
  • Install by writing the Vsphere Hypervisor (ESXi 4.1.0) image onto a USB Stick.
  • Install by using the native installer.

Required



Method 1

1. The install ISO image from Vmware:
2. A USB Stick with at least 900MB of space.
3. RMPrepUSB
An extremely handy tool that makes partitioning, installing grub4dos, and boot preparation simple.
4. Winrar:

Method 2

1. The install ISO from Vmware:
2. A USB Stick with at least 900MB of space.

Installation



Method 1

The basic idea is to extract the ESXi image from the Vmware Vsphere Hypervisor (ESXi 4.1.0) install ISO and write it to the USB Stick using RMPrepUSB.

Extract Image

Open the ISO image, VMware-VMvisor-Installer-4.1.0-260247.x86_64.iso with Winrar
and find "imagedd.bz2" and open it up.
Winrar1
Once you've opened "imagedd.bz2" extract "imagedd" from it.
Winrar2

Write Image onto USB Stick

Plug in the USB Stick and then open RMPrepUSB.
The only things we need to concern ourselves with are the white box at the top that lists all detected drives, and the blue button, File -> USB.
Make sure to select the correct drive from the white box.
Next, click on  File -> USB button.
rmprep1
Select All Files from the drop-down and select "imagedd" and click Open
rmprep1
Several Prompts will appear, keep the defaults and click OK for each one.
rmprep3
This is your last chance to verify that you have selected the correct image/drive.
*Make sure you have the correct drive selected or you can potentially overwrite the wrong USB Stick/Hard drive*
When you've verified click OK.
rmprep4
rmprep5
rmprep6
Now we're done writing the image onto the USB Stick.
You now have a bootable USB Stick with Vmware Vsphere Hypervisor (ESXi 4.1.0) installed.

Method 2

The process is to select the USB Stick as the install device in the Vmware Vsphere Hypervisor (ESXi 4.1.0) installer.

Begin Regular Install of ESXi

With the USB Stick plugged in, boot the server/virtual machine from the Vmware Vsphere Hypervisor (ESXi 4.1.0) install media.

 

Select Proper Install drive

Proceed through the screens until you get to the Select a Disk screen.
*Be absolutley certain that you select the proper device as to not overwrite the internal hard drive if you have one.*

Proceed through the installation.


Congratulations, you now have a bootable and portable Vmware Vsphere Hypervisor (ESXi 4.1.0) install on a USB Stick!

by Jose Rodriguez http://www.virtualgeekhub.net/content/how-install-vmware-vsphere-hypervisor-esxi-410-usb-stick

5 Jan 2012

Convert from thick-provisioned disk to thin and vice versa on ESXi 4.1

Thin to thick (easy :-): within the vSphre client  open datastore browser and right click on vmdk file you want to convert to think and select Inflate.

Thick to thin (a little bit "pro")
- Connect to host via SSH and use the below syntax: 


1. Shutdown the VM so that we can get exlusive access to the virtual disk.
2. Log into your ESX host using SSH and cd into the VM directory that contains your virtual disk.
3. Run vmkfstools –i srcDisk -d thin dstDisk
4. Edit the settings of VM and remove the existing drive srcDisk. Add a new hard drive and choose the existing drive option then browse to your new thin dstDisk
5. Boot the VM and enjoy.

Note: Dont forget to go back to ESXi host remove the old .vmdk and -flat.vmdk files once you are sure that your VM is operating normally off the thin disk.

27 Jul 2010

vSphere client on Windows 7

http://www.techhead.co.uk/running-vmware-vsphere-client-on-windows-7

Many of you, like myself, have started running Windows 7 as their primary desktop OS and find it to be a massive improvement over Windows Vista on so many levels.
One of the very few inconveniences I have found with it, and this is not an bug or problem with Windows 7 itself, is the inability to run the VMware vSphere Client.
UPDATE: Good News – This issue has now been resolved in VMware ESX/ESXi 4.0 Update 1 (U1).
When attempting to run the client the following errors are received and you are unable to proceed any further:
“Error parsing the server “

Error parsing the server “<server name” “clients.xml” file

“The type initializer for ‘VirtualInfrastructure.Utils.HttpWebRequestProxy’ threw an exception.”

The type initializer for ‘VirtualInfrastructure.Utils.HttpWebRequestProxy’ threw an exception

Luckily there have been a few good VMware forum posts such as this one by ftubio which outlines how to successfully run the vSphere Client under Windows 7.  I thought I’d put together this brief post with a few screenshots to outline the required steps.
I am running the x64 version of Windows 7 so you will notice that any reference to the ‘Program Files’ will have an ‘(x86)’ at the end of it.  If you are running the x86 version of Windows 7 then ignore the ‘(x86)’ portion of the directory path (ie: C:\Program Files (x86) –> C:\Program Files).
Follow these 4 basic steps and you’ll be up and running in no time!

Step 1.

imageDownload this DLL called system.dll
*Note:  This DLL is usually found in the  %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\  directory of a non Windows 7 PC with  .NET v3.5 SP1 installed.

Step 2.

Once downloaded install it in the “C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib” directory.  If the ‘lib’ directory doesn’t exist then create it and drop the dll file into it.
VMware vSphere Client Windows 7

Step 3.

Next edit the “VpxClient.exe.config” file which can be found in the “C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher” directory and add the following three lines to it in the location specified in the screenshot below.  Then save the changes.


VMware vSphere Client Windows 7

Step 4. 

From the Windows 7 ‘System Properties’ click the ‘Advanced’ tab and then the ‘Environment Variables’ button as we want to add a new ‘System’ variable.
VMware vSphere Client Windows 7

Create a new ‘System’ variable called ‘DEVPATH’ and assign the following variable value:
C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib

VMware vSphere Client Windows 7

You are now ready to start using the VMware vSphere Client on your Windows 7 machine!  Some people have reported having to run the client as an ‘Administrator’ so if you are having difficulties it may pay to try this – I luckily didn’t experience this problem. Also you will likely have to reboot your machine (or restart the explorer.exe process) for your new path information to come into effect.

VMware vSphere Client Windows 7

26 Jul 2010

Enable SSH in ESXi 4.0



By default SSH is disabled in ESXi however you can enable it by follow these steps:


  1. At the Administration Windows press Alt+F1. You will get a black screen
  2. Type the word unsupported and press Enter
  3. Enter your root password and press Enter, you will get a prompt
  4. Change directory into /etc
    #cd /etc
  5. Open inetd.conf in vi
    #vi inetd.conf
  6. arrow down until you see #ssh stream tcp…
  7. With the cursor on the # type x to delete the #
  8. Type :wq! to exit vi and save your changes
  9. Restart host or restart inetd process

Restart inetd process

    • Now we need to find the process running inetd. To do that run the following command
      #ps -a grep inetd
    • Find the process number, lets pretend it is 1234. Run the following command to kill the inetd process
      #kill 1234
    • Now we need to start inetd again
    • #inetd
    • You then will be able to access host via SSH

    17 Oct 2009

    Virtualize a Windows system with VMware vCenter Converter

    Virtualize a Windows system with VMware vCenter Converter

    August 17th, 2009 by Luis Ventura
    The title should have been transition from bare metal to virtual with VMware vCenter Converter. VMware foresaw the existence of server configurations that were either too complex or labor intensive to be recreated from scratch, that’s why they came up with VMware vCenter Converter. What it does is convert a bare-metal system in to a VMware virtual machine ready to be used.
    • VMware vCenter Converter is available for free from the VMware website.
    • Keep in mind you will need another drive or remote storage to store the new virtual machine.

    How-To

    • Start VMware vCenter Converter and click on Convert Machine.

    • Select source type: – This is where you get to choose the system you wish to convert. I choose Powered-on machine, to convert the local system.
    • Specify the powered-on machine – Obviously, select This local machine.

    In this window you will need to provide the following:
    • Select destination type – this option will create a virtual machine for use on VMware virtual infrastructure virtual machine or VMware Workstion or other VMware virtual machine.
    • Select VMware Product – Because I selected VMware Workstion or other VMware virtual machine in the option above, I have to specify the version of Vmware Workstation the virtual machine will be compatible with.
    • Name: – Give a name to the virtual machine or use the suggested one.
    • Choose a location for the virtual machine – Select the location where VMware Converter can output the new virtual machine to be created.
    • And then hit Next to continue.
    Remember, you need a second disk where VMware Converter can output the virtual machine while it’s being created. You can not use the same disk you wish to virtualize to stored the vm.

    • In this windows you can change some aspect of the future virtual machine. Among the possible changes you can change: the allocated RAM, number of processors, and number of NICs. If you do not wish to make any changes hit Next to continue.

    • VMware vCenter Converter will present with an overview of the setting for the new virtual machine.

    • VMware Converter will present you with a display of the progress being made. Allow for a considerable amount of time for the conversion to complete.

    • After the process is done check on the drive or location where virtual machine was to be stored during the process.

    Congratulations, you now have a virtual machine. Try it out to find out how the process went.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Using VMware vCenter Converter 4 to create a Virtual Center Template

    February 20, 2009
    I have a set of standard template Virtual Machines under VMware Workstation 6.5 that I use to spin up VMs, Workstation doesn’t have a native template feature but I get a VM to a point where I’m happy with the build, VM tools installed, Windows updates done etc. and then I sysprep it and shut it down.
    At this point I mark it read-only and when I want to create a new Windows virtual machine I just right-click it and create a linked-clone.
    This is handy for me as each VM only consumes small amounts of space as they are all just differential snapshots.
    however, if I want to change the base template (for example to update from SP1 to SP2) this does present an issue as it has lots of children which depend on it so I can’t change the parent VM, in this instance I create a full clone of the base VM and update it and create further linked clones from it (essentially creating a “fork”).
    image
    I also have an ESX server farm in my lab and I like to keep my standard images consistent between workstation and ESX/VC to to save me creating and patching multiple templates.
    I recently created the following templates and wanted to get a consistent copy on both my lab ESX system and my laptop VM Workstation system, I noted VMware Convertor 4.0 had been released so thought it would be an ideal time to use it to get a fresh set of images with all the current Windows updates applied.
    • Windows Server 2008 x64 as a virtual centre template on my ESX farm
    • Windows Server 2003 Ent, x86, SP2 as a read-only VM on VMware Workstation 6.5.
    1st task is to import the Windows Server 2003 image from Workstation to ESX/VC using VM Converter 4.0;
    Note the source machine options.
    image
    VM Workstation VM Information
    image
    Select appropriate target – in this instance it was an ESX farm, controlled by Virtual Center so I chose VMware Infrastructure Virtual Machine and put the hostname and credentials for my Virtual Center host, you can of course go direct to each ESX host if you don’t have VC.
    image
    This is a new feature, you get shown all the VM’s and can choose the appropriate storage group to on each host because it queries VC
    image
    It checks it out against the host and VC image
    Some better laid out options for the conversion (reminds me of the PlateSpin UI)
    image
    Options to change CPU count and SCSI controller
    image
    Options to customize service start-up options post-conversion, for example if you have an application that you don’t want to start-up until you’ve checked the target VM is ok (not applicable in this case as it’s a vanilla template, but handy to know).
    image
    These are the new sync options – and a warning that I don’t have sysprep pre-loaded in this VM – not required at this stage as the VM already has sysprep applied within (will change this once its on the target as i can apply a customization template)
    image
    Note – I chose to install VM tools, as the ESX version is likely to be different from my Workstation version that is included in the image.
    image
    Usual summary screen… much nicer UI than previous versions
    image
    Running the conversion process, this is over a GbE network connection.
    image
    Note new job copy option.. very handy in previous versions you had to do it from scratch each time.
    image
    All done in about 20mins, although it did sit at 95% 1 minute remaining for about 10mins :)
    image
    And it shows up in Virtual Center as a normal VM
    image
    Worth remembering to use the ‘notes’ field in both workstation and ESX, Converter brings them across so you’ll always know this VM’s history
    image
    Now, running under ESX
    image
    at 1st logon its detecting newly installed hardware drivers and running deploypkg.exe, which I assume converter injected to do post-conversion tasks
    The auto-install of VMtools threw up some errors over unsigned drivers, so had to manually ok the dialog boxes and then it rebooted itself, wonder if I hadn’t logged on manually it may have done all this in the background automatically.
    Once the VM was across I got a service failure on boot up, after I did some digging, it turns out it is something related to VMware tools the vmhgfs service failed to start due to the following error: Cannot create a file when that file already exists – I guess this is a left over from the Workstation version of VM Tools as a bit of digging revealed that this driver is related to host/guest shared networking which isn’t in ESX. – in this instance I removed the registry key relating to the driver and all was good (do this at your own risk!)
    image
    I also had a failed device in device manager, I right clicked on the VMware Replay Debugging Helper and chose uninstall and all was well, maybe I could have uninstalled/reinstalled VM Tools instead.
    image
    image
    A reboot and all was running ok, I then shutdown the newly cleaned up VM and converted it to a Virtual Center template and was able to apply my normal customization templates (see this post for more info on that).
    Next part of this article will be to convert the Windows 2008 x64 template I have in ESX into a VMware Workstation image and all my templates will be consistent.

    Total Pageviews