Closed jerryasher closed 11 years ago
Can you post the output with PACKER_LOG set to 1? (to get verbose output)
Please gist it, since it will be loud.
Hi Mitchell,
Thanks for your help. I am rerunning this now.
I hope you don't mind a few newbie questions. I have a few issues with how packer works, though it is probably trying this on windows. As issues arise would you prefer I a) email you, b) discuss them on the google group, or c) add them as issues to github?
Anyway, I am using the native ruby for windows installed into c:\Ruby193. It's a bizarre creature in that if I run a rubyish command like veewee-to-packer from a cygwin shell, the ruby app can't find ruby (seemingly if it needs to shell out). So I have to run ruby apps from cmd.exe.
But, it seems as though packer likes to think it is in some form of xterm as it logs its messages. Is there an easy way to tell it not to use the curses cursor manipulation stuff?
←[0;32;40mvirtualbox: Download progress: 19%←[0m 2013/07/09 19:52:17 ui: ←[0;32;40mvirtualbox: Download progress: 19%←[0m
Downloads of isos placed in packer_cache are given some form of hashed name. Is there anything I can place in a builder specification to let packer know where on disk the iso already lives?
3, packer cleanup
Is there an easy way to cleanup after a failed run to start again?
Thanks,
Jerry
On Tue, Jul 9, 2013 at 4:17 PM, Mitchell Hashimoto <notifications@github.com
wrote:
Can you post the output with PACKER_LOG set to 1? (to get verbose output)
Please gist it, since it will be loud.
— Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/veewee-to-packer/issues/9#issuecomment-20712219 .
Jerry,
These questions are really best suited for the mailing list as they have no relevance at all to the issue at hand. I'll answer them this time, but please use the mailing list next time.
Hi Mitchell,
I think this is a bug -- if you agree and would prefer I can write it up as a github issue.
Jerry
Regarding the iso_url field being a local file, in my template.json, none of the following seemed to validate for the value of "iso_url":
"c:\ISOs\ubuntu.iso" --> * Unsupported URL scheme in iso_url: c
"c:\ISOs\ubuntu.iso" --> Failed to parse template: Error in line 35, char 21: invalid character 'I' in string escape code "iso_url": "c:\ISOS\ubuntu-10.04.4-server-amd64.iso",
"c:/ISOs/ubuntu.iso" --> * Unsupported URL scheme in iso_url: c
"c://ISOs//ubuntu.iso" --> * Unsupported URL scheme in iso_url: c
I copied the iso into the directory of the template.json file and placed in the template.json file
"iso_url": "ubuntu-10.04.4-server-amd64.iso",
That did validate, but when I ran packer build template.json, I got this:
2013/07/10 02:22:07 C:\HashiCorp\Vagrant\bin\packer-builder-virtualbox.exe: 2013/07/10 02:22:07 Parsed URL: &url.URL{Scheme:"file", Opaque:"", User:(*url.Userinfo)(nil), Host:"ubuntu-10.04.4-server-amd64.iso", Path:"", RawQuery:"", Fragment:""} 2013/07/10 02:22:07 ui error: ==> virtualbox: Error downloading ISO: open : The system cannot find the file specified. ==> virtualbox: Error downloading ISO: open : The system cannot find the file specified. 2013/07/10 02:22:07 ui error: Build 'virtualbox' errored: Error downloading ISO: open : The system cannot find the file specified. Build 'virtualbox' errored: Error downloading ISO: open : The system cannot find the file specified. 2013/07/10 02:22:07 ui error: ==> Some builds didn't complete successfully and had errors:
Again, that validated with packer validate template.json, but it would not build.
Should a windows file path for iso_url be supported? If so, can you provide an example of one that works?
Jerry
On Tue, Jul 9, 2013 at 8:05 PM, Mitchell Hashimoto <notifications@github.com
wrote:
Jerry,
These questions are really best suited for the mailing list as they have no relevance at all to the issue at hand. I'll answer them this time, but please use the mailing list next time.
1.
Seems like two questions. re: Ruby, I have no idea. v2p is a very vanilla RubyGem and I don't know why it would do that. Ruby on Windows is pretty scary. As for the xterm stuff, Packer currently outputs colors. There isn't a way to disable this at the moment. 2.
The "iso_url" field can take a file path. 3.
Packer will clean itself up unless it crashes (which would be a major bug). But in the case of failed runs, it cleans up. In the case of the output above, it looks like it failed to properly undo some things. I'll look into that.
— Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/veewee-to-packer/issues/9#issuecomment-20719132 .
Hi Mitchell,
I created the very loud log file. You can find it here: https://gist.github.com/jerryasher/5965395
Thanks,
Jerry
I'm experiencing something similar in my setup.
virtualbox: [sudo] password for vagrant: sh: Can't open /tmp/script.sh←[0m
←[1;31;40m==> virtualbox: Error unregistering ISO: VBoxManage error: VBoxManage.exe: error: Controller 'IDE Controller'
does not support hotplugging
==> virtualbox: VBoxManage.exe: error: Details: code VBOX_E_INVALID_VM_STATE (0x80bb0002), component SessionMachine, int
erface IMachine, callee IUnknown
==> virtualbox: VBoxManage.exe: error: Context: "DetachDevice(Bstr(pszCtl).raw(), port, device)" at line 381 of file VBo
xManageStorageController.cpp←[0m
←[1;32;40m==> virtualbox: Unregistering and deleting virtual machine...←[0m
←[1;31;40m==> virtualbox: Error deleting virtual machine: VBoxManage error: VBoxManage.exe: error: Cannot unregister the
machine 'packer-virtualbox' while it is locked
==> virtualbox: VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interf
ace IMachine, callee IUnknown
I kind of suspect that packer is having trouble moving the script to the correct location as on the box I see the script inside the home directory of vagrant named as 'tmp' or something. I'll try to dig around this weekend to see if I can see anything.
I actually think this is fixed with this commit in Packer:
https://github.com/mitchellh/packer/commit/41df9fa2e8fa8be6604a1a9e5b8a53d83dedb423
Woohooooooo!!!!!!!! The said fix works magnificently. Thanks!
I started with a @ejholmes vagrant-heroku veewee template. Specifically, the definition.rb, preseed.cfg (ubuntu kickstart) and postinstall.sh that are found here: https://github.com/ejholmes/vagrant-heroku/tree/master/definitions/heroku
I ran veewee-to-packer on them (in a Win 7 64 cmd.exe box that has Ruby.1.9.3 installed) and veewee-to-packer ran almost cleanly with one non-critical error
I took the template it created, and deleted the vmware section. (I realize now I could have just used a flag to ignore it.)
The template used can be found here: https://gist.github.com/jerryasher/5957147
When I ran packer build, it created a VirtualBox VM and started it up and seemed to run through the kickstart correctly.
But in the end there were errors. I don't know if the errors relate to the postinstall_timeout not existing, or if there were other problems.
The stdout log is:
As you can see, it first had a problem finding /tmp/script.sh
On the VM when I log in the /tmp directory is empty, BUT in /home/vagrant there is a file named tmp that contains the postinstall.sh script.
So I am not sure if this is a veewee-to-packer issue, a packer issue, or something I did.
Also, I am relatively new to github, so I apologize if there was a better way to communicate all this stuff to you,
Thanks