Jul 142014
 

The main reason of almost every post on this blog is the same.

Need to do something, dig the Net, take a while to find stuff so I think to make a note on my… virtual hints book 😉

This time the need was to move a Windows 8.1 virtual machine from VMware Fusion for OS X 10.9.4 to VirtualBox on Linux.

The best option is to export and import the VM in OVA (Open Virtual Appliance) format, but there is no GUI option to export in Fusion. It took me a while to understand that Fusion comes with OVF Tool included, as a command line, and located in the default path “/Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool

A working example of a command line is:

./ovftool --acceptAllEulas /Users/marco/Documents/Virtual\ Machines.localized/Windows\ 8.1\ x64.vmwarevm/Windows\ 8.1\ x64.vmx /Users/marco/Desktop/Win81.ova

The green part of the command above refers to specific names I gave to the VM in Fusion and to the OVA file.

–acceptAllEulas is an option to make the command less interactive.

Enjoy.

Nov 012013
 

Despite what it might seems at a first look, this is NOT a complicated thing.

The advantages are enormous… especially if you own a developer account: it would allows you to test the evolution of this awesome OS blended with great benefits of virtualization such as snapshotting.

Whatever is the reason why you wanna install Mavericks on your ESXi box, you’ll find here detailed instructions which have been tested and found working by me 😉

First of all, you need an important piece of software… and no, this software is not illegal, nor it could ruin your precious ESXi 5.1 installation. I’m talking about the mighty Unlocker for VMware by Donk, available from InsanelyMac (free registration).

This is a bunch of bytes which will enable your ESXi to boot a valid Mavericks image.

Continue reading »

Dec 272012
 

Using a Mac with VMware ESX(i) is a pain, since very scarce support is available for the poor lovers of the apple 🙂

Luckily, once you enable ssh access on the hypervisor, the following commands come very handy:

ESXi 5.0

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:vim-cmd vmsvc/getallvms |grep <vm name>

    Note: The first column of the output shows the vmid.

  2. Check the power state of the virtual machine with the command:vim-cmd vmsvc/power.getstate <vmid>
  3. Power-on the virtual machine with the command: 

    vim-cmd vmsvc/power.on <vmid>

ESXi 4.1

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:vim-cmd vmsvc/getallvms |grep <vm name>

    Note: The first column of the output shows the vmid.

  2. Check the power state of the virtual machine with the command:vim-cmd vmsvc/power.getstate <vmid>
  3. Power-on the virtual machine with the command:vim-cmd vmsvc/power.on <vmid>

ESXi 4.0

To power on a virtual machine from the command line:
  1. List the inventory ID of the virtual machine with the command:vmware-vim-cmd vmsvc/getallvms |grep <vm name>

    Note: The first column of the output shows the vmid.

  2. Check the power state of the virtual machine with the command:vmware-vim-cmd vmsvc/power.getstate <vmid>
  3. Power on the virtual machine with the command:vmware-vim-cmd vmsvc/power.on <vmid>

 

ESX 4.0 and ESX 4.1

To power on a virtual machine from the command line:
  1. To list the path of all the virtual machines on the host:vmware-cmd -l
  2. Get the state of the virtual machine with the command:vmware-cmd <path to the VMX file> getstate
  3. Power on the virtual machine with the command:vmware-cmd <path to the VMX file> start

Enjoy.

Dec 032012
 

Being in love with wonderful VirtualBox since I’ve tried the first time few years ago, I noticed that the disk files are often incompatible with VMware.

Today I’ve found a good solution and I want to make sure I will not forget, hence writing on my… favourite notepad 🙂

The conversion trick can be done on a command line, using the utility VBoxManage with the clonehd parameter as follows:

VBoxManage clonehd "name_of_original_disk_file.vmdk" name_of_the_converted_disk_file.vmdk --format vmdk --variant standard

This will create in no time (13 GB converted in few seconds) a VMware compatible disk image which can be used as a starting point to recreate the VMware VM.

Example of the output is:

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Clone hard disk created in format ‘vmdk’. UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Enjoy.

Nov 082010
 

Today I successfully upgraded 4 ESXi hosts to VMware ESXi 4.1.

Since I do not have Virtual Center (they are mainly lab machines), I found very good hints about hot to do it from CLI via SSH.

And as usual, to avoid forgetting how I did it’s good moment to write down some notes about the process.

  1. First of all, access to your ESXi 4.0 with vSphere Client, power off all the VMs and put the host in maintenance mode.
  2. Second, from ESX console press ALT-F1 and type the word unsupported pressing <Enter> afterwards. Please note that you will not be able to see anything while you type. This is kind of secret word to enable Tech Support Mode (TSM) locally.
  3. It will prompt you for root’s password, after which you’ll get console shell access on ESXi. Now let’s enable SSH access to the machine.
  4. Vi the file /etc/inetd, search for ssh and remove the hash sign in front of the line:

    ssh      stream   tcp   nowait   root   /sbin/dropbearmulti   dropbear ++min=0,swap,group=shell -i –K60

  5. Find the process id of inetd and send a hiccup signal to it to reconsider updated configuration:

    ~ # pidof inetd
    4935
    ~ # kill -HUP 4935

  6. Access to the ESXi via SCP graphical interface (for example, using WinSCP.

  7. Locate datastore (normally under /vmfs/volumes/datastore-name) and create a directory there called, for example, upgrade-4.1

  8. Download the file upgrade-from-ESXi4.0-to-4.1.0-0.0.<somenumber>-release.zip from VMware Website and unzip it.

  9. Transfer the unzipped content into the directory you created on ESXi using scp.

  10. Access to ESXi host in SSH.

  11. Upgrade using commands:
    ~ # cd /vmfs/volumes/datastore1/upgrade-4.1
    ~ # esxupdate update –m metadata.zip

  12. Upgrade process will begin and conclude as shown below:
    image

  13. Reboot your ESXi

  14. Access with vSphere 4.1 client and exit from Maintenance mode.

  15. Restart your VMs.

Nov 192008
 

To setup properly the portgroups in VMware vSwitching environment, we had to create two portgroups per vSwitch as depicted below:

schema for connecting two vswitch with SG IPS in ESX

Reason for this configuration is that “operative portgroups” where servers and machines are connected should not be in Promiscuous mode to avoid sniffing other machines’ traffic, while portgroups dedicated to IPS inline ports must:

    be configured in promiscuous mode to receive all traffic of the vSwitch they are connected to

    be part of VLAN ID 4095 to “pass” all VLAN IDs to Virtual Machine without any intervention

Oct 272008
 

OpenFiler is a great system to implement NAS (Network Attached Storage) in a network using general purpose hardware.

On the ‘Net you can find great tutorial about how to setup with VMWare ESX servers, but it contains one important mistake:

When you define the ACL the netmask for every host is /32 or 255.255.255.255. Using /24 or 255.255.255.0 will prevent connection to OpenFiler.

I’ve tested and found it working with VMWare ESXi 3.5 free server.

Oct 172008
 

I was trying to installing VMWare Server 2.0 but it kept getting this error

System Administrator has set policies to prevent this installation.

Quick and dirty solution in 8 steps:

  1. Click Start -> Control Panel
  2. Open Administrative Tools
  3. Open Local Security Settings
  4. Click Software Restriction Policies
    1. If no software restrictions are defined, right click the Software Restriction Policies node and select New Software Restriction Policy
  5. Double click Enforcement
  6. Select “All users except local administrators”
  7. Click OK
  8. Reboot
Apr 222008
 

Running vmware-config-tools.pl script on a guest CentOS 5.1 virtual machine in a VMWare Server 1.0.5 environment will not find the proper kernel modules, so it will prompt you to compile the modules.

To do this you need a compiling environment (namely gcc) and the C kernel headers installed.

If your machine is connected to the Internet, this is easily solved by invoking the following commands:

<prompt># yum install gcc (about 8+ Mb)

<prompt> yum install kernel-devel (about 4.7 Mb)

Jan 272008
 

VMWare Server 2.0 Beta.

You define a Linux virtual machine (or import a machine defined elsewhere) and it stands  forever during boot in “SCSI Spinning Disk”.

This is due to the fact that machine has been defined using BusLogic SCSI while it should be using LSI.

Change Virtual Disk Controller Type to LSI and everything should restart working fine.