knowing virtual machine guest IP address

I have a habit of running google:”VirtualBox” or google:”VMware” image and run it in google:”headless mode”, … blindly 🙂 …, without checking config file. I own VMware Workstation so this is possible.

AFAIK, this is OK with VirtualBox. It enables google:”RDP” be default. So, one can always connect from remote Windows,.. or google:”SunRay”, etc.

Today, I learned VMware doesn’t take care of enabling google:”VNC” remote access. The VM I tried is from:

Communications Suite 7: Installing the VMware Image – Factotum

Communications Suite 7 VMware image is a simple and portable method for demonstrating Communications Suite 7 features without the overhead of installation and configuration.

I started this vm like:

$ vmrun start SunJava_Comms_Suite7u0_VM/*.vmx nogui

I tried to access it from VNC viewer on Windows. Failed… So, what did I do ?

I could have google:”ACPI” shut down this vm pretty much safely like this and configure vnc and restart it.

$ vmrun stop SunJava_Comms_Suite7u0_VM/*.vmx soft

Instead, I chose to ssh into this vm. First, I checked how vm guest network is configured.

$ grep connection SunJava_Comms_Suite7u0_VM/*.vmx
ethernet0.connectionType = "nat"

It’s google:”NAT”. This means it uses google:”VMNet8″ subnet on host. And if guest is set up for DHCP, it would get IP address from dhcp server for vmnet8.

$ grep ethernet.*Address SunJava_Comms_Suite7u0_VM/*.vmx
ethernet0.generatedAddress = "00:0c:29:55:ce:5b"
ethernet0.generatedAddressOffset = "0"
$ grep -B 3 00:0c:29:55:ce:5b /etc/vmware/vmnet8/dhcpd/dhcpd.leases
lease 172.16.128.130 {
starts 3 2010/01/20 05:56:45;
ends 3 2010/01/20 05:56:44;
hardware ethernet 00:0c:29:55:ce:5b;
$ ping -b 172.16.128.255
WARNING: pinging broadcast address
PING 172.16.128.255 (172.16.128.255) 56(84) bytes of data.
64 bytes from 172.16.128.1: icmp_seq=0 ttl=64 time=0.042 ms
64 bytes from 172.16.128.130: icmp_seq=0 ttl=255 time=1.63 ms (DUP!)

Voila! Now, I can ssh.

$ ssh root@172.16.128.130
Warning: Your password has expired, please change it now.
New Password:
Re-enter new Password:
sshd-kbdint: password successfully changed for root
Last login: Tue Dec 15 02:26:34 2009 from 10.1.110.19
Sun Mircosystems Inc.   SunOS 5.10      Generic January 2005
Sun Communications Suite 7
Deployed via the EMRA Toolkit (version 7.0-0.02)
Virtual Machine Built: 12:15:00:44.25-2009
Product: Messaging Server (64bit) 7u3                Version: 7.3-11.01
Product: Comms DSsetup 6.4                           Version: 6.4-5.05
Product: Calendar Server 7                           Version: 7.0-0.26
Product: Instant Messaging 8u2                       Version: 8.2-02.04
Product: Convergence 1u3                             Version: 1.0-10.01
Product: Indexing and Search Service 1.0             Version: 1.0-32.01
Product: Comms Delegated Administrator 7             Version: 7.0-1.00
Product: Calendar Server 6.3                         Version: 6.3-19.01

Nice! I didn’t know that Solaris can set expiration on root password.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s