VMWare

Running Virtualized VMware Virtual Infrastructure

I've been beginning to work on a VMware Virtual Infrastructure project for work lately. Our current installations are pseudo-production, so it's limited as to how much I can mess around with them. I'd read that one of the downsides to VMware workstation 6.5 betas is that it won't run ESX anymore, which led me to consider running Virtual Infrastructure in Workstation to do some testing on things like the DR features and whatnot.

Migrating a client from VMware Server to VMware ESX

1) Use scp (winscp, pscp) to copy the file(s) to a directory on the server. Some place like root's home directory is sufficient. Generally, there will be more than one file, they'll look something like:

2.1G	centos-5-1-prod-f001.vmdk
2.1G	centos-5-1-prod-f002.vmdk
2.1G	centos-5-1-prod-f003.vmdk
2.1G	centos-5-1-prod-f004.vmdk
2.6M	centos-5-1-prod-f005.vmdk
4.0K	centos-5-1-prod.vmdk

You need to copy all of these files to the server.

2) Login to ESX server (most likely as the root user)

More VMWare Stuff

Just a quick, but helpful tip. At work, I have a bunch of virtual machines defined in my VMWare Server, but the Windows VM takes up a lot of resources, so I often turn it off when I'm not directly using it. My problem is that when I restart it, sometimes the IP address has changed, which makes it a pain to remember how to get to it to connect via Remote Desktop. I found vmware-cmd can help with this.

To do this, run 'vmware-cmd -l' to get the listing of configs, then run the following:

$ vmware-cmd "/share/VM/windows/windows.vmx" getguestinfo  ip
getguestinfo(ip) = 192.168.50.4

VMWare Server 2.0

I was studying for my RedHat RHCE, and wanted to do some stuff at home, so I downloaded the VMWare Server 2.0 beta. I can't say I was impressed at all with it. The 'neat' thing is that the server console is all now web-based, but, of course, that comes with a price. Tomcat is used as their middleware, and was taking up 3-400 MB on my machine, just to do the management of the box. Talk about overhead.

Useful VMWare Server console cli commands

There are some commands that come with VMWare Server that are useful for doing administration via the commandline. This is helpful when you can't connect via the console app and need to restart a vmware session.
Get a list of your vmware configs:

vmware-cmd -l

Get state of vmware server

vmware-cmd /config.vmx getstate

stop/start/suspend/reset

vmware-cmd /config.vmx start
vmware-cmd /config.vmx stop
vmware-cmd /config.vmx suspend
vmware-cmd /config.vmx reset

Adding a disk via CLI in VMWare Server

cd to where the .vmx (the vmware server config) is stored for the vm you want to add the disk to. Create the disk. vmware-vdiskmanager -h gives what the options are, and are pretty self-explanatory.

vmware-vdiskmanager -c -s 1Gb -a lsilogic -t 3 .vmdk

From what I can see, your VM must be running to do the next two
commands. (Even though if you do it through the console, you have to shut down your system)

Next, attach the disk image to the VM, in order to do this properly,you'll have to know which ID's are available on your scsi tree:

Syndicate content