t2-vm create failure
Closed this issue · 8 comments
rwaldron commented
$ t2-vm create
Initializing VM...
(Replacing previous VM...)
VBoxManage: error: Could not find a registered machine named 'tessel2'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMName).raw(), machine.asOutParam())" at line 151 of file VBoxManageMisc.cpp
Unhandled rejection Error: 1
at Object.ensureErrorObject (/Users/rwaldron/clonez/t2-vm/node_modules/bluebird/js/main/util.js:228:20)
at Promise._rejectCallback (/Users/rwaldron/clonez/t2-vm/node_modules/bluebird/js/main/promise.js:416:22)
at /Users/rwaldron/clonez/t2-vm/node_modules/bluebird/js/main/promise.js:433:17
at ChildProcess.<anonymous> (/Users/rwaldron/clonez/t2-vm/etc.js:47:14)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
Student007 commented
@rwaldron I also had this problem yesterday and quick fixed this like that:
- change the line 103 of etc.js to something like exports.VM_NAME = 'T2';//'tessel2';
- (sudo) npm install -g
rwaldron commented
Ah! Thank you :)
huseyinkozan commented
$ node /opt/node/bin/t2-vm create Initializing VM...
(Replacing previous VM...)
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
? Choose a bridge interface (or hit enter) eth0
Downloading image...
........................... downloaded ...
Creating VM...
Attaching to serial port: /home/huseyinkozan/.tessel/vm.port
Configuring VM...
events.js:141
throw er; // Unhandled 'error' event
^
Error: connect ENOENT /home/huseyinkozan/.tessel/vm.port
at Object.exports._errnoException (util.js:870:11)
at exports._exceptionWithHostPort (util.js:893:20)
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)
$ node -v
v4.2.4
$ lsb_release --all
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
$ vboxmanage --version
5.0.12r104815
huseyinkozan commented
I have fixed by changing the etc.js startvm() line like this:
diff --git a/etc.js b/etc.js
index ee087b5..c012605 100644
--- a/etc.js
+++ b/etc.js
@@ -55,7 +55,7 @@ function startvm (name) {
return isWin ?
spawn('vboxheadless', ['-s', name])
:
- spawn('sh', ['vboxheadless', '-s', name]);
+ spawn('vboxheadless', ['-s', name]);
}
function seekDevice (hostname, next) {
huseyinkozan commented
@johnnyman727 this change fixes the unhandled exception that I wrote before above. To see what exactly going, I chagned the line like this :
spawn('vboxheadless', ['-s', name, '--vrde', 'on'], { stdio: 'inherit' });
@kevinmehall Yes, both win and not win lines are same. I left the decision to maintainer to simplify those lines.
johnnyman727 commented
@huseyinkozan ah great! Could you go ahead and remove the win
check and then we'll merge. Also, please sign the Dojo Foundation CLA first. Thanks!
huseyinkozan commented
Signed the CLA and deleted the win check.
johnnyman727 commented
Fantastic, thanks!