VMware

This Question is Not Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
6 Replies Last post: Oct 28, 2009 12:19 PM by exppi163  

VMware Tools Kills Native Boot of Linux posted: Oct 20, 2009 8:55 AM

Click to view exppi163's profile Novice 18 posts since
Oct 19, 2009
I've successfully installed a native CentOS and rEFIt using Bootcamp,* then made a VMware virtual machine that boots the native partition,** then installed VMware Tools***, and an NVIDIA driver.**** Problem is, now the CentOS won't boot up properly in native -- the native boot gets stuck on "Starting vmware-tools", and X just doesn't work. Everything works great when booting as a VM, though. I suppose I could run vmware-uninstall-tools and vmware-install (or whatever the install procedure command is) alternately, but that's highly inconvenient and possibly not very robust.

Does anyone have an easy way of setting up the dual native + virtual CentOS so that it boots up nicely in both? There must be a simple virtual machine detector shell command that can be put in the appropriate init files on boot and X initialization.

*See here. Make sure that you use the rEFIt option to sync the MBR and GPT partition tables before grub-install; otherwise, you'll get the /boot/grub/stage1 error.


**See here. This just worked for me when I used "/Library/Application\ Support/VMware\ Fusion/vmware-rawdiskCreator create /dev/disk0 3 nativeDiskBoot ide" and "... 4 nativeDiskRoot ide" (my partition, with /dev/sda4 an LVM), then created a new VM (don't copy files!) with these two virtual disks, nativeDiskBoot and nativeDiskRoot.


***See here, here, and after setting the non-XEN kernel to be default in /boot/grub/grub.conf and "grub-install /dev/sda3".


****See here, here; run nvidia installer with "-k$(uname -r)" option.

Re: VMware Tools Kills Native Boot of Linux

1. Oct 23, 2009 2:23 PM in response to: exppi163
Click to view astiegmann's profile Enthusiast 19 posts since
Aug 28, 2008
Hi exppi163,
I am currently looking into this and will give you an update when I have more information.

Re: VMware Tools Kills Native Boot of Linux

2. Oct 23, 2009 5:13 PM in response to: exppi163
Click to view astiegmann's profile Enthusiast 19 posts since
Aug 28, 2008
Hi exppi163,
Can you please let me know the exact steps you followed so I can build my machine the same way you built yours. I would like to be able to see if I can reproduce all of the issues that you mentioned.

Here is what I did and what I saw...

1. Partitioned my drive and installed rEFIt.
2. I installed CentOS 5.3 on one partition and rebooted
3. I used the partitioning tool to get rEFIt to properly see my new Linux partition, then booted into the CentOS 5.3 emergency console and ran "grub-install /dev/sda3' to get GRUB working
4. I booted into CentOS and ran through the whole first boot procedure. I logged in successfully and then rebooted the machine.
5. I started up OS X and then setup the special phaux vmdk for access to the physical partition.
6. I started CentOS in the VM.

* I noted that I had to use an IDE device. The lislogic SCSI device caused the kernel not to be able to mount /proc and /sys and hence panicked. I will file a bug for this internally.
* When GDM tried to start, it failed because the underlying video hardware had changed (xorg.conf was not correctly configured). Running through the automatic re-configuration of Xorg fixed the problem for me.

7. I installed tools.
8. I rebooted the machine and booted back into the native CentOS 5.3

* The tools service noticed that it was not running on a native environment and did not try and start up the services.
* Xorg failed to start correctly.

Ok, so the Xorg failing to start properly is a funny situation. The reason this happened is because when I invoked the automatic Xorg configuration in step 6 to get get a working xorg.conf, the script created a new xorg.conf that would work for the VM and not for the native environment (because it was running in a VM environment at the time and not the native one). The auto xorg.conf configurator backed up the orignal xorg.conf to xorg.conf.old. Next when I installed tools in step 7, the tools installer created a new xorg.conf and backed up the xorg.conf created in step 6 to xorg.conf.BeforeVMwareToolsInstall.

So what happened was when I started up CentOS in the native environment, tools restored xorg.conf.BeforeVMwareToolsInstall to xorg.conf because it thought it was the working xorg.conf for the native environment when the real working xorg.conf script was xorg.conf.old. So my solution to get around this issue was to

1. Boot into CentOS via the virtual machine method
2. As root, move the xorg.conf that worked on the native enviroment to xorg.conf.BeforeVMwareToolsInstall.

After I did that everything worked for me and I could easily switch between the two environments without any hiccups. I have filed a bug internally to see what we can do to potentially alleviate this problem.

When you can please let me know the steps on how you built your CentOS machine and I will see if I can reproduce the tools problem you mentioned as well. Hope that helps.

Re: VMware Tools Kills Native Boot of Linux

5. Oct 27, 2009 10:08 PM in response to: exppi163
Click to view astiegmann's profile Enthusiast 19 posts since
Aug 28, 2008
Hey exppi163,

Thanks for the detailed explanation. In step 8, did you reconfigure X and configure tools within an X session or did you do install tools without ever reconfiguring X? It looks like the tools are getting confused about which xorg.conf file is the correct one to be using for the native environment. I have already opened a bug for this internally and will update it with these results. Also, you didn't mention anything about the services in your most recent posts. Did those work all work this time around?

Also did you ever try it without compiz?

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities