20070802

VMware command line handling

No more 'VMware Server Console' to power on the virtual system. Sometimes I need only to turn it on from command line over the ssh session. Now, I know how.

Ex. starting Solaris Express 'Nevada' system.

$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx start


To get state simply run:

$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx getstate


When I've installed the first Solaris system under VMware I choosed wrong architecture of guest OS. The process of making correct entry is as simple as:

$ cd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/
$ sed -i'' -e 's/solaris10/solaris10-64' sol-nv-b69.vmx


Remember to change this value while the virtual is down. After changing it's state to up the 32-bit architecture will be replaced by 64-bit.

Sadly, it's generating the error message (VMware Server 1.0.3 build-44356) and user action is required. You can still pass over the graphical frontend using the answer subcommand.

$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx start
VMControl error -16: Virtual machine requires user input to continue
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx answer

Question (id = 49294347) :The vlance NIC is not supported for 64-bit guests in this release.
Please consult the documentation for the appropriate type of NIC to use with 64-bit guests.
Failed to configure ethernet0.

0) OK
Select choice. Press enter for default <0> :
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx getstate
getstate() = off
$ sed -i'' -e 's/solaris10-64/solaris10/' /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx start
start() = 1
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx getstate
getstate() = on


I couldn't leave it as it was resolved. A few minutes later the solution has been found - the Source

You are at the crossroad.
You can force the usage of older adapters by setting .vmx configuration options:

ethernet0.allow64bitVlance = "TRUE"
ethernet0.allow64bitVmxnet = "TRUE"

...or take a step into the future. I've choosed that one. To take advantages of 64-bit guest os you have to change the network adapter driver from vlance to e1000. It could be achieved by enforcing the usage of correct driver.

Ex. from my sol-nv-b69.vmx file.:
ethernet0.virtualDev = "e1000"


Hint:
Remember to update your Solaris network configuration:

* plumb a new interface
$ ifconfig e1000g0 plumb

* add /etc/hostname.e1000g0 file

* replace the file /etc/dhcp.pcn0 with a new one - /etc/dhcp.e1000g0

2 comments:

Anonymous said...

Thanks old post but saved me at 4am this morning :-)
Appreciated..

Joe.

Marcin Wiśnios said...

I'm glad somebody found it useful ;-)

Regards!