Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fusion export fails on VMWareFusion Oracle Linux VM #610

Closed
blysik opened this issue Mar 20, 2013 · 10 comments
Closed

fusion export fails on VMWareFusion Oracle Linux VM #610

blysik opened this issue Mar 20, 2013 · 10 comments

Comments

@blysik
Copy link

blysik commented Mar 20, 2013

Mac OS X Mountain Lion
VMWare Fusion 5.0.3

bundle exec veewee fusion export seo

fails with this error:

Executing command: echo 'veewee'|sudo -S sh '/tmp/shutdown.sh'
Error: We executed a shell command and the exit status was not 0
- Command :/Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool --compress=9 /Users/blysik/Documents/Virtual\ Machines.localized/seo.vmwarevm/seo.vmx seo.ova.
- Exitcode :1.
- Output :
Opening VMX source: /Users/blysik/Documents/Virtual Machines.localized/seo.vmwarevm/seo.vmx
Error: Failed to open disk: seo.vmdk
Completed with errors

Wrong exit code for command /Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool --compress=9 /Users/blysik/Documents/Virtual\ Machines.localized/seo.vmwarevm/seo.vmx seo.ova
[blysik@Bruces-MacBook-Air veewee (master)]$

However, if I try that command myself, it works:

[blysik@Bruces-MacBook-Air veewee (master)]$ /Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool --compress=9 /Users/blysik/Documents/Virtual\ Machines.localized/seo.vmwarevm/seo.vmx seo.ova
Opening VMX source: /Users/blysik/Documents/Virtual Machines.localized/seo.vmwarevm/seo.vmx
Opening OVA target: seo.ova
Writing OVA package: seo.ova
Transfer Completed
Completed successfully
[blysik@Bruces-MacBook-Air veewee (master)]$

Any ideas?

@jedi4ever
Copy link
Owner

i suspect it's somewhere a shell escaping issue of the command - or the exitcode is indeed not 0 by default . Could you check the exitcode when you execute the command manually?

@blysik
Copy link
Author

blysik commented Mar 20, 2013

[blysik@Bruces-iMac veewee (master)]$ /Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/ovftool --compress=9 /Users/blysik/Documents/Virtual\ Machines.localized/seo.vmwarevm/seo.vmx seo.ova
Opening VMX source: /Users/blysik/Documents/Virtual Machines.localized/seo.vmwarevm/seo.vmx
Opening OVA target: seo.ova
Writing OVA package: seo.ova
Transfer Completed
Completed successfully
[blysik@Bruces-iMac veewee (master)]$ echo $?
0
[blysik@Bruces-iMac veewee (master)]$

The error is odd. It seems like when veewee runs the command, the ovftool is looking in the wrong directory or something:

Opening VMX source: /Users/blysik/Documents/Virtual Machines.localized/seo.vmwarevm/seo.vmx
Error: Failed to open disk: seo.vmdk

But that file is there:

[blysik@Bruces-iMac veewee (master)]$ ls -a /Users/blysik/Documents/Virtual\ Machines.localized/seo.vmwarevm/seo.vmdk
/Users/blysik/Documents/Virtual Machines.localized/seo.vmwarevm/seo.vmdk

@blysik
Copy link
Author

blysik commented Mar 20, 2013

Enabled bugging in the export_ova function, and found this:

2013-03-20T14:45:44.409-07:00 [7FFF7535F180 verbose 'Default'] Exception: Failed to open disk: /Users/blysik/Documents/Virtual Machines.localized/seo.vmwarevm/seo.vmdk. Reason: The specified virtual disk needs repair

I'm going to go try to repair that with vmware-vdiskmanager.

@blysik
Copy link
Author

blysik commented Mar 20, 2013

[blysik@blysik-imac seo.vmwarevm]$ /Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -R seo.vmdk
No errors were found on the virtual disk, 'seo.vmdk'.
[blysik@blysik-imac seo.vmwarevm]$

Well that wasn't helpful.

@blysik
Copy link
Author

blysik commented Mar 20, 2013

Okay, I believe I figured it out. In export_ova, it's not waiting long enough after ensure_vm_stopped (or that function should be waiting and it's not). It was trying to run ovftool before the VM was shut down. I added in a sleep 20 after that, and now it's processing. (I see ovftool running in the process table at least.)

@blysik
Copy link
Author

blysik commented Mar 20, 2013

And now I have an ova file! But, I'm confused. What do I do with it? :)

@blysik
Copy link
Author

blysik commented Mar 20, 2013

Aha, I see that in in issue #608 "First pass at building Vagrant 1.x boxes with Veewee", this is being hashed out.

@jedi4ever
Copy link
Owner

@blysik this was merged - could you try again?

@StephenKing
Copy link

I now experienced the same yesterday and today. It fails at the first call, the second call works (veewee 0.3.7)

@mpapis
Copy link
Collaborator

mpapis commented Oct 4, 2014

we have now nice code to ensure the VM stopped, I assume this issue is fixed with it, closing this ticket, please let me know if that is not the case

@mpapis mpapis closed this as completed Oct 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants