Posts tagged VMWare

Running the Citrix License Server Virtual Appliance in Vmware

I thought it was cool when I found that Citrix had a Citrix License Virtual Appliance.

To me, it was one less server to “manage” plus it would allow add it to my VMWare environment to make it highly available.  Well, i was disappointed to find out it was only for xenserver, so I set out to use it with VMware (because I dont like when a company tells me i cant)

 

This is going to take some time, and you will need to download a few things, so pay attention

You need:

Citrix License Server XVA from the Citrix Website

VirtualBox 4 from Oracle

CentOS 5 x64 Live CD ISO

XenServer ISO

XenConvert

 

How to Proceed:

Create a VM in VMWare and install XenServer (give it at least a 30GB disk)

Note the new IP of your XenServer and connect to it via your browser and follow the link to Install XenCenter

From XenCenter Load up the Citrix Licensing XVA file

Boot the VM once and then shut it down (dont configure it)

Export the License server again to an XVA (C:\Temp)

 

Right now you are wondering WHY we are going back to XVA, let me explain.  Citrix “mangled” the header of the XVA file so only XenServer could import it.  If you try to convert it directly with XenConvert you will get an error.

 

Install and Run XenConvert

Choose to Convert from “Xen Virtual Appliance” to “Open Virtualization Package” and just accept all the default options

When the Converter finishes, you will be left with a VHD and an OVF file.

 

Install and Run VirtualBox

Create a new VM called “Citrix License Server Virtual Appliance”

Choose Redhat 64-bit as the OS

Give it 512mb of RAM

Remove / Disable the Sound Card

Choose the previously created VHD (from XenConvert) as the harddisk

Boot it once, you will get an error “Error 13: Invalid or unsupported executable format”

Shut down the machine and from the menu choose “export appliance” and export it as an “OVF” <–THIS IS IMPORTANT

 

Open up the newly created OVF XML file with your trust text editor and change the line that read

Note: I take ABSOLUTELY NO CREDIT FOR THE FOLLOWING, this was a post from an excellent blog called IT Secure Net and you can find the post here

<vssd:VirtualSystemType>virtualbox-2.2</vssd:VirtualSystemType>

with

<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>

 

 

and also

<Item>
<rasd:Address>0</rasd:Address>
<rasd:Caption>sataController0</rasd:Caption>
<rasd:Description>SATA Controller</rasd:Description>
<rasd:ElementName>sataController0</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:ResourceSubType>AHCI</rasd:ResourceSubType>
<rasd:ResourceType>20</rasd:ResourceType>
</Item>

to

<Item>
<rasd:Address>0</rasd:Address>
<rasd:Caption>SCSIController</rasd:Caption>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>SCSIController</rasd:ElementName>
<rasd:InstanceID>5</rasd:InstanceID>
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>
</Item>

Now deploy the OVF to your ESX Server.  You will get a couple of warnings about the OS and asking you to continue, just hit YES

Once it finishes, start up your new VM, which should bring you back to the familiar “Error 13: Invalid or unsupported executable format” we saw earlier.

 

This whole time we spent it just converting the Appliance.  Now we need to get it to run on VMWare.

Find that CentOS 5 X64 and Attach it to the new VM

Boot the VM and when prompted hit F5 “Linux Rescue”

Enable the Network Interface when prompted (you will need Internet Access)

From the shell, run the following commands

now view your /boot/grub/menu.lst, if it already has an entry for the new kernel (2.6.18-348.6.1.el5) then you are good to go, otherwise lets use grubby to add it

Now reboot (dont forget to disconnect the CentOS 5 ISO) and configure your new license server and Enjoy

If for whatever reason you get the “Error 13” screen again, re-load the linux rescue and delete the old entries for the el5xen kernel and img from the /boot/grub/grub.conf file

There you go Citrix, I just did your work for you!!

Facebook Twitter Email Linkedin Digg Delicious
nsvm4

Running NetScaler VPX in VMWare Desktop 7

I have production NetScalers, but I also wanted to have a NetScaler on my desktop that I could quickly jump into, make changes, and not worry about breaking something.

Citrix offers a NetScaler Image for ESX, the problem is that the image wont work / load correctly in VMWare Desktop 7, but with a few steps you can have NetScaler running on VMware Desktop in no time.

 

Before I begin, I’m assuming that you have VMWare Desktop 7 already Installed, and that you have a login to Citrix.com, also, I’m working with NSVPX-ESX-9.2-50.4

 

  1. Go to Citrix.com and Download the NetScaler VPX for ESX (If you dont see any downloads, you must login first)
  2. Unzip the file using your favorite utility, Once done you should be left with 3 files (.vmdk, .mf, and .ovf)
  3. Create another folder where your “Converted” VM will go
  4. Open up the command prompt (Start -> Run -> CMD) and CD over to the OVFtool folder (for me located at C:\Program Files\VMware\VMware OVF Tool)
  5. Run this command

  6. Now that the command completed, look in your “converted” folder and you should see 2 files (.vmx, .vmdk)
  7. Using your favorite editor, open up the .VMX file and find the line that reads

    Replace that line with
  8. Save the .VMX file, and Move your newly created “converted” folder to wherever it is that you keep your VM machines
  9. Open VMWare Desktop 7, click on File -> Open, find your “converted” folder and select the .VMX file (its probably the only file you can see in the folder)
  10. Now click the Green Start button and off you go, you should end up in a prompt for  asking you for the NetScalers IPv4 address.
  11. Make sure to setup your IP based on the type of Networking you have setup for your VM, if you are using bridged, pick an IP from your routers range, if using NAT assing a 192.168.26.x IP (VMWare Default Range for NAT) and forward port 80 to that IP, if using host only, you dont need to forward port 80 but just make sure you know which IP range it uses
  12. Setup your IP’s any way you want, point your browser over to “http://ipyouchosetouse” and enjoy using your NetScaler on VMWare Desktop 7
Facebook Twitter Email Linkedin Digg Delicious

Connecting to Virtual Serial Port using Putty

I run virtualbox for my personal VM solution, and the problem is sometimes you need to access the serial port on those virtual machines.  I have never found an easy way to do this, but then i saw a post that gave me an idea.  Over on VMware Forums back in 2004 someone posted that to connect to serial named pipes, they just type in the pipe name as the serial port.

So i went about trying to figure out how to configure that in VirtualBox and it worked, so now i’ll share with you my configuration:

Configuring VirtualBox

  1. Open up VirtualBox
  2. Go into Settings
  3. Select Serial Ports
  4. Click on “Enable Serial Port”
  5. For port number, select the port of the virtual machine that you want to conect to, in my case its “Com1”
  6. For port mode, select “Host Pipe”
  7. Check the “Create Pipe” box
  8. For Port/File Path fill it in with the following value:

    com_port_name can be whatever name you want to give it
  9. That is it on the VirtualBox side, now to configure Putty!
  10. 

Connecting with Putty

  1. Open Putty
  2. Under connection type, choose “Serial”
  3. In the “Serial Line” text box put in the name of the pipe that you used in the Virtual Serial port setup, in our case \\.\pipe\com_port_name
  4. Leave the “Speed” setting at 9600 and hit connect
  5. once the window comes up, you should start seeing output from your virtual serial port, if you dont, hit enter once and voila!

Thats all for today!!

Facebook Twitter Email Linkedin Digg Delicious

Upgrading ESXi from 4.0 to ESXi 4.1

If you are trying to update your ESXi 4 host to ESXi 4.1 using vmware host update utility, you have probably encountered this error

Failed to read the upgrade package metadata: Could not find file ‘blah blah blah metadata.xml’. Attempting to unzip the file shows no metadata.xml

You probably also noticed that the MD5 checksum on the webpage and the actual checksum of the update file upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip do not match.

VM’s MD5SUM c2c8a62d8ea2b1bcda7b934fdd850d1b

Actual MD5SUM 3397a58d7dc2f1be1e8eeee85d0d75c5

So you think someone at VMWare screwed up huh….maybe…

According to http://kb.vmware.com/kb/1016209 you cant upgrade vmware using the host update utility

as per VMware “Note: You cannot use the vSphere Host Update Utility to upgrade ESX 4.x hosts”

Ok well, we need to get down to the nitty gritty and actually get involved with the command line…

  • Before you begin suspend all your vm’s or stop them (Im assuming you have a stand alone vm server)
  • Upload the upgrade .zip file to your vmfs store using the vi client (in this case I uploaded it to a folder I have called ISO)
  • At the console of you esxi box, type Alt+F1 which will drop you to the command line, then type: unsupported which will take you to the command prompt (#)
  • Enter maintenance mode by typing in the command “vim-cmd /hostsvc/maintenance_mode_enter
  • now type the command esxupdate –bundle=/vmfs/volumes/4bf63f47-616ef656-4228-001cc49da020/ISO/upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip stage where 4bf63f47-616ef656-4228-001cc49da020 represents whatever your “datastore1” storage is symlinked to
    (Note: thats ‘dash’ ‘dash’ bundle, the font display on this blog makes it look like one big dash)

Unpacking vmware-esx-tools-li.. ######################################## [100%]

Unpacking vmware-esx-esxupdat.. ######################################## [100%]

Unpacking vmware-esx-firmware.. ######################################## [100%]

  • this will unpack the update package and prepare it for installation
  • Then run: esxupdate – -bundle=/vmfs/volumes/4bf63f47-616ef656-4228-001cc49da020/ISO/upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip update
    (Note: thats ‘dash’ ‘dash’ bundle, the font display on this blog makes it look like one big dash)

Removing packages :vmware-esx.. ######################################## [100%]

Installing packages :deb_vmwa.. ######################################## [100%]

Installing packages :deb_vmwa.. ######################################## [100%]

Installing packages :deb_vmwa.. ######################################## [100%]

The update completed successfully, but the system needs to be rebooted for the
changes to be effective.

  • you are done, issue the reboot command and wait for your host to come back up (remember to exit out of maintenance mode when you connect)
Facebook Twitter Email Linkedin Digg Delicious
Go to Top