Showing posts with label VMWare Fusion. Show all posts
Showing posts with label VMWare Fusion. Show all posts

Thursday, July 23, 2009

OT: Mac OS X dns caching problem with VMWare

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

I was working with one of my Vmware Fusion VMs, when the VM autoprotect backup started.
I don't like particularly the way this feature has been implemented in VMWare Fusion as it doesn't offer any scheduling option, it just based on some funny "elapsed time since last backup" setting that changes depending on when you turned off and on the VM in the meanwhile, which is really a crazy thing in my humble opinion.
Back to my problem, once the backup was finished, just a couple of minutes later, as soon as i tried to navigate the apex application i was working on, i got weird HTTP 404 errors. This was happening both with Firefox and Safari, which made me think that the problem was not at the browser level, but somewhere else.
Restarting the VM had no effect whatsoever.
Fortunately, before attempting some fancy and desperate options, i tried connecting using the straight IP address of the VM instead of the DNS i am using all the time and it worked.
This convinced me that something wrong had happened with the DNS server or DNS cache, however, oddly enough, executing ping servername.local from Mac's terminal application was working just fine.
Is ping skipping the DNS cache perhaps?
Don't ask me.

After a quick search I could find on the web the command to flush the DNS cache on Mac OS X 10.5:

sudo dscacheutil -flushcache

Thereafter, with some satisfaction, the browsers resumed working properly using local dns names.

Why did the VM autoprotect backup mess up the DNS cache in the first place?
I am quite sure this was not the first time the autoprotect ran, why did i need to flush the dns cache this time?

Useful answers are welcome, indeed i got some preliminary feedback from the VMWare forum.

Tuesday, September 30, 2008

How to increase the disk space on a xubuntu VM

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Although this problem is not strictly oracle related, it may be useful for anyone who needs to increase the available disk space on a xubuntu (and ubuntu as well i guess) vmware virtual machine where an Oracle instance is running.

The following procedure has been carried out on VMWare Fusion 2.0 (for Apple Macs platforms).

Original problem: i had a rather small xubuntu VM with 1GB RAM and 8GB (7GB+1GB swap disk) and i wanted to increase the space of both sda1(the main partition) and sda5 (swap partition) up to a total of 32GB (28GB for sda1 and 4GB for sda5).

Before starting i recommend that you make a copy of your VM files, just in case and of course the usual disclaimers apply.
  1. Increase the virtual disk space setting to the desired amount in the configuration panel of the VM. This operation is currently allowed only if there are no VM snapshots, so, you'll have to delete them first;
  2. Download gparted;
  3. Use the gparted ISO image as a virtual CD in VMWare or burn a physical CD using the file image;
  4. Reboot xubuntu with the CD inserted and connected;
  5. If your VM doesn't boot from CD, then you need to change the device boot sequence in the BIOS. Restart the VM and keep pressing F2 until the BIOS screen shows up.
  6. Resize and/or move the existing partitions until you get the desired size for all the partitions and apply the changes;
  7. Eject the CD and restart the VM normally;
  8. By changing the partition properties of the swap area, most likely the existing UUID of the partition has changed as well: verify with the command sudo blkid the current UUID of the swap partion and compare it with the UUID stored in /etc/fstab;
  9. If the two UUIDs are different, perform the following three additional steps:
    1. sudo swapoff -U old_UUID where old_UUID is the value contained in /etc/fstab;
    2. update /etc/fstab by executing: sudo vi /etc/fstab in order to update the file (copy and paste the new UUID from the output of blkid);
    3. perform: sudo swapon -a;
  10. If no errors are returned, you should be able to see the updated amount of available memory with the command: free -m;
The procedure worked out well in my case and i completed all the tasks in less than 30 minutes.
Actually it took me a while to figure out initially what was wrong with the command swapon -a, because i was getting the somewhat funny message "cannot canonicalize /dev/disk/by-uuid/...", at that point i realized that i had to update the UUID in /etc/fstab.

Shorter solutions are welcome :-)

Thursday, January 24, 2008

Creating an ISO image from a zip file

Always check out the original article at http://www.oraclequirks.com for latest comments, fixes and updates.

Quick link to the original posting, my thanks to Gary for sharing this useful tip for MAC OS X.

Some days ago i was working via SSH/VNC on my Mac OS X server where i needed to install Oracle 11G for linux 64-bit.

One of the great features of VMWare Fusion (present also in other VMWare products) is the possibility of attaching an ISO disk image as if it were a physical CD or DVD, avoiding the physical burning of CD or DVD media.
Unfortunately i hadn't such ISO image available, i had instead the source files in a zip file downloaded on the Mac.

I could have copied the files from the host to the guest operating system or executed from a shared folder, but i preferred to see if i could find a way of stuffing the content of a directory into an ISO image file using plain OS X commands.

Fortunately, Google came to the rescue and i stumbled upon Gary's blog, where i found such great tip, that i easily adapted for my case:

First of all unzip the archive:
unzip linux.x64_11gR1_database.zip
This will create a subdirectory called "database" into the current one.
Finally, create the ISO disk image:
hdiutil makehybrid -o oracle11g.iso -iso -joliet -hfs -udf database
Now you can mount the resulting ISO file through VMWare Fusion.
If for some reason you cannot run the installer, e.g. you get a "Permission denied" error, it can be that the "cdrom" is not mounted properly. By mounted properly i mean that a line like the following must be present in the /etc/fstab file:
/dev/cdrom   /mnt/cdrom  auto  exec,noauto,owner,ro 0 0
For some reason this line was present in a Xubuntu Linux VM i've created, but was not present in Oracle Linux and i don't really know if it is a "quirk" of the auto-mount feature or a normal behavior.

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles