Search Results

Search found 4110 results on 165 pages for 'vm'.

Page 34/165 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • SQL Server and Hyper-V Dynamic Memory Part 3

    - by SQLOS Team
    In parts 1 and 2 of this series we looked at the basics of Hyper-V Dynamic Memory and SQL Server memory management. In this part Serdar looks at configuration guidelines for SQL Server memory management. Part 3: Configuration Guidelines for Hyper-V Dynamic Memory and SQL Server Now that we understand SQL Server Memory Management and Hyper-V Dynamic Memory basics, let’s take a look at general configuration guidelines in order to utilize benefits of Hyper-V Dynamic Memory in your SQL Server VMs. Requirements Host Operating System Requirements Hyper-V Dynamic Memory feature is introduced with Windows Server 2008 R2 SP1. Therefore in order to use Dynamic Memory for your virtual machines, you need to have Windows Server 2008 R2 SP1 or Microsoft Hyper-V Server 2008 R2 SP1 in your Hyper-V host. Guest Operating System Requirements In addition to this Dynamic Memory is only supported in Standard, Web, Enterprise and Datacenter editions of windows running inside VMs. Make sure that your VM is running one of these editions. For additional requirements on each operating system see “Dynamic Memory Configuration Guidelines” here. SQL Server Requirements All versions of SQL Server support Hyper-V Dynamic Memory. However, only certain editions of SQL Server are aware of dynamically changing system memory. To have a truly dynamic environment for your SQL Server VMs make sure that you are running one of the SQL Server editions listed below: ·         SQL Server 2005 Enterprise ·         SQL Server 2008 Enterprise / Datacenter Editions ·         SQL Server 2008 R2 Enterprise / Datacenter Editions Configuration guidelines for other versions of SQL Server are covered below in the FAQ section. Guidelines for configuring Dynamic Memory Parameters Here is how to configure Dynamic Memory for your SQL VMs in a nutshell: Hyper-V Dynamic Memory Parameter Recommendation Startup RAM 1 GB + SQL Min Server Memory Maximum RAM > SQL Max Server Memory Memory Buffer % 5 Memory Weight Based on performance needs   Startup RAM In order to ensure that your SQL Server VMs can start correctly, ensure that Startup RAM is higher than configured SQL Min Server Memory for your VMs. Otherwise SQL Server service will need to do paging in order to start since it will not be able to see enough memory during startup. Also note that Startup Memory will always be reserved for your VMs. This will guarantee a certain level of performance for your SQL Servers, however setting this too high will limit the consolidation benefits you’ll get out of your virtualization environment. Maximum RAM This one is obvious. If you’ve configured SQL Max Server Memory for your SQL Server, make sure that Dynamic Memory Maximum RAM configuration is higher than this value. Otherwise your SQL Server will not grow to memory values higher than the value configured for Dynamic Memory. Memory Buffer % Memory buffer configuration is used to provision file cache to virtual machines in order to improve performance. Due to the fact that SQL Server is managing its own buffer pool, Memory Buffer setting should be configured to the lowest value possible, 5%. Configuring a higher memory buffer will prevent low resource notifications from Windows Memory Manager and it will prevent reclaiming memory from SQL Server VMs. Memory Weight Memory weight configuration defines the importance of memory to a VM. Configure higher values for the VMs that have higher performance requirements. VMs with higher memory weight will have more memory under high memory pressure conditions on your host. Questions and Answers Q1 – Which SQL Server memory model is best for Dynamic Memory? The best SQL Server model for Dynamic Memory is “Locked Page Memory Model”. This memory model ensures that SQL Server memory is never paged out and it’s also adaptive to dynamically changing memory in the system. This will be extremely useful when Dynamic Memory is attempting to remove memory from SQL Server VMs ensuring no SQL Server memory is paged out. You can find instructions on configuring “Locked Page Memory Model” for your SQL Servers here. Q2 – What about other SQL Server Editions, how should I configure Dynamic Memory for them? Other editions of SQL Server do not adapt to dynamically changing environments. They will determine how much memory they should allocate during startup and don’t change this value afterwards. Therefore make sure that you configure a higher startup memory for your VM because that will be all the memory that SQL Server utilize Tune Maximum Memory and Memory Buffer based on the other workloads running on the system. If there are no other workloads consider using Static Memory for these editions. Q3 – What if I have multiple SQL Server instances in a VM? Having multiple SQL Server instances in a VM is not a general recommendation for predictable performance, manageability and isolation. In order to achieve a predictable behavior make sure that you configure SQL Min Server Memory and SQL Max Server Memory for each instance in the VM. And make sure that: ·         Dynamic Memory Startup Memory is greater than the sum of SQL Min Server Memory values for the instances in the VM ·         Dynamic Memory Maximum Memory is greater than the sum of SQL Max Server Memory values for the instances in the VM Q4 – I’m using Large Page Memory Model for my SQL Server. Can I still use Dynamic Memory? The short answer is no. SQL Server does not dynamically change its memory size when configured with Large Page Memory Model. In virtualized environments Hyper-V provides large page support by default. Most of the time, Large Page Memory Model doesn’t bring any benefits to a SQL Server if it’s running in virtualized environments. Q5 – How do I monitor SQL performance when I’m trying Dynamic Memory on my VMs? Use the performance counters below to monitor memory performance for SQL Server: Process - Working Set: This counter is available in the VM via process performance counters. It represents the actual amount of physical memory being used by SQL Server process in the VM. SQL Server – Buffer Cache Hit Ratio: This counter is available in the VM via SQL Server counters. This represents the paging being done by SQL Server. A rate of 90% or higher is desirable. Conclusion These blog posts are a quick start to a story that will be developing more in the near future. We’re still continuing our testing and investigations to provide more detailed configuration guidelines with example performance numbers with a white paper in the upcoming months. Now it’s time to give SQL Server and Hyper-V Dynamic Memory a try. Use this guidelines to kick-start your environment. See what you think about it and let us know of your experiences. - Serdar Sutay Originally posted at http://blogs.msdn.com/b/sqlosteam/

    Read the article

  • Can I minimize VMWare Workstation from exclusive mode?

    - by Blorgbeard
    I am running a VM on two monitors, in fullscreen exclusive mode. I would like to be able to minimize the VM and mess around in the Host, then go back to the VM. I can do this by pressing CTRL+ALT to get out of fullscreen mode, but this puts the VM back onto a single monitor, which moves all my VM's windows back to the main virtual screen. This is annoying, because when I come back to the VM, I have to go back to multiple monitor mode, and move windows back to where they should be. Is there a way to temporarily escape from fullscreen exclusive mode, without disturbing multi-monitor layout? I should note that I'm only using exclusive mode to get rid of the popup toolbar that otherwise appears when your mouse gets too close to the top of the screen. If there's another way to kill that, please let me know. My host and guest are both Windows 7 x64, and I'm running VMWare Workstation 8.

    Read the article

  • What are the limitations of virtual machines?

    - by j-g-faustus
    I'm considering setting up a virtual machine running Windows, with Ubuntu 10.10 as the host OS, for those cases where I have a Windows-only program. I understand that using a VM will lose some performance, but are there other limitations to what the OS in a virtual machine can do compared to "running on bare metal"? For example: Can a VM play games, like Dragon Age Origins or Civilization V? (Possibly with poorer framerates and/or lower resolution, but does it play at all?) Can a VM rip DVD/Blue-ray using AnyDVD or similar Windows program? Can a VM handle new hardware that requires dedicated drivers, but the drivers are only available for the OS running inside the VM? (Ex. graphics card, digital camera, card reader for smart card authentication.) Is it possible to say anything about "general limitations" of VMs, or is this wholly dependent on the specific VM?

    Read the article

  • How to create a VPN between a Host and VMWare VMs?

    - by Anindya Chatterjee
    I have a set of machines as follows My home laptop running Win7 Ultimate with internet connection. A vmware workstation vm running Windows Server 2003 Standard edition server in my laptop w/o internet connectivity Some of my peers' machines connected to internet I want to create a VPN with these machines, provided the VM will not have any direct internet connection and my peers should able to connect to the SVN server application running on this Win2003 server VM. Can anybody please suggest me how to setup this network, what software I need to install in both physical machine and vm, what kind of network connectivity should be there between vmware guest and host machine? EDIT: I deliberately don't want to connect the VM with internet. The host will work more of a gateway of the VPN connection for the VM.

    Read the article

  • VirtualBox cloned Ubuntu Server network error

    - by Luke
    I run a number of virtual servers on my network and I want to be able to easily clone base installations of Ubuntu Server. I use the VBoxManage command to clone the actual hard disk and I then create a new profile for my VM and copy over the settings of the original VM. However, when I boot into the cloned VM, there seems to be a network problem. When I issue a PING I get the message "Network unreachable". I traced it down to the fact that the virtual network card of the cloned VM has a different MAC address then the original VM. When I copy the MAC address the clone seems to work fine. How can I have the cloned VM have it's own MAC address?

    Read the article

  • Is there a "restore point" in Linux (Debian/Ubuntu) like Windows?

    - by Somebody still uses you MS-DOS
    I'm working directly in an Ubuntu Virtual Machine (VM). Some updates (like kernel) were available at the update manager. If I weren't using a VM, I wouldn't update it since it's a risk to break something. Since it's a VM, you can create a Snapshot or export an appliance and restore if something goes wrong. Suppose I'm not using a VM with a Debian/Ubuntu installation. Is there a install-restore approach that doesn't depend in a VM configuration to restore your system exactly before an upgrade (Like a "Restore Point" in Windows), being easy to restore like a VM appliance? (I'm not looking for "ghost images" or something like that (Norton Ghost, Clonezilla, etc), I'm looking for something builtin in the Linux System)

    Read the article

  • Detach Disk from deleted virtual machine

    - by user1628043
    I had an Virtual Machine running in Azure for a couple of weeks and suddenly it stopped responding. I shut it down and tried to restart it but that failed saying the VM faulted. I then deleted the VM which leaves the VHD file intact on my storage account. I was intending to try recreating a new VM using thie VHD from the first VM however, the OS disk and Data disk are both still marked as being attached to the original VM which no longer exists. Is there any way to detach these disks so I can use them to create a new VM?

    Read the article

  • map with string is broken?[solved]

    - by teritriano
    Yes. I can't see what im doing wrong the map is string, int Here the method bange::function::Add(lua_State *vm){ //userdata, function if (!lua_isfunction(vm, 2)){ cout << "bange: AddFunction: First argument isn't a function." << endl; return false;} void *pfunction = const_cast<void *>(lua_topointer(vm, 2)); char key[32] = {0}; snprintf(key, 32, "%p", pfunction); cout << "Key: " << key << endl; string strkey = key; if (this->functions.find(strkey) != this->functions.end()){ luaL_unref(vm, LUA_REGISTRYINDEX, this->functions[strkey]);} this->functions[strkey] = luaL_ref(vm, LUA_REGISTRYINDEX); return true; Ok, when the code is executed... Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6e6caa9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> > ::compare(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const () from /usr/lib/libstdc++.so.6 Seriously, what's wrong with my code. Thanks for help. Edit 1: Ok, I've done the solution and still fails. I've tried directly insert a string but gives the same error. Let's see, the object is a bange::scene inherited from bange::function. I create the object with lua_newuserdata: bange::scene *scene = static_cast<bange::scene *>(lua_newuserdata(vm, sizeof(bange::scene))); (...) scene = new (scene) bange::scene(width, height, nlayers, vm); I need this for LUA garbage collection. Now the access to bange::function::Add from Lua: static int bangefunction_Add(lua_State *vm){ //userdata, function bange::function *function = reinterpret_cast<bange::function *>(lua_touserdata(vm, 1)); cout &lt&lt "object with bange::function: " &lt&lt function << endl; bool added = function->bange::function::Add(vm); lua_pushboolean(vm, static_cast<int>(added)); return 1; } Userdata is bange::scene stored in Lua. Knowing that userdata is scene, in fact, the object's direction is the same when I've created the scene before. I need the reinterpret_cast, and then call the method. The pointer "this" is still the same direction inside the method. solved I did a small test in the bange::function constructor which works without problems. bange::function::function(){ string test("test"); this->functions["test"] = 2; } I finally noticed that the problem is bange::function *function = reinterpret_cast<bange::function *>(lua_touserdata(vm, 1)); because the object is bange::scene and no bange::function (i admit it, a pointer corruption) and this seems more a code design issue. So this, in a way, is solved. Thanks everybody.

    Read the article

  • VirtualBox host-only networking fails on Ubuntu 11.10 host

    - by Jeremy Kendall
    I've installed Ubuntu 11.10 on a new Lenovo Thinkpad 420s and I'm trying to get some VirtualBox VMs up and running (using Vagrant). Everything works fine until I try to add host-only networking. This is the failure I get in the terminal: I set logging to debug and tried again. Here's a paste of the relevant portion of the log. When I try to add host-only networks with the VirtualBox gui (File-Preferences-Networking-Add host-only networking), I get the following error message: This error is occurring with three different virtual boxes, all Ubuntu 11.10 64bit guests, one of which I've run without issue on a Windows host and an OSX host. Here is the Vagrantfile for the box I've successfully run on Windows and OSX: Vagrant::Config.run do |config| config.vm.box = "ubuntu-11.10" config.vm.box_url = "http://timhuegdon.com/vagrant-boxes/ubuntu-11.10.box" config.vm.network :hostonly, "192.168.33.10" config.vm.customize ["modifyvm", :id, "--memory", "512"] config.vm.customize ["modifyvm", :id, "--natnet1", "10.0.28.0/24"] config.vm.forward_port 80, 4567 end I've tried two other boxes as well, one of which I built last night with veewee, all of which are getting the exact same error. I've used rvm to install ruby 1.9.3-p125 [ x86_64 ], and I've got Vagrant running in its own gemset. I've Googled quite a lot and haven't been able to find any resolution. Suggestions?

    Read the article

  • links for 2010-12-10

    - by Bob Rhubart
    Oracle VM Blade Cluster Reference Configuration (InfraRed) "All components listed in the reference configuration have been tested together by Oracle, reducing the need for customer testing and the time-consuming and complex effort of designing and deploying a stable configuration." -- Ferhat Hatay (tags: oracle virtualization clustering) White Paper: Accelerating Deployment of Virtualized Infrastructures with the Oracle VM Blade Cluster Reference Configuration  The Oracle VM blade cluster reference configuration described in this paper provides a complete and fully tested virtualized stack that can reduce deployment time by weeks or months while also reducing risk and improving application performance. (tags: oracle otn virtualization infrastructure) White Paper: Best Practices and Guidelines for Deploying the Oracle VM Blade Cluster Reference Configuration This paper provides recommendations and best practices for optimizing virtualization infrastructures when deploying the Oracle VM blade cluster reference configuration.  (tags: oracle otn virtualization clustering) Your Most Familiar Processes - Rethink before using E2.0 | Enterprise 2.0 Blogs "Imagine what gains your organization could have by asking basic questions and reviewing your familiar processes before setting up even the most fundamental E2.0 technologies to support them!" -- John Brunswick (tags: oracle enterprise2.0 otn) Oracle's Global Single Schema (Oracle Master Data Management) "The success of all business processes depends on the availability of accurate master data. Clearly, the solution to this problem is to consolidate all the master data an organization uses to run its business." -- David Butler (tags: oracle otn mdm entarch businessprocess) One step further towards proven results: IT Strategies from Oracle Oracle ACE Douwe Pieter van den Bos shares his thoughts on "IT Strategies from Oracle" in this Google translation of his original Dutch post. (tags: oracle itso entarch) The Underground Oracle VM Manual Just in time for the holidays! Roddy Rodstein's epic 354-page manual is now available in a single pdf.. (tags: oracle otn virtualization oraclevm)

    Read the article

  • Windows Azure Learning Plan - Compute

    - by BuckWoody
    This is one in a series of posts on a Windows Azure Learning Plan. You can find the main post here. This one deals with the "compute" function of Windows Azure, which includes Configuration Files, the Web Role, the Worker Role, and the VM Role. There is a general programming guide for Windows Azure that you can find here to help with the overall process.   Configuration Files Configuration Files define the environment for a Windows Azure application, similar to an ASP.NET application. This section explains how to work with these. General Introduction and Overview http://blogs.itmentors.com/bill/2009/11/04/configuration-files-and-windows-azure/ Service Definition File Schema http://msdn.microsoft.com/en-us/library/ee758711.aspx Service Configuration File Schema http://msdn.microsoft.com/en-us/library/ee758710.aspx  Windows Azure Web Role The Web Role runs code (such as ASP pages) that require a User Interface. Web Role "Boot Camp" Video  https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032470854&CountryCode=US Web Role Deployment Checklist http://blogs.infragistics.com/blogs/anton_staykov/archive/2010/06/30/windows-azure-web-role-deployment-checklist.aspx  Using a Web Role as a Worker Role for Small Applications http://www.31a2ba2a-b718-11dc-8314-0800200c9a66.com/2010/12/how-to-combine-worker-and-web-role-in.html Windows Azure Worker Role  The Worker Role is used for code that does not require a direct User Interface. Worker Role "Boot Camp" Video https://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=en-US&EventID=1032470871&CountryCode=US Worker Role versus Web Roles http://msdn.microsoft.com/en-us/library/gg433012.aspx Deploying other applications (like Java) in a Windows Azure Worker Role http://blogs.msdn.com/b/mariok/archive/2011/01/05/deploying-java-applications-in-azure.aspx Windows Azure VM Role The Windows Azure VM Role is an Operating System-level mechanism for code deployment. VM Role Overview and Details  http://msdn.microsoft.com/en-us/library/gg465398.aspx  The proper use of the VM Role http://blogs.msdn.com/b/buckwoody/archive/2010/12/28/the-proper-use-of-the-vm-role-in-windows-azure.aspx

    Read the article

  • Linux Journal Best Virtualization Solution Readers' Choice 2012

    - by Chris Kawalek
    I'm proud to report that in the latest issue of Linux Journal their readers named Oracle VM VirtualBox the "Best Virtualization Solution" for 2012. We're excited to receive this honor and want to thank Linux Journal and their readers for recognizing us!  This is the latest award won by Oracle VM VirtualBox, following a 2011 Bossie Award (best open source software) from InfoWorld, a 2012 Readers' Choice award from Virtualization Review, and several others. These awards help us know that people are using Oracle VM VirtualBox in their day to day work and that it's really useful to them. We truly appreciate their (your!) support. If you already use Oracle VM VirtualBox, you will know all this. But, just in case you haven't tried it yet, here's a few reasons you should download it: Free for personal use and open source. You can download it in minutes and start running multiple operating systems on your Windows PC, Mac, Oracle Solaris system, or Linux PC. It's fast and powerful, and easy to install and use. It has in-depth support for client technologies like USB, virtual CD/DVD, virtual display adapters with various flavors of 2D and 3D acceleration, and much more. If you've ever found yourself in a situation where you were concerned about installing a piece of software because it might be too buggy, or wanted to have a dedicated system to test things on, or wanted to run Windows on a Mac or Oracle Solaris on a PC (or hundreds of other combinations!), or didn't want to install your company's VPN software directly on your home system, then you should definitely give Oracle VM VirtualBox a try. Once you install it, you'll find a myriad of other uses, too. Thanks again to the readers of Linux Journal for selecting Oracle VM VirtualBox as the Best Virtualization Solution for 2012. If you'd like to read the whole article, you can purchase this month's issue over at the Linux Journal website. -Chris

    Read the article

  • VMPlayer 9, Xubuntu 12.10, Rails Development - Freezing frequently

    - by douglasisshiny
    I have a new Vizio Ultrabook that came with Windows 7. I develop Rails applications, and it's a pain to do that in windows, so I setup a Xubuntu VM with 1GB ram and 2 CPU cores. I basically keep the VM open all the time and have enough memory not to worry. Sometimes I pause the VM. For the first few days, everything was fine. The fourth day, Xubuntu froze up while running a test (with Guard and RSpec). I didn't think much of it and restarted the VM and went on my way. The freezes started becoming more frequent, though. I don't think they are only when I run a test, but often they are. It'll happen quickly, too. Startup VM, save file, test runs, it freezes, all within 5 minutes. Of note: the VM is using a shared folder from Windows (where the code is). This may be the problem. Any other people experience something like this?

    Read the article

  • Windows 7 – Fun with VHD

    - by guybarrette
    I’m teaching about TFS 2008 next week and I wanted to use TFS in a virtualized environment so I downloaded the TFS + Team Suite VPC image from Microsoft’s Website.  Working with Windows 7, I opened the VM with the built-in Windows Virtual PC.  The VM loads fine but the problems started when I tried to install the VM additions: I simply couldn’t get them to install properly. I then looked at VMware and found that they have a product called VMware Player that can load Virtual PC VMs.  Tried that but VMware Player failed in converting the VHD. I then looked at VirtualBox.  Created a new VM, attached the VHD and bingo!  Worked like a charm.  The only real caveat is that the guest Windows will ask for the OS CDs to install new drivers so you must have either the CD/DVD or the ISO file (sweet!) to proceed. OK, I got it working in VirtualBox but I’m curious why I couldn’t install the additions from Windows 7 Virtual PC onto a Windows Server 2003 VM.  Anyone has a clue? BTW, thanks to Rolly Perreaux who pointed my to his blog where he goes into great details explaining how to use VM images with VirtualBox.  Good stuff! var addthis_pub="guybarrette";

    Read the article

  • How to get nested chain of objects in Linq and MVC2 application?

    - by Anders Svensson
    I am getting all confused about how to solve this problem in Linq. I have a working solution, but the code to do it is way too complicated and circular I think: I have a timesheet application in MVC 2. I want to query the database that has the following tables (simplified): Project Task TimeSegment The relationships are as follows: A project can have many tasks and a task can have many timesegments. I need to be able to query this in different ways. An example is this: A View is a report that will show a list of projects in a table. Each project's tasks will be listed followed by a Sum of the number of hours worked on that task. The timesegment object is what holds the hours. Here's the View: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Report.Master" Inherits="System.Web.Mvc.ViewPage<Tidrapportering.ViewModels.MonthlyReportViewModel>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Månadsrapport </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h1> Månadsrapport</h1> <div style="margin-top: 20px;"> <span style="font-weight: bold">Kund: </span> <%: Model.Customer.CustomerName %> </div> <div style="margin-bottom: 20px"> <span style="font-weight: bold">Period: </span> <%: Model.StartDate %> - <%: Model.EndDate %> </div> <div style="margin-bottom: 20px"> <span style="font-weight: bold">Underlag för: </span> <%: Model.Employee %> </div> <table class="mainTable"> <tr> <th style="width: 25%"> Projekt </th> <th> Specifikation </th> </tr> <% foreach (var project in Model.Projects) { %> <tr> <td style="vertical-align: top; padding-top: 10pt; width: 25%"> <%:project.ProjectName %> </td> <td> <table class="detailsTable"> <tr> <th> Aktivitet </th> <th> Timmar </th> <th> Ex moms </th> </tr> <% foreach (var task in project.CurrentTasks) {%> <tr class="taskrow"> <td class="task" style="width: 40%"> <%: task.TaskName %> </td> <td style="width: 30%"> <%: task.TaskHours.ToString()%> </td> <td style="width: 30%"> <%: String.Format("{0:C}", task.Cost)%> </td> </tr> <% } %> </table> </td> </tr> <% } %> </table> <table class="summaryTable"> <tr> <td style="width: 25%"> </td> <td> <table style="width: 100%"> <tr> <td style="width: 40%"> Totalt: </td> <td style="width: 30%"> <%: Model.TotalHours.ToString() %> </td> <td style="width: 30%"> <%: String.Format("{0:C}", Model.TotalCost)%> </td> </tr> </table> </td> </tr> </table> <div class="price"> <table> <tr> <td>Moms: </td> <td style="padding-left: 15px;"> <%: String.Format("{0:C}", Model.VAT)%> </td> </tr> <tr> <td>Att betala: </td> <td style="padding-left: 15px;"> <%: String.Format("{0:C}", Model.TotalCostAndVAT)%> </td> </tr> </table> </div> </asp:Content> Here's the action method: [HttpPost] public ActionResult MonthlyReports(FormCollection collection) { MonthlyReportViewModel vm = new MonthlyReportViewModel(); vm.StartDate = collection["StartDate"]; vm.EndDate = collection["EndDate"]; int customerId = Int32.Parse(collection["Customers"]); List<TimeSegment> allTimeSegments = GetTimeSegments(customerId, vm.StartDate, vm.EndDate); vm.Projects = GetProjects(allTimeSegments); vm.Employee = "Alla"; vm.Customer = _repository.GetCustomer(customerId); vm.TotalCost = vm.Projects.SelectMany(project => project.CurrentTasks).Sum(task => task.Cost); //Corresponds to above foreach vm.TotalHours = vm.Projects.SelectMany(project => project.CurrentTasks).Sum(task => task.TaskHours); vm.TotalCostAndVAT = vm.TotalCost * 1.25; vm.VAT = vm.TotalCost * 0.25; return View("MonthlyReport", vm); } And the "helper" methods: public List<TimeSegment> GetTimeSegments(int customerId, string startdate, string enddate) { var timeSegments = _repository.TimeSegments .Where(timeSegment => timeSegment.Customer.CustomerId == customerId) .Where(timeSegment => timeSegment.DateObject.Date >= DateTime.Parse(startdate) && timeSegment.DateObject.Date <= DateTime.Parse(enddate)); return timeSegments.ToList(); } public List<Project> GetProjects(List<TimeSegment> timeSegments) { var projectGroups = from timeSegment in timeSegments group timeSegment by timeSegment.Task into g group g by g.Key.Project into pg select new { Project = pg.Key, Tasks = pg.Key.Tasks }; List<Project> projectList = new List<Project>(); foreach (var group in projectGroups) { Project p = group.Project; foreach (var task in p.Tasks) { task.CurrentTimeSegments = timeSegments.Where(ts => ts.TaskId == task.TaskId).ToList(); p.CurrentTasks.Add(task); } projectList.Add(p); } return projectList; } Again, as I mentioned, this works, but of course is really complex and I get confused myself just looking at it even now that I'm coding it. I sense there must be a much easier way to achieve what I want. Basically you can tell from the View what I want to achieve: I want to get a collection of projects. Each project should have it's associated collection of tasks. And each task should have it's associated collection of timesegments for the specified date period. Note that the projects and tasks selected must also only be the projects and tasks that have the timesegments for this period. I don't want all projects and tasks that have no timesegments within this period. It seems the group by Linq query beginning the GetProjects() method sort of achieves this (if extended to have the conditions for date and so on), but I can't return this and pass it to the view, because it is an anonymous object. I also tried creating a specific type in such a query, but couldn't wrap my head around that either... I hope there is something I'm missing and there is some easier way to achieve this, because I need to be able to do several other different queries as well eventually. I also don't really like the way I solved it with the "CurrentTimeSegments" properties and so on. These properties don't really exist on the model objects in the first place, I added them in partial classes to have somewhere to put the filtered results for each part of the nested object chain... Any ideas?

    Read the article

  • Correct way to (re)launch a Java application with hardware-dependent VM parameters?

    - by LowLevelAbstraction
    EDIT I don't want to use Java Web Start I've got a Java application that I'd like to run with different VM parameters depending on the amount of memory the system it is launched on has. For example if the machine has 1 GB of memory or less I'd like to pass "-Xmx200m" and "-Xmx400m" if it has 2 GB and "-Xmx800m" if it has 8 GB (these are just examples). Is there a portable way to do this? I've tried having a first tiny Java app (hence portable) that determines the amount of memory available and then launches a new Java app but I don't think this is very clean. As of now I've written Bash shell scripts that invoke the Java app with the correct parameters depending on the config but it only works on Linux on OS X. What is the correct way to solve this? Would application packager package ;) help ?

    Read the article

  • When compiling programs to run inside a VM, what should march and mtune be set to?

    - by Russ
    With VMs being slave to whatever the host machine is providing, what compiler flags should be provided to gcc? I would normally think that -march=native would be what you would use when compiling for a dedicated box, but the fine detail that -march=native is going to as indicated in this article makes me extremely wary of using it. So... what to set -march and -mtune to inside a VM? For a specific example... My specific case right now is compiling python (and more) in a linux guest inside a KVM-based "cloud" host that I have no real control over the host hardware (aside from 'simple' stuff like CPU GHz m CPU count, and available RAM). Currently, cpuinfo tells me I've got an "AMD Opteron(tm) Processor 6176" but I honestly don't know (yet) if that is reliable and whether the guest can get moved around to different architectures on me to meet the host's infrastructure shuffling needs (sounds hairy/unlikely). All I can really guarantee is my OS, which is a 64-bit linux kernel where uname -m yields x86_64.

    Read the article

  • How to Apache SSL proxy to openerp 7 running in VM?

    - by Johnbritto
    I have installed openerp v7 in an ubuntu 12.04 Virtual machine from launchpad.i.e server, web, addons. I configured SSL reverse proxy on virtual machine and my configuration for virtual host *:443 are ServerName openerp.mydomain.net ServerAdmin openerp@localhost SSLEngine on SSLCertificateFile /etc/ssl/openerp/server.crt SSLCertificateKeyFile /etc/ssl/openerp/server.key ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyVia On ProxyPass / http://172.16.150.14:8069/ ProxyPassReverse / http://172.16.150.14:8069/ RequestHeader set "X-Forwarded-Proto" "https" # Fix IE problem (httpapache proxy dav error 408/409) SetEnv proxy-nokeepalive 1 </VirtualHost> on host, I have configured apache reverse proxy for my subdomain in vhost_ssl.conf as SSLEngine On SSLProxyEngine On ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / https://172.16.150.14/ ProxyPassReverse / https://172.16.150.14/ SetEnv proxy-nokeepalive 1 <Location /> Order allow,deny Allow from all </Location> I have set 172.16.150.14 on netrpc and xmlrcs interfaces in openerp-server.conf. Now, when I access https:// openerp.mydomain.net from Girefox and chrome browser..I get http:// openerp.mydomain.net%2C%20openerp.mydomain.net/?db=testingdb which makes 404. But when i access URL from IE 9, the URL https:// openerp.mydomain.net works ok .. secondly if i change the parameter list_db= false, then the links works as expected.. Kindly let me know what is creating bottleneck with URL redirect to http://openerp.mydomain.net, openerp.myydomain.net/?db=testdb on Firefox and chrome. i am struck here doing troubleshooting with the URL to work.

    Read the article

  • While in CMD shell, copying files from host OS to guest VM locks files (VMware Player/Workstation)

    - by Malcolm
    We're running the latest versions of VMWare Player and Workstation for Windows. The following behavior is identical across both products. Problem: We open a CMD prompt in our guest OS (XP, Vista, Windows 7) and copy files from our host OS using the standard CMD shell copy command: copy z:\C$\testfiles The copy completes successfully, but from that point forward, all the files that were copied to our guest OS are now LOCKED on our host OS. This does not happen if we use Windows Explorer to copy files - it only happens when files are copied via the CMD shell. As mentioned at the start of this question, this behavior is reproducible in both VMWare Player and VMWare Workstation across multiple machines and multiple guest OS's. I've googled for a workaround, but without success. Any ideas appreciated. Malcolm

    Read the article

  • Getting Server 2008 R2 to ignore all traffic from Internet-facing NIC, leaving it to a VM

    - by Wolvenmoon
    I got in to Server 2008 R2 via Dreamspark and would like to start learning on it. I don't have much option but to put it on a system sitting between the Internet and my home LAN due to electricity bills and the fact that 3 computers in an 11x11 space in 102 degree weather is pretty stygian. Currently I use a ClearOS gateway to manage everything, what I'd like to do is take my server 2008 R2 box, which has two NICs, and drop it at the head of my network. I'd want Server 2008 R2 to ignore all traffic on the external facing NIC and pass it to a virtual ClearOS gateway, and to put all its Internet traffic through its other NIC - which will face the rest of my network and be the default gateway for it. The theory is to keep the potentially vulnerable Server 2008 R2 install as tucked behind a Linux box as possible, without sacrificing too much performance. This is a home network that occasionally hosts dedicated game servers and voice chat servers, so most malicious activity is in the form of drive by non-targeted attacks, however, I don't trust Windows Server because I don't know the OS well enough, yet. So, three questions: How do I do this, am I going to be reasonably more secure doing this than if I just let the Server 2008 R2 rig handle all the network traffic and DHCP (not an option), and should I virtualize the Server 2008 R2 rig instead and if so in what? (Core 2 Duo e6600 w/ 5 gigs usable RAM)

    Read the article

  • What used the linux memory? Low cache, low buffer, not a VM

    - by Jason
    First of all, yes, I have read LinuxAteMyRAM, which doesn't explain my situation. # free -tm total used free shared buffers cached Mem: 48149 43948 4200 0 4 75 -/+ buffers/cache: 43868 4280 Swap: 38287 0 38287 Total: 86436 43948 42488 # As shown above, the -/+ buffers/cache: line shows indicates the used memory rate is very high. However, from output of top, I don't see any process used more than 100MB of memory. So, what used the memory? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 28078 root 18 0 327m 92m 10m S 0 0.2 0:25.06 java 31416 root 16 0 250m 28m 20m S 0 0.1 25:54.59 ResourceMonitor 21598 root -98 0 26552 25m 8316 S 0 0.1 80:49.54 had 24580 root 16 0 24152 10m 760 S 0 0.0 1:25.87 rsyncd 4956 root 16 0 62588 10m 3132 S 0 0.0 12:36.54 vxconfigd 26703 root 16 0 139m 7120 2900 S 1 0.0 4359:39 hrmonitor 21873 root 15 0 18764 4684 2152 S 0 0.0 30:07.56 MountAgent 21883 root 15 0 13736 4280 2172 S 0 0.0 25:25.09 SybaseAgent 21878 root 15 0 18548 4172 2000 S 0 0.0 52:33.46 NICAgent 21887 root 15 0 12660 4056 2168 S 0 0.0 25:07.80 SybaseBkAgent 17798 root 25 0 10652 4048 1160 S 0 0.0 0:00.04 vxconfigbackupd This is an x86_64 machine (not a common-brand server) running x84_64 Linux, not a container in a virtual machine. Kernel (uname -a): Linux 2.6.16.60-0.99.1-smp #1 SMP Fri Oct 12 14:24:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux Content of /proc/meminfo: MemTotal: 49304856 kB MemFree: 4066708 kB Buffers: 35688 kB Cached: 132588 kB SwapCached: 0 kB Active: 26536644 kB Inactive: 17296272 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 49304856 kB LowFree: 4066708 kB SwapTotal: 39206624 kB SwapFree: 39206528 kB Dirty: 200 kB Writeback: 0 kB AnonPages: 249592 kB Mapped: 52712 kB Slab: 1049464 kB CommitLimit: 63859052 kB Committed_AS: 659384 kB PageTables: 3412 kB VmallocTotal: 34359738367 kB VmallocUsed: 478420 kB VmallocChunk: 34359259695 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 2048 kB df reports no large consumption of memory from tmpfs filesystems.

    Read the article

  • Having XP VM use my host OSX ssh tunnel to connect to a remote site?

    - by Manachi
    I am using Mac OSX and have Windows XP running on VMWare Fusion. I'm creating an ssh tunnel from OSX to a remote server, and then trying to have Windows XP use that tunnel (I actually use a program called Proxifier on XP to filter my XP MS SQL Server traffic through that tunnel) Note that I can successfully create an ssh tunnel (on port 9333) from the XP putty to the remote host, and have SQL Server Proxify through that tunnel and it all works correctly. However when I try to set up the tunnel in OSX, and have Proxifier in XP point to the OSX tunnel instead of localhost, it doesn't seem to connect. Here is the OSX command i'm using to create the tunnel: ssh -i /my/key -p 9001 -D 9333 -g me@remotehostname Then I set my XP proxifier to point to macosxhostname:9333 (instead of the previous localhost:9333 which worked corrently when using putty) Any suggestions on what I may have missed? My XP firewall is turned off while setting this up.

    Read the article

  • Strange corruption saving from Textpad 5 within Windows 7-64 VirtualBox VM to shared folder with Mac host

    - by joelarson
    I have a fairly new Window-7 64bit install running in Virtual Box on a MacBook Pro. I'm using TextPad 5 within that environment to edit source files that live on a shared folder that is on the Mac Host. When I save some of these source files, the saved file ends up with some amount of the end of the file repeated one or more times. For example, a file that has this at the end: ... return ttp; }; would, once saved, open up with: ... return ttp; }; }; It is definitely a problem with how the file gets written as opposed to how it's read, because I can see this now matter what app I use to open the file with (NotePad & Word in Windows 7, TextWrangler back in the Mac). I've tried saving as ANSI and UTF-8, and with or without the 'Write Unicode and UTF-8 BOM' checked in TextPad preferences. It doesn't happen with all files though I can't see any pattern about which files do or don't have the problem. It doesn't happen with files written to the Windows 7 c:\ drive. And so far it doesn't happen from other applications saving files, only TextPad. Any ideas? My versions: Textpad 5.4.2 Windows 7 Professional 64-bit, fully up to date VirtualBox 4.0.8 r71778 OSX 10.6.7

    Read the article

  • How to share a volume between VM in ESX 4 ?

    - by edomaur
    I want to access a single volume from vmware ESX4 vms, in three ESX hosts with datastores in an Equallogic PS6000 SAN. I know how to manage the datas, but I cannot seems to find a way to do this. How can I share VMDK accross hosts ? (the relevant files are on the SAN) Is this even possible ? Is there a mean to do this with RDM ?

    Read the article

  • VMware Virtualisation - Convert 64bit Windows Server to 32bit VM?

    - by dannymcc
    I have just started playing around with Vmware sphere and have the hypervisor OS installed on a spare HP ProLiant DL360 G4. I have created a test virtual machine running Ubuntu which has worked well. As a test project I wanted to convert a powered on server running Windows Server 2008 64bit into a virtual machine. As soon as I ran the Vmware Go software to start the conversion it became apparent that I cannot run 64bit guest OS's on that particular server. So, is there a way of migrating 64bit to 32bit during the conversion?

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >