DNX and DNVM have been replaced by the new .NET CLI. See:
As a result, we're not accepting anymore changes to this project. Please file any new issues on http://github.com/dotnet/cli.
OBSOLETE - see readme
License: Other
DNX and DNVM have been replaced by the new .NET CLI. See:
As a result, we're not accepting anymore changes to this project. Please file any new issues on http://github.com/dotnet/cli.
With the new changes to support Mono instead of mono45, the alias column does not display the aliases correctly.
Repro:
$ /bin/bash -c "source ~/.kre/kvm/kvm.sh && kvm upgrade; echo ExitCode=$?"
Determining latest version
Latest version is 1.0.0-alpha3
Downloading KRE-mono45-x86.1.0.0-alpha3 from https://www.myget.org/F/aspnetmaster/api/v2
Installing to //.kre/packages/KRE-mono45-x86.1.0.0-alpha3
KVM Needs unzip to proceed.
ExitCode=0
Returning success exit code in case of failure makes scripting almost impossible and scripts proceed with the next command (which requires a successful installation)
Currently kvm scripts hardcode where it will get the KRE packages from. It currently points to the dev myget feed. We need to have ability to point to a feed and download the KRE packages. This is going to be useful as soon as there are multiple feeds / locations where KRE will be available.
Feed can either be a web url or a UNC or a disk path.
From aspnet/dnx#316
I'm wondering if it will be helpful to have a update switch in kvm to update kvm itself. I'm not sure if this is the best way to get an updated kvm, but I'm open to suggestions.
Currently kvm can install only svc50 and svcr50 flavors. I'm interested in developing mono based applications on windows. So I would like to use the kvm that I have installed on windows to acquire KRE-mono packages.
I think the scope of this bug is more than what I mentioned above. The mono KRE package does not currently have windows .cmd files for k, kpm etc. We need to fix the mono KRE package as well to address the scenario.
From aspnet/dnx#397
An error to any switch value in kvm should clearly indicate the error first and print the usage.
Example:
kvm alias test2 0.1-alpha-build-0508 -x64 -scrc50
Notice svrc50 is incorrectly spelled as scrc50. The error message printed is
"Unknown command" followed by usage of kvm.
Pointing out the exact error will help in easier debugging.
From aspnet/dnx#321
Currently kvm list
does not list the alias of different installed KREs on the machine even though some of these have an alias. To get the alias of the corresponding KRE, today we have to do a separate kvm alias
command.
Active Version Runtime Architecture Location
------ ------- ------- ------------ --------
* 0.1-alpha-build-0446 svrc50 x64 D:\Users\prabht\.kre\packages
0.1-alpha-build-0508 svrc50 x86 D:\Users\prabht\.kre\packages
kvm alias
Alias Name
----- ----
test1 KRE-svr50-x86.0.1-alpha-build-0446```
From https://github.com/aspnet/KRuntime/issues/317
For example I want to delete some old version of installed KRE, kvm should provide a way to delete them. Currently it is a manual folder delete.
This is similar to aspnet/dnx#319, but this item is to delete the KRE not the alias. By this we delete the KRE, but the alias still lives.
From aspnet/dnx#322
Currently there is no way to delete an alias created by the kvm. It would be great if we can have that option
From aspnet/dnx#197
At some point after installing the latest kvm I've got the 'maximum nested function level reached' error.
Could not log in till removed the line from shell startup:
[ -s "/home/mike/.kre/kvm/kvm.sh" ] && . "/home/mike/.kre/kvm/kvm.sh" # Load kvm
Now can reproduce by running:
~/dev/Home/samples/HelloMvc (master ✔) ᐅ source ~/.kre/kvm/kvm.sh
local:215: job table full or recursion limit exceeded
local:1: maximum nested function level reached
And can't type anything anymore:
~/dev/Home/samples/HelloMvc (master) ᐅ
local:2: maximum nested function level reached
local:1: maximum nested function level reached
~/dev/Home/samples/HelloMvc (master) ᐅ
local:1: maximum nested function level reached
System:
Ubuntu Server 14.04.1 with all the updates. With zsh, oh-my-zsh, ubuntu-desktop, mono-3.10.0 installed from tarball.
Currently VS runs only desktop x86 version of KLR for KPM and Design time host apps ...
After VS support for multiple KRE's , if the user upgraded only coreclr or x64 desktop version without upgrading the desktop version first, VS will try to find a matching desktop x86 version for the version in default.txt and bails with an error saying it can not find KRE.(See the tooling bug: http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/947518 ).
It would be good to fix kvm to install desktop x86 version if user requested other type and desktop x86 version is not present so that VS will not run into the above issue.
From aspnet/dnx#203
ACTUAL
Prompts to be elevated, but even if you elevate, you get some red text in the powershell window and kvm does not get setup properly.
I have a video of this if you need
EXPECTED
kvm to be available
The dev branch kvm.sh has updated code to handle new KRE versions will the kvm .sh on feature-homebrew has symlink changes not in dev. We need to merge and update this before next release
The latest kvm.ps1 on dev branch is updated (for example, updated help to reflect new framework names) so the kvm.sh needs to be updated with the changes as well.
Today kvm list shows Alias
as the last column in the result. To associate an alias to a version of KRE there too much of eye ball movement from left to right of the screen as there is physical location in between these which can be bit longer strings.
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
1.0.0-alpha3-10156 svr50 x64 C:\Users\prabht\.kre\packages
1.0.0-alpha3-10156 svrc50 x64 C:\Program Files\KRE\packages
* 1.0.0-alpha3-10161 svr50 x86 C:\Users\prabht\.kre\packages fromnupkg1, test1
Ask: Put the Alias
column between Active
and Version
fields.
Part of the install process for svrc should be compiling the svrc kre to native images.
This is a branched off bug from here : aspnet/dnx#318
Also when doing an upgrade when there is an existing KRE and the default alias is changed to point to the newly installed KRE, can we print a clear message that default alias is overridden?
Today we always print
Setting alias 'default' to 'KRE-svrc50-x86.0.1-alpha-build-0509'
Instead can we print
Replacing alias 'default' to point to 'KRE..blah'.
If the user does a kvm upgrade without realizing that the default alias will be overwritten, this message can ring a bell.
From aspnet/dnx#340
Currently we seem to leave the temp directory in the packages folder after successful installation.
From aspnet/dnx#315
As of now there is no way to get the full KRE name which includes to architecture and clr types along with version. We need this to do kpm pack. It would be good if this could be added as one of the column to kvm list
result
See aspnet/dnx#598 for details. This will be the highest priority. We probably won't support installing older versions of the KRE with the newer kvm either.
Currently this is a manual file delete.
From aspnet/dnx#319
C:\Users\janezhou>kvm list
Active Version Runtime Architecture Location
------ ------- ------- ------------ --------
1.0.0-alpha2 svr50 x86 C:\Users\janezhou\.kre\packages
1.0.0-alpha2 svrc50 x86 C:\Users\janezhou\.kre\packages
* 1.0.0-alpha3 svr50 x86 C:\Users\janezhou\.kre\packages
1.0.0-alpha3 svrc50 x86 C:\Users\janezhou\.kre\packages
1.0.0-alpha3-10241 svr50 x64 C:\Users\janezhou\.kre\packages
* 1.0.0-alpha3-10241 svr50 x86 C:\Users\janezhou\.kre\packages
1.0.0-alpha3-10241 svrc50 x86 C:\Users\janezhou\.kre\packages
This seems to be the same issue that was opened in KRuntime repo:
aspnet/dnx#514
When I set the KRE_NUGET_API_URL to override the feed installation path to use the release feed rather than VNext feed, I have use the environment set command to set it to "https://www.myget.org/F/aspnetvnext/api/v2". However, it takes in the "" literally into the environment variable. The Subsequent command to run KVM install actually failed the command complaining the following unclear error message.
Downloading KRE-svr50-x86.KRE-svr50-x86.1.0.0-alpha2-10030 from "https://www.myg
et.org/F/aspnetrelease/api/v2"
Exception calling "DownloadFile" with "2" argument(s): "Illegal characters in path."
Just out of curiosity, I added two valid paths for KRE to $env:Path
:
C:\Users\Tugberk.kre\packages\KRE-svrc50-x86.1.0.0-alpha3-10042\bin
C:\Users\Tugberk.kre\packages\KRE-svr50-x86.1.0.0-alpha3-10042\bin
running kvm list
shows two runtimes as active:
Active Version Runtime Architecture Location
0.1-alpha-build-0446 svr50 x86 C:\Users\Tugberk\.kre\packages 0.1-alpha-build-0446 svrc50 x86 C:\Users\Tugberk\.kre\packages
- 1.0.0-alpha3-10042 svr50 x86 C:\Users\Tugberk.kre\packages
- 1.0.0-alpha3-10042 svrc50 x86 C:\Users\Tugberk.kre\packages
However, if I run k
, it gets the svrc50 one.
Loaded Module: klr.core45.dll
...
I am not sure which solution would be the correct one here:
k
should throw as there are two active runtimes.kvm list
should take the same approach as the k
and selects only one runtime as active.From aspnet/dnx#375
Run the following on a clean machine -
kvm install 0.1-alpha-build-0446 -x64 -g
You see the following error:
Downloading KRE-svr50-x64.0.1-alpha-build-0446 from https://www.myget.org/F/aspn
etvnext/api/v2/
Installing to C:\Program Files\KRE\packages\KRE-svr50-x64.0.1-alpha-build-0446
Cannot find KRE-svr50-x64.0.1-alpha-build-0446, do you need to run 'kvm install
0.1-alpha-build-0446'?
You can run the above command successfully only if you have run it once without the -g flag.
We should be able to do this in one go.
kvm help doesn't have any mention of this as a requirement too.
From aspnet/dnx#224
When running stress tests, we setup kvm on the target machine before doing bunch of other stuff to kick start a stress test on that machine...during this process we are calling kvm.cmd, but we are noticing that kvm.ps1
script is looking for a keystroke to exit.
The command "kvm" has been in use since 2007 as a platform for running virtual machines on Linux with hardware acceleration.
The PATH environment on Linux is a flat namespace, so it is not possible to offer two different applications with the same command name.
It will be awkward to offer ASP.NET KVM as a standard feature in Linux package managers, without renaming the command to something else like "aspkvm", which will be tedious and painful as far as documentation goes for all concerned.
The relative sizes of the communities have no bearing - for example, the Node.js maintainers in Debian Linux were forced to rename the "node" command in Debian-only, to avoid collision with a ham radio app from the 1990s which was already using "node".
It's still very early days for ASP.NET KVM - please consider renaming the command globally, rather than requiring the command to be slightly different in a few places for a few users.
kvm install d:\KRE-svr50-x64.1.0.0-alpha3-10156.nupkg -alias fromnupkg1
Unpacking to C:\Users\prabht.kre\packages\temp
Installing to C:\Users\prabht.kre\packages\KRE-svr50-x64.1.0.0-alpha3-10156
Cannot find KRE-svr50-x86.1.0.0-alpha3-10156, do you need to run 'kvm install 1.0.0-alpha3-10156'?
Setting alias 'fromnupkg1' to 'KRE-svr50-x86.1.0.0-alpha3-10156'
In a freshly-installed kvm on Linux, I execute kvm upgrade
, it installs the first KRE successfully, sets the 'default' alias correctly however exits the function with code=1, which is not accurate.
root@cabc62fb553a:/# source ~/.kre/kvm/kvm.sh && kvm upgrade; echo ExitCode=$?
Determining latest version
Latest version is 1.0.0-alpha3-10146
Downloading KRE-mono45-x86.1.0.0-alpha3-10146 from https://www.myget.org/F/aspnetvnext/api/v2
Installing to //.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10146
Adding //.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10146/bin to process PATH
Setting alias 'default' to 'KRE-mono45-x86.1.0.0-alpha3-10146'
ExitCode=1
root@cabc62fb553a:/#
I installed the KVM using:
curl https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh
I see the same behavior on my Mac OS X. KVM build number is 10002.
ACTUAL
kvm installs fine, but need to open a new command prompt to be able to use it
EXPECTED
kvm should be available in the same command prompt after installation completes
KVM install fails if I give options -p-g. It works fine if I take those away. If I install again with -p -g, works fine.
D:\enlistments\Home>kvm install 0.1-alpha-build-0421 -x64 -p -g
Downloading KRE-svr50-x64.0.1-alpha-build-0421 from https://www.myget.org/F/aspnetvnext/api/v2/
Installing to C:\Program Files\KRE\packages\KRE-svr50-x64.0.1-alpha-build-0421
Cannot find KRE-svr50-x64.0.1-alpha-build-0421, do you need to run 'kvm install 0.1-alpha-build-0421'?
D:\enlistments\Home>kvm install 0.1-alpha-build-0421 -x64
Downloading KRE-svr50-x64.0.1-alpha-build-0421 from https://www.myget.org/F/aspnetvnext/api/v2/
Installing to C:\Users\mugdhak\.kre\packages\KRE-svr50-x64.0.1-alpha-build-0421
Adding C:\Users\mugdhak\.kre\\packages\KRE-svr50-x64.0.1-alpha-build-0421\bin to process PATH
D:\enlistments\Home>kvm install 0.1-alpha-build-0421 -x64 -p -g
Downloading KRE-svr50-x64.0.1-alpha-build-0421 from https://www.myget.org/F/aspnetvnext/api/v2/
Installing to C:\Program Files\KRE\packages\KRE-svr50-x64.0.1-alpha-build-0421
Adding C:\Users\mugdhak\.kre\\packages\KRE-svr50-x64.0.1-alpha-build-0421\bin to process PATH
Adding C:\Users\mugdhak\.kre\\packages\KRE-svr50-x64.0.1-alpha-build-0421\bin to user PATH
From aspnet/dnx#168
Because waiting at a blank command line sucks
As I'm trying to create a docker container for ASP.NET vNext I encounterd an issue.
One part of my script does the kvm upgrade command. In the log files I see that the command succeeds but still my docker build fails.
After some investigation I found that the kvm upgrade command always returns 1 even when the upgrade succeeds. The evaluation of [[ -n $alias ]] sets the return code to 1 and without any other return it will keep hold on this result code.
Below I have made the change. Please let me know if I should send a pull request.
Commit: Removed inline evaluation and execution of kvm alias
Steps to reproduce:
kvm upgrade
echo $? -> should show 0 instead of 1
I'm using Ubunto 14.04
K Runtime Environment Version Manager - Build 10010
kvm list
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
* 1.0.0-alpha3 mono45 x86 ~/.kre/packages default
1.0.0-alpha4-10285 mono45 x86 ~/.kre/packages
1.0.0-alpha4-10331 mono45 x86 ~/.kre/packages
1.0.0-alpha4-10334 mono45 x86 ~/.kre/packages
kvm install lateest
Downloading KRE-mono45-x86.lateest from https://www.myget.org/F/aspnetmaster/api/v2
KRE-mono45-x86.lateest was not found in repository https://www.myget.org/F/aspnetmaster/api/v2
kvm list
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
* 1.0.0-alpha3 mono45 x86 ~/.kre/packages default
1.0.0-alpha4-10285 mono45 x86 ~/.kre/packages
1.0.0-alpha4-10331 mono45 x86 ~/.kre/packages
1.0.0-alpha4-10334 mono45 x86 ~/.kre/packages
lateest mono45 x86 ~/.kre/packages
mono --version
Mono JIT compiler version 3.8.1 (master/a8a5187 Sun Aug 31 01:02:32 CEST 2014)
cat /etc/issue
Welcome to openSUSE 13.1 "Bottle" - Kernel \r (\l).
Enviromnent:
OSX 10.9.3
Xamarin Studio 5.1.1
Mono 4.6.0 Runtime
The trace is the following:
Unable to find package 'KoreBuild'.
Installing 'Sake 0.2'.
Successfully installed 'Sake 0.2'.
info: Target default
info: Target pre-clean
info: Target clean
info: Target post-clean
info: Target validate
info: Target initialize
info: Target copy-kvm
info: Copying .DS_Store
info: Copying kvm.cmd
info: Copying kvm.ps1
info: Copying kvm.sh
info: Copying kvmsetup.cmd
info: Updating /Users/robertoluis/kvm/artifacts/kvm.ps1
info: Updating /Users/robertoluis/kvm/artifacts/kvm.sh
info: Target compile
info: Target test-compile
info: Target test
info: Target package-prepare
info: Target package
Disclaimer: I originally thought this bug had to do with a version difference between the find binary, but then I discovered that it was because of the noglob
alias (see technical details below). It might make sense to remove the globbing in kvm.sh
but the case could also be made that kvm.sh can't support wild variations of aliasing of find either.
kvm list
doesn't work with noglob find
kvm list
results in an error of "No such file or directory" because of the glob usage of find in kvm.sh. I wouldn't have run into this except that prezto (a widely-used ZSH configuration framework) defaults to using this alias.
find
with noglob find
(e.g. alias find='noglob find'
) such as what prezto does.kvm list
I would expect to see the list of installed KRE packages.
$ kvm list
Active Version Runtime Architecture Location
------ ------- ------- ------------ --------
find: /Users/me/.kre/packages/*: No such file or directory
The specific line that seems to conflict with noglob find
is for f in $(find $KRE_USER_PACKAGES/* -name "$searchGlob" -type d -prune -exec basename {} \;); do
.
If I change find $KRE_USER_PACKAGES/*
to find $KRE_USER_PACKAGES
(remove the "/*" in the find command), it works and properly lists the installed packages:
$ kvm list
Active Version Runtime Architecture Location
------ ------- ------- ------------ --------
* 1.0.0-alpha4-10275 mono45 x86 /Users/me/.kre/packages
Currently it seems like kvm always includes includePrerelease=true by default.
Expectation: By default search only released packages. Search prerelease packages if this switch is specified.
From aspnet/dnx#342
There are 2 issues with the current KVM and the Azure Websites sandbox:
1- Write-Host
doesn't work. Use [System.Console]::WriteLine()
instead
2- Shell zip extraction doesn't work. System.IO.Compression
works fine.
I noticed that you were using System.IO.Compressoin
before then switched to the shell extraction because of older versions of powershell. Checking the powershell version and picking the correct extraction logic might be a better idea.
(copied from dotnet/aspnetcore#142)
This may be something related to the way we add newlines.
kvm > help.txt
Sometimes it is useful to redirect the command line help to a text file to have a detailed look. Try some similar commands like dir /? > help.txt.
From aspnet/dnx#312
As discussed in the meeting, providing two additional formulae for feed management in kvm
kvm install "\machinename\kre\KRE-svr50-x86.1.0.0-alpha3-10161.nupkg" -g
Downloading KRE-svr50-x86.\machinename\kre\KRE-svr
50-x86.1.0.0-alpha3-10161.nupkg from https://www.myget.org/F/aspnetvnext/api/v2
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred du
ring a WebClient request."
This happens only for global installs. Install to user profile folder works fine.
Because copying and pasting is annoying
On a clean machine with no KRE installed yet, if you try to run:
kvm install KRE-svrc50-x86.1.0.0-alpha4-10309.nupkg
with the .nupkg in that location of course.
The package fails to install because in the Requested-VersionOrAlias function it looks for the alias folder which doesn't exist yet, and by default sets the platform to svr50 when we are trying to use svrc50
It is painful to have multiple copies of kvm in different branches pointing to different hard coded feeds. I'm wondering if we should have ability to add a feed and switch between them like Nuget package manager allows. The experience can be similar to what we do with kvm use
and the implementation could be similar to what we do for storing alias
(storing them in a file in alias folder).
For example:
kvm feed add [friendlyname] [feedurl]
kvm feed add master https://www.myget.org/f/aspnetmaster/api/v2
kvm feed add dev https://www.myget.org/f/aspnetvnext/api/v2
kvm feed add official https://nuget.org/api/v2
kvm feed update [friendlyname] [newfeedurl]
kvm feed delete [friendlyname]
kvm feed use master
to point to master feed. kvm feed use official
to point to nuget feed.
By this way we can have a familiar working model and at the same time have the same copy of kvm to get KRE from multiple sources instead of overriding it with environment variables.
Today we have an environment variable named KRE_NUGET_API_URL
to override the location of where to acquire KRE from. Will it make sense to accept a command line parameter for the source. Some times setting environment variable overrides is a pain in case of automation. It will be helpful to accept a command line parameter.
If I leave required parameters out for kvm commands, it shows the USAGE string and terminates with return code 0, indicating success.
However by convention, command line programs terminating with insufficient parameters and thus showing the error message exit with non-zero exit codes, like 1. curl
, git
, gem
are some examples. My 2 cents.
All of K commands were working on my VM both in Powershell and in the cmd prompt. Then I did an upgrade and for some strange reason "K" cmd stopped working ONLY in Powershell.
PS C:\Users\gblock> k
Program 'K.cmd' failed to run: The system cannot find the file specifiedAt line:1 char:1
+ k
+ ~.
At line:1 char:1
+ k
+ ~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
At @davidfowl's suggestion I cleaned my path, removed the environment variable and deleted the c:/%user%/.kre folder.
Then when I run the installation script from the cmd prompt I get the following output.
C:\Users\gblock>@powershell -NoProfile -ExecutionPolicy unrestricted -Command "i
ex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com
/aspnet/Home/master/kvminstall.ps1'))"
Using temporary directory: C:\Users\gblock\AppData\Local\Temp\2\kvminstall
Downloading KVM.ps1 to C:\Users\gblock\AppData\Local\Temp\2\kvminstall\kvm.ps1
Downloading KVM.cmd to C:\Users\gblock\AppData\Local\Temp\2\kvminstall\kvm.cmd
Installing KVM
Program 'kvm.cmd' failed to run: The system cannot find the file specifiedAt
line:15 char:1
+ & $kvmCmdPath setup
+ ~~~~~~~~~~~~~~~~~~~.
At line:15 char:1
+ & $kvmCmdPath setup
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedEx
ception
+ FullyQualifiedErrorId : NativeCommandFailed
If I clone the repo and then manually run "kvm setup" the setup finishes. Closing Powershell and reopening then "kvm" works. But k does not and I get the same error.
This is a VM, and I can easily create a new one using the Azure image, but the behavior is troubling.
Has anyone else seen this after upgrade?
If anyone on the team wants to check out my VM, email me, [email protected] and I'll send them the info to login.
From aspnet/dnx#350
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.