VMware Communities
davman
Contributor
Contributor
Jump to solution

VMware Fusion 5.02 - Ubuntu Server 12.04 LTS - External vfat HD

Host: VMware Fusion 5.02 on Mac OS X 10.7.5 Lion.

Guest Ubuntu Server 12.04 LTS on VMware Fusion 5.02

I mount a vfat hd on linux and share it on the local network.

It works fine but:

when I have to suspend the guest, the system doesn't umount the usb disk cleanly.

The system says that ther's an error in the suspend script even if I apply this hack:

http://communities.vmware.com/thread/417724

I try to use aliases in rc.d and script in but if fails.

Another big error is this: after resuming, the usb device (originally present in /dev/sdb) go to /dev/sdc and, obviously samba and netatalk loose all links.

Is there any way to use an external hd with vmware and share it over the local network with services like samba, netatalk, apache...?

Thanks everybody!

0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

In my tries, I see two errors:

1) it was impossible to start virtualmachines in headless and without host login, if the .vmwarevm is stored on an external volume

2) if I login on a host (for maintenance, for example), and after I logout from the host, the virtual machine shut down in very bad mode.

I hope I'm more clear than before and thanks a lot for your suggestions, they are very useful!

I actually understood that from your OP just didn't have the time to address it however wanted to mention the Time Machine issue.

FWIW In VMware Fusion even though one can start a VM headless with vmrun nonetheless I don't think it is officially fully supported and certainly not so when running a Virtual Machine as a Service, so to speak, by starting it prior to or without logging in.  That said I'm not saying it can't be done, just that since the intent of VMware Fusion has been a Consumer Product it was not designed to be used in that manner even though to some degree it can.   So expect to encounter issues and always maintain proper backups of the Virtual Machines as it relatively easy to trash a VM running it headless as a service or not.

Your number 1 makes sense since I do not believe non-bootable external Volumes are normally mounted prior to user login although I have never had the need to test and see if they were or at what point during the boot process they are mounted.   Have you tried scripting a solution to mount a given volume prior to login and before starting the headless VM?  BTW  While I haven't tried that and therefore can't say whether or not it's doable however I'd be surprised it it wasn't.

A while back I wrote Running a VM Headless (no GUI) and Controlling Shutdown/Suspend with Mac OS X Reboot/Shutdown however I haven't updated it to reflect all of the discussions in the thread so one needs to read the entire thread.  Using the information there I'd trying adding code to mount the external volume first before starting the headless VM.

As to your number 2, back when I was using a headless VM started before Login I had no problems if I need to login for something else and then log out and have the headless VM still running fine so I'm not sure what to say or what I can offer without being able to test under the exact uses case scenario you're employing.  Unfortunately I have other things I want to do then to do testing on this issue since I do not at the present time have a need to run headless any more or would do so (run headless) from an external source.  Nor do I see a future need for myself.

That said, if you do come up with a solution I'd encourage you to share it so if others have the same need they can benefit from your efforts. Smiley Happy

View solution in original post

0 Kudos
6 Replies
WoodyZ
Immortal
Immortal
Jump to solution

Why don't you mount it under OS X and then share it from OS X?  Another option is while mounted under OS X use VMware Shared Folders feature however personally I'd use a SMB/CIFS Share from OS X before using the VMware Shared Folders feature.  In either of these two scenarios you would not have to worry about suspending the VM providing there are no open file handles to the share when it's suspended.

Message was edited by: WoodyZ - Added "not" after "would".

davman
Contributor
Contributor
Jump to solution

Thanks WoodyZ!

In my idea I'm building a virtual machines with all services (just for best and simple portability in case of needs).

I tried with vmware sharing, but I see it's impossible to use external disk (fat and hfs) for TimeMachine  sharing.

The problem are the permissions.

Maybe the useful situation is create a secondary disk in vmware just for timemachine using.

It works very well and ubuntu use only about 600MB RAM when the clients use TimeMachine.

This solution needs a lot of space, of course. The best, I think, was if I can store the vmware file (or at least its secondary disk used for time machine) in an external drive mounted on MacoOSX.

I know it's possible to do, but I need to start the VMware in headless mode and in the past I was not able to start the virtual machine at MacOsX startup (with non login) if the file was stored on an external HD.

Maybe, but I'm not sure, the LaunchDaemons stored in /Library starts before the mounts of all devices plugged on and vmware fails to start.

...it's a bit strange, isn't it?

Any ideas?

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

It is a known fact that Time Machine is not 100% reliable backing up/restoring Virtual Machines under all circumstances/conditions.  Also backing up Virtual Machines via Time Machine is disk/time intensive and wastes a tremendous amount of space for something that may be corrupt and worthless come time to restore it.  At a minimum I would exclude Virtual Machines from Time Machine and with the Virtual Machines shutdown, not suspended, and VMware Fusion closed then manually copy the Virtual Machines Package(s) to an alternate location, preferably on to a different physical hard disk.  Then keep the User Data that is stored within the Virtual Machine backed up off of the Virtual Machine on a regular basis so as to always have a current User Data Backup.  If you have to restore a properly backed up Virtual Machine that is not as current at least you'll have a working Virtual Machine and current User Data to go forward with when you find out your Time Machine Backup of the Virtual Machine fails.

0 Kudos
davman
Contributor
Contributor
Jump to solution

Ops, maybe my basic English is not so clear! Sorry

WoodyZ, I know that backuping virtuamachines over timemachine is not a good solution.
What I try to write before, is that I want to setup a sort of TimeMachine Server (over netatalk on Ubuntu) and share that virtual hd to the local net.

I'm able to do it now and it works fine for all the clients.

What I like to do is to place the very big second virtual vmware hd (the one that is used for timemachine server over netatalk) on external drive and do a automatic start of virtual machine when I boot macosx host with no user login (in headless mode, of course).

In my tries, I see two errors:

1) it was impossible to start virtualmachines in headless and without host login, if the .vmwarevm is stored on an external volume

2) if I login on a host (for maintenance, for example), and after I logout from the host, the virtual machine shut down in very bad mode.

I hope I'm more clear than before and thanks a lot for your suggestions, they are very useful!

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

In my tries, I see two errors:

1) it was impossible to start virtualmachines in headless and without host login, if the .vmwarevm is stored on an external volume

2) if I login on a host (for maintenance, for example), and after I logout from the host, the virtual machine shut down in very bad mode.

I hope I'm more clear than before and thanks a lot for your suggestions, they are very useful!

I actually understood that from your OP just didn't have the time to address it however wanted to mention the Time Machine issue.

FWIW In VMware Fusion even though one can start a VM headless with vmrun nonetheless I don't think it is officially fully supported and certainly not so when running a Virtual Machine as a Service, so to speak, by starting it prior to or without logging in.  That said I'm not saying it can't be done, just that since the intent of VMware Fusion has been a Consumer Product it was not designed to be used in that manner even though to some degree it can.   So expect to encounter issues and always maintain proper backups of the Virtual Machines as it relatively easy to trash a VM running it headless as a service or not.

Your number 1 makes sense since I do not believe non-bootable external Volumes are normally mounted prior to user login although I have never had the need to test and see if they were or at what point during the boot process they are mounted.   Have you tried scripting a solution to mount a given volume prior to login and before starting the headless VM?  BTW  While I haven't tried that and therefore can't say whether or not it's doable however I'd be surprised it it wasn't.

A while back I wrote Running a VM Headless (no GUI) and Controlling Shutdown/Suspend with Mac OS X Reboot/Shutdown however I haven't updated it to reflect all of the discussions in the thread so one needs to read the entire thread.  Using the information there I'd trying adding code to mount the external volume first before starting the headless VM.

As to your number 2, back when I was using a headless VM started before Login I had no problems if I need to login for something else and then log out and have the headless VM still running fine so I'm not sure what to say or what I can offer without being able to test under the exact uses case scenario you're employing.  Unfortunately I have other things I want to do then to do testing on this issue since I do not at the present time have a need to run headless any more or would do so (run headless) from an external source.  Nor do I see a future need for myself.

That said, if you do come up with a solution I'd encourage you to share it so if others have the same need they can benefit from your efforts. Smiley Happy

0 Kudos
davman
Contributor
Contributor
Jump to solution

Thanks a lot!

With your suggestment I think I'll fine a solution.

Thanks a lot for your help, WoodyZ

0 Kudos