Vagrant " VM not created." when trying to create box from existing VM - virtual-machine
I imported the precise32 box, then installed some packages and other data on the VM. My plan is to then repackage it into a box, to save on complicated provisioning when sharing.
However.
vagrant package --base dev-vm --output /box/vm.box
Always returns
[dev-vm] VM not created . Moving on
My directory structure is:
-dev-vm
--.vagrant
--Logs
--box.ovf
--box-disk1.vmdk
--dev-vm_13345342.vbpx
--metadata.json
--Vagrantfile
Ive
set VAGRANT_LOG=debug
Which shows no extra info on whats going on.
Windows 7 using Cygwin
UPDATE:
export VAGRANT_LOG=debug
for Cygwin to set debug log.
I then get
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO warden: Calling action: #<Vagrant::Action::Builtin::Call:0x2abb800>
INFO runner: Running action: #<Vagrant::Action::Builder:0x2695920>
INFO warden: Calling action: #<VagrantPlugins::ProviderVirtualBox::Action::Created:0x267c078>
INFO runner: Running action: #<Vagrant::Action::Warden:0x2ac6c48>
INFO warden: Calling action: #<VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated:0x2ac6c00>
INFO interface: info: VM not created. Moving on...
When you package a box, the box name has to be the specific machine name that you can get from VirtualBox (e.g. lucid_1372711888). Just execute following command in cmd:
vboxmanage list vms
Notice that "vboxmanage" should prior be added to PATH variable. See here how to do that.
Also notice that virtual maschine name must not contain spaces. Otherwise it won't be recognized by "vagrant package" command. For instance:
vagrant package --base win7_vbox_base --output win7_base.box #CORRECT
------------------------------------------------------------------------
vagrant package --base win7 vbox base --output win7_base.box #INCORRECT
If you are in the folder that contains your Vagrantfile, you can also simply run:
vagrant package --output your-box-name.box
The following image shows the content of the .box file created with this command:
Related
Vagrant commands failing
I am new to Vagrant! I have installed Vagrant from https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.msi and when i checked the version in Powershell am getting Vagrant 2.2.19. But when i am trying to add box or init am getting error. below are the details of the error am getting PS C:> vagrant -v Vagrant 2.2.19 PS C:> vagrant box add ubuntu/trusty64 Vagrant failed to initialize at a very early stage: The executable 'cmd.exe' Vagrant is trying to run was not found in the %PATH% variable. This is an error. Please verify this software is installed and on the path. PS C:> vagrant init ubuntu/trusty64 Vagrant failed to initialize at a very early stage: The executable 'cmd.exe' Vagrant is trying to run was not found in the %PATH% variable. This is an error. Please verify this software is installed and on the path. I have searched on internet and youtube but did not find any help.... Please help me ...... ! FYI : I have restarted my windows 10 computer after installing Vagrant
FOUND ANSWER : I have done two things, firstly vagrant plugin update and secondly i have edited the environment variables [This PC (rightclick) ---> Properties ----> Advanced system settings ----> Under Advanced Tab Select Environment Variables] In the Environment Variables window Under System variables select PATH and click on Edit ----> Click on New and add the Powershell bin path C:\Windows\System32\WindowsPowerShell\v1.0 After this i have restarted my powershell thats it.....Vagrant commands started working.
hello,i just solved this problem ,you can remove the 'cmd.exe'from the PATH ,so you should see the cmd.exe's path like this enter image description here after this ,type 'vagrant' in your powershell ,it will run success.
Problem while bootstraping ubuntu chef node from chefDK on windows workstation
I'm new to Chef and I have stuck in a problem. I'm using AWS Chef Automate Server and EC2 ubuntu instance as Chef Node. My workstation is local machine where I have installed ChefDK on windows. I have successfully configured the Chef server with ChefDK. When I bootstrap the node using Knife Bootstrap command, it bootstraps the ubuntu node but shows this error in the end cannot create /etc/chef/trusted_certs/opsworks-cm-ca-2016-root.pem: Directory nonexistent The command I used here is knife bootstrap myEC2PublicIPHere -N UmaidNode1 -x ubuntu --sudo --run-list "recipe[nginx]" -i .chef/my_key.pem. After that I added some other cookbooks in the server and run Knife ssh command from my windows workstation to run Chef-client on the node, but this command is not working. I have tried it with different attributes, but always the similar issue FATAL: 1 node found, but does not have the required attribute to establish the connection. Try setting another attribute to open the connection using --attribute. The command I tried here is knife ssh 'name:*' --attribute myEC2PublicIpHere -x ubuntu -i .chef/my_key.pem 'sudo chef-client'. Furthur upon running this command knife node show UmaidNode1, it shows the data about node where IP is blank. I don't know why it is not getting this IP here. Showing the output Node Name: UmaidNode1 Environment: _default FQDN: IP: Run List: recipe[nginx], recipe[apache] Roles: Recipes: Platform: Tags: enter image description here
The issue is finally resolved. I don't know why, but the problem was with the ChefDK version. I was using the latest version 4.8.23. It always creates directory /etcchef but the chef searches for all files in the directory /etc/chef. So it was unable to get the files like client.rb etc. NOTE: I even make the required /etc/chef directory by myself, but it didn't work. I installed an older version of ChefDK and now it's working fine.
"Directory name is invalid." etc. with rabbitmq-plugins on Windows
I'm trying to get RabbitMQ going on Windows 10 by following these instructions. However, when trying to enable the management plugin via powershell command: ./rabbitmq-plugins enable rabbitmq_management I get the following: The directory name is invalid. The filename, directory name, or volume label syntax is incorrect. Unsupported node name: hostname is invalid (possibly contains unsupported characters). If using FQDN node names, use the -l / --longnames argument. I've tried setting HOMEDRIVE=C: as the blog suggested. What am I doing wrong? EDIT Per the comment below I did the following: PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin> ./rabbitmq-service.bat stop The directory name is invalid. The filename, directory name, or volume label syntax is incorrect. The RabbitMQ service is stopping. The RabbitMQ service was stopped successfully. PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin> ./rabbitmq-service.bat uninstall The directory name is invalid. The filename, directory name, or volume label syntax is incorrect. ********************* Service control usage ********************* rabbitmq-service help - Display this help rabbitmq-service install - Install the RabbitMQ service rabbitmq-service remove - Remove the RabbitMQ service The following actions can also be accomplished by using Windows Services Management Console (services.msc): rabbitmq-service start - Start the RabbitMQ service rabbitmq-service stop - Stop the RabbitMQ service rabbitmq-service disable - Disable the RabbitMQ service rabbitmq-service enable - Enable the RabbitMQ service PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin> set HOMEDRIVE=C: PS C:\program files\rabbitmq server\rabbitmq_server-3.7.15\sbin> ./rabbitmq-service.bat install The directory name is invalid. The filename, directory name, or volume label syntax is incorrect. RabbitMQ service is already present - only updating service parameters "WARNING: Using RABBITMQ_ADVANCED_CONFIG_FILE: C:\Users\Mj\AppData\Roaming\RabbitMQ\advanced.config" 2019-06-14 10:55:09.630000 args: [] format: "Failed to create cookie file 'l:/.erlang.cookie': enoent" label: {error_logger,error_msg} 2019-06-14 10:55:09.630000 crash_report #{label=>{proc_lib,crash},report=>[[{initial_call,{auth,init,['Argument__1']}},{pid,<0.57.0>},{registered_name,[]},{error_info,{error,"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{ancestors,[net_sup,kernel_sup,<0.46.0>]},{message_queue_len,0},{messages,[]},{links,[<0.55.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reductions,1456}],[]]} 2019-06-14 10:55:09.635000 supervisor_report #{label=>{supervisor,start_error},report=>[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{offender,[{pid,undefined},{id,auth},{mfargs,{auth,start_link,[]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} 2019-06-14 10:55:09.704000 supervisor_report #{label=>{supervisor,start_error},report=>[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}},{offender,[{pid,undefined},{id,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]} 2019-06-14 10:55:09.742000 crash_report #{label=>{proc_lib,crash},report=>[[{initial_call,{application_master,init,['Argument__1','Argument__2','Argument__3','Argument__4']}},{pid,<0.45.0>},{registered_name,[]},{error_info,{exit,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}}},{kernel,start,[normal,[]]}},[{application_master,init,4,[{file,"application_master.erl"},{line,138}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}},{ancestors,[<0.44.0>]},{message_queue_len,1},{messages,[{'EXIT',<0.46.0>,normal}]},{links,[<0.44.0>,<0.43.0>]},{dictionary,[]},{trap_exit,true},{status,running},{heap_size,987},{stack_size,27},{reductions,184}],[]]} 2019-06-14 10:55:09.789000 std_info #{label=>{application_controller,exit},report=>[{application,kernel},{exited,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.erlang.cookie': enoent",[{auth,init_cookie,0,[{file,"auth.erl"},{line,286}]},{auth,init,1,[{file,"auth.erl"},{line,140}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}}}}},{kernel,start,[normal,[]]}}},{type,permanent}]} {"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{\"Failed to create cookie file 'l:/.erlang.cookie': enoent\",[{auth,init_cookie,0,[{file,\"auth.erl\"},{line,286}]},{auth,init,1,[{file,\"auth.erl\"},{line,140}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}}}}},{kernel,start,[normal,[]]}}}"} Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,net_sup,{shutdown,{failed_to_start_child,auth,{"Failed to create cookie file 'l:/.er Crash dump is being written to: C:\Users\Mj\AppData\Roaming\RabbitMQ\log\erl_crash.dump...done
Seems that the Order at which the commands are ran Matters, this worked for me, shuffle them around SET HOMEDRIVE=C: rabbitmq-plugins.bat enable rabbitmq_management rabbitmq-service.bat stop rabbitmq-service.bat install rabbitmq-service.bat start
Based off of the comment #LukeBakken made in the original question, I was able to get around this by creating a local admin user and doing the install under the local admin user. This was after hours of battling by setting the HOMEDRIVE, etc.
I solved this by following way : 1. Opened command prompt using administrative mode 2. Go to sbin directory. Execute command "SET HOMEDRIVE=C:"
Based on the comment from Luke Bakken, this is what worked for me: Almost the same as his comment, but instead of uninstall I had to use remove. uninstall was not recognized. "Log in as the admin user you installed RMQ with; Open the "RabbitMQ Command Prompt (sbin dir)" terminal, run:" .\rabbitmq-service.bat stop .\rabbitmq-service.bat remove set HOMEDRIVE=C: .\rabbitmq-service.bat install .\rabbitmq-plugins.bat enable rabbitmq_management .\rabbitmq-service.bat start
Getting Docker Windows Containers to start automatically on reboot
My OS is Windows 10 and I am running Docker version 17.06.0-ce-win19. I am trying to set up a container so that it will restart automatically on reboot. When I use the command: docker run -it microsoft/nanoserver --restart=always I’m getting the following error: docker: Error response from daemon: container 35046c88d2564523464ecabc4d48eb0550115e33acb25b0555224e7c43d21e74 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"ApplicationName":"","CommandLine":"--restart=always","User":"","WorkingDirectory":"C:\","Environment":{},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":false,"ConsoleSize":[30,120]}. whereas if I leave out the --restart=always everything works fine. Is there something else I need to do to get --restart options working on Windows?
Parameters shall be coming before image:tag in CLI
Activemq will not start on my Ubuntu VM
I'm trying to run activemq on my ubuntu virtual machine but have constantly been running into issues getting it to start up. I've tried downloading the binary and source with no luck. Currently I have downloaded the source, run "mvn clean install -Dmaven.test.skip=true" and mvn reported successful installation. I then hunted around in my .m2 folder found apache-activemq-5.5.1-bin.tar.gz and extracted it to my home/USERNAME dir and attempted to run "bash bin/activemq start" only to receive the following error. INFO: Loading '/etc/default/activemq' INFO: Using java '/usr/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details bin/activemq: line 370: /usr/bin/java -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxremote -Dactivemq.classpath="/home/jacob/activeMq1/apache-activemq-5.5.1/conf;" -Dactivemq.home="/home/jacob/activeMq1/apache-activemq-5.5.1" -Dactivemq.base="/home/jacob/activeMq1/apache-activemq-5.5.1" -jar "/home/jacob/activeMq1/apache-activemq-5.5.1/bin/run.jar" start >/dev/null 2>&1 & RET="$?"; APID="$!"; echo $APID > /home/jacob/activeMq1/apache-activemq-5.5.1/data/activemq.pid; echo "INFO: pidfile created : '/home/jacob/activeMq1/apache-activemq-5.5.1/data/activemq.pid' (pid '$APID')"; exit $RET: No such file or directory Has any one run into this type of error before?
Looks like I'm answering one of my questions again, but maybe this will help someone in the future. steps. I ended up getting activemq to work by creating a configuration file via running the command "./bin/activemq setup newConfig" (exclude the quotes) I then replaced the current config file "activemq" which was located at etc/default/. (I made a backup of the original activemq file before overwriting it with newConfig). Run "./bin/activemq start" which will create a PID file. After the file is created re-run "./bin/activemq start" to finally start up the broker. You can then test the install by navigating to "http://localhost:8161/admin/" or by doing a "netstat -an | grep 61616" if you kept the default ports etc.
I install activemq 5.13 on Debian, download and unzip in /opt, then I go to /opt/apache-activemq-5.13.1/run "./bin/activemq start", then appear this error: xx#debian:/opt/apache-activemq-5.13.1$ ./bin/activemq start INFO: Loading '/etc/default/activemq' INFO: Using java '/usr/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details ./bin/activemq: 330: ./bin/activemq: "/usr/bin/java" -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/opt/apache-activemq-5.13.1//conf/login.config -Djava.awt.headless=true -Djava.io.tmpdir="/opt/apache-activemq-5.13.1//tmp" -Dactivemq.classpath="/opt/apache-activemq-5.13.1//conf:/opt/apache-activemq-5.13.1//../lib/:" -Dactivemq.home="/opt/apache-activemq-5.13.1/" -Dactivemq.base="/opt/apache-activemq-5.13.1/" -Dactivemq.conf="/opt/apache-activemq-5.13.1//conf" -Dactivemq.data="/opt/apache-activemq-5.13.1//data" -jar "/opt/apache-activemq-5.13.1//bin/activemq.jar" start >/dev/null 2>&1 & RET="$?"; APID="$!"; echo $APID > /opt/apache-activemq-5.13.1//data/activemq.pid; echo "INFO: pidfile created : '/opt/apache-activemq-5.13.1//data/activemq.pid' (pid '$APID')";exit $RET: not found What I did is to check the Debian version using "uname -a": Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux I found my debian is 64 bit system. so I run ./bin/linux-x86-64/activemq start It shows: Starting ActiveMQ Broker... Then I can access the site:http://localhost:8161/admin/ with username "admin" and password "admin"
with Ubuntu 14.04, I had to create a link in /etc/activemq/instances-enabled sudo ln -s ../instances-available/main/ similar to apache2 setup then started the server with /etc/init.d/activemq start
sudo is necessary. bin$ sudo ./activemq start bin$ sudo ./activemq status INFO: Loading '/opt/runtime/apache-activemq-5.11.1/bin/env' INFO: Using java '/usr/bin/java' ActiveMQ is running (pid '29887')