Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

Monday, February 6, 2012

moving a virtual machine from VMWare Workstation/Fusion to vSphere

I'm currently in the process of moving several virtual machine from my home system (VMWare Workstation) and my work system (VMWare Fusion) to my new vSphere ESXI server and running into all kinds of issues.

First of all you can't run the converter on anything else than windows, which is rather annoying. Since I only got macs at work and no Windows machines, except for mine at home. Which has no access to the work network and I refuse to carry my 50lbs workstation around.

Translation: VMWare forces me to install a windows virtual machine to convert a virtual machine from vmx to vSPhere.

Yes I am slightly irritated about this lack of support for us apple fan boys (don't forget, linuxers have todo the same)

The next issue I encountered there doesn't seem to be a possibility to define Nat/Bridged and host only anymore. Instead I need to deal with custom vlans now or possible mixup some other DHCP services in the office.

For example my rocks linux cluster for testing binbase has 3 virtual network interfaces:

eth0 = host only (fixed IP address, fixed MAC)
eth1 = host only (fixed IP address, fixed MAC, for cluster nodes)
eth2 = bridge (dynamic ip address, random MAC, so that external hosts can easily access BinBase from the world and the image has internet access)

this is rather straight forward in VMware player/fusion/workstation.

Now for vSphere it looks rather different...

Basically you need to define networks for each interface and so my best idea was to simulate this so far.

To simulate the host only network:

a) create a new switch called 'host only' which is not connected to a network device.

To simulate the bridged network:

just use the default location and rename it to public to simplify life a bit.

and assign them in the vWware image to the different network interfaces.

etho0 = host only
eth1 = host only
eth2 = public

now the big question is, if I created another virtual machine, in the same ip range as my host only network is defined, can it talk to the other machines? I think I shall test this with a virtual compute node and report back. Maybe to be on the save site, I just create a second host only network?

Wednesday, February 1, 2012

installing vmware server on ubuntu 11.10

so I'm trying to install a ubuntu base vmware image hosting platform right now keep running into issues.

done on a system with the following kernel config:

Linux sun 3.0.0-15-server #26-Ubuntu SMP Fri Jan 20 19:07:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

first you need to link some files to make the script start generating the modules...

$ sudo ln -s /lib/modules/your_kernel_version/build/include/generated/utsrelease.h /lib/modules/your_kernel_version/build/include/linux/utsrelease.h
$ sudo ln -s /lib/modules/your_kernel_version/build/include/generated/autoconf.h /lib/modules/your_kernel_version/build/include/linux/autoconf.h

which now makes the installation fail with some error of missing smp.h header files

/tmp/vmware-root/modules/vmmon-only/linux/driver.c:40: fatal error: linux/smp_lock.h: No such file or directory
compilation terminated.

next step was to downgrade the kernel to the last version where I found enough info about it to make it compile with vmware.

Linking the files again

ln -s /lib/modules/2.6.38-10-server/build/include/generated/utsrelease.h /lib/modules/2.6.38-10-server/build/include/linux/utsrelease.h
ln -s /lib/modules/2.6.38-10-server/build/include/generated/autoconf.h /lib/modules/2.6.38-10-server/build/include/linux/autoconf.h

and now it fails with the following error

/tmp/vmware-config0/vmmon-only/linux/driver.c:1423:4: error: too many arguments to function ‘smp_call_function’
include/linux/smp.h:73:5: note: declared here
/tmp/vmware-config0/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-config0/vmmon-only/linux/driver.c:1987:18: error: ‘struct task_struct’ has no member named ‘euid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1987:35: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1988:11: error: ‘struct task_struct’ has no member named ‘fsuid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1988:29: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1989:18: error: ‘struct task_struct’ has no member named ‘egid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1989:35: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1990:11: error: ‘struct task_struct’ has no member named ‘fsgid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1990:29: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:2007:7: error: too many arguments to function ‘smp_call_function’
include/linux/smp.h:73:5: note: declared here
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-10-server'

getting frustrated I went back to a bit more car research. Still at the point of 335i vs Cayman vs Boxster vs Z4. It all depends on the european delivery of if I can find a nice 1-2 year old cpo'ed car in my area.

calmed down a lot and so the next step was to rename my vmware server archive to the right extension:

mv VMware-server-2.0.2-203138.x86_64.gz VMware-server-2.0.2-203138.x86_64.tar.gz

and following the instructions here

and it worked


Starting VMware services:
Virtual machine monitor done
Virtual machine communication interface done
VM communication interface socket family: done
Virtual ethernet done
Bridged networking on /dev/vmnet0 done
Host-only networking on /dev/vmnet1 (background) done
DHCP server on /dev/vmnet1 done
Host-only networking on /dev/vmnet8 (background) done
DHCP server on /dev/vmnet8 done
NAT service on /dev/vmnet8 done
VMware Server Authentication Daemon (background) done
Shared Memory Available done
Starting VMware management services:
VMware Server Host Agent (background) done
VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
Virtual machines done

The configuration of VMware Server 2.0.2 build-203138 for Linux for this
running kernel completed successfully.

Housekeeping...
Thank you for using the script!
Patch provided by:
Ramon de Carvalho Valle
http://risesecurity.org
updated by sirusdv (http://ubuntuforums.org/member.php?u=1289848)
Script author:
Radu Cotescu
http://radu.cotescu.com

now I just need to convince grub to use the 'old' kernel by default...

Thursday, March 17, 2011

vmware fusion - changing nat address range on the host

recently I was installing a lot of vmware virtual machines on 3 different macs to test some binbase issues and it turns out the vmware fusion assigns a random iprange on every box.

Rather annoying if you virtual machine needs a fixed IP, thank you rocks guys for this...

Anyway to change the vmnet8 interface configuration you need to modify the following files:





sudo vim /Library/Application\ Support/VMware\ Fusion/vmnet8/nat.conf
sudo vim /Library/Application\ Support/VMware\ Fusion/vnetworking
sudo vim /Library/Application\ Support/VMware\ Fusion/vmnet8/dhcpd.conf



and update the default range with you wished range.

afterwards execute:


./boot.sh --restart


in the directory:


/Library/Application\ Support/VMware\ Fusion/


and you should be good togo!

More about this can be found at http://blog.mclaughlinsoftware.com/2010/03/01/vmware-fusion-nat/