Taking a snapshot from the command prompt for Hyper-V 2008 - windows

Background:
I am using Hyper-V on Server 2008 to manage many virtual servers. I have scripts that have been built to make changes or apply updates to some or all of these virtual servers. Using the Hyper-V Manager, I am able to snapshot these virtual servers prior to doing an update, then roll back the changes if there is a problem.
The Question:
What I would like to do is script from a batch file or something similar this whole process of the snapshot on Hyper-V on Microsoft Windows Server 2008. How can you trigger a snapshot from the windows command prompt in Hyper-V?
Thanks in advance for any hep with this.

Here is how to do it with powershell

Related

Hyper-V not working in Windows 2012R2 Datacenter

since yesterday I had my Windows 2012R2 Datacenter server correctly running Hyper-V machines.
After a windows update I'm not able to start any of the VMs and get a message that say Hypervisor not in execution.
If I check from services I don't see the service but from server manager the hyperv role seems to be running.
From windows features list i don't see anymore the Hyper-v (i wanted to uninstall and reinstall it).
Any suggestion?
It is unlikely that Windows updates have deleted any services.
You should still be able to see the Hyper-V Virtual Machine Management service even if it is stopped or running/broken.
If not, I suggest that you re-install the Hyper-V role.

Schedule login to Windows Server 2008 R2 Virtual Box

I have a test script created using TestComplete 10.0. The test script to uninstall then install a software and update config file. It hosted in a Windows 2008 R2 Virtual Box and I have tested using TestExecute and it runs successfully.
I have scheduled the run via Task Scheduler and I have created a bat file to run it. Task starts successfully but fails. I have searched in Google and found TestComplete fails when remote desktop session is disconnected for the user set to execute the task.
I have tried adding the tscon /dest:console but did not successfull.
Is there any other way to login to Windows Server 2008 R2 Virtual Box?
This behavior is documented and the TestComplete Help file contains a number of possible solutions for it. You can find this information in the Running Tests on Locked Computers help topic of the tool.

Silverlight app remote debugging via msvsmon.exe

I have little problem with debugging silverlight app on a remote machine. I launched msvsmon.exe, added permissions, added my account to administrators group. But when I connect, I can't debug silverlight process, it's type is determined as native (please see this screenshot)
On local machine it works perfectly, I can attach to any silverlight process, and I want to do the same thing on a remote machine.
Also on the remote machine is installed XP Service Pack 3 x86, on my machine I have Windows 7 Ultimate x64. I use VS 2010 and it's launched as administrator.
Any help is greatly appreciated. Thank you.
If you are not working within a domain network, look here, http://www.wintellect.com/cs/blogs/jrobbins/archive/2010/06/15/vs-remote-debugging-across-workgroups-or-domains.aspx
This helped me a lot.

How is your Development Environment Set up?

Curious to know how people set up their personal and/or work development environment, in terms of:
Do you just have all of your developer tools (for example Visual Studio, SSMS, etc.) installed on your main operating system;
Do you use Virtual Machines to have a separate "clean" dev environment that consists only of the OS and one compiler you're working with;
Do you have multiple OS's in a multi-boot system;
Do you remote connect to a separate machine with your developer tools installed on there
It all depends on the type of the job i guess. Here is how my setup is:
The main PC. The one on my desk. Has everything on it.
The secondary machine. Runs Vista.
A bunch of "Clean" VMs for testing. Typically 2 machines of each OS we support.
A build machine. VM with no installed product. Just source code and some compilers.
A dedicated "Server" to host the server app and the DB. [Our product is a client-server thingy]
[On top of that, my primary and sec machines have the server and DB running too.]
EDIT: By "clean" i mean that they only have a freshly installed OS on them, nothing else. These are non-persistent and go back to clean state on shutdown.
I am running what I think is a fairly standard Agile C# development environment. Vista SP1, Visual Studio 2008 with Resharper 4.1, SQL Express 2008, Subversion server, command line svn client and Cruise Enterprise (unbelievable product) with 1 server and 1 agent for continuous integration.
I am running on a Dell XPS core 2 duo 2.4Ghz laptop with 4GB of RAM and 1 external 22" widescreen monitor.
I have tried and tried and persisted with VMWare Workstation (mostly but also Virtual PC) but I again and again resort back after tiring with the performance and annoying delays in Visual Studio. And I have tried every performance trick and tweak in the book available to me. It apparently just needs either more hardware than I have or far more patience.
I have also tried running 64bit Ubuntu with VMWare Worstation server running Vista (vlite'ed) and also windows XP (lite), but I found it just as annoying.
If you have similar specs to what I described then I can simply recommend not going down the VM path, unless it is ABSOLUTELY necessary.
I have a VMWare network replication of the main servers in my environment including SQLservers, Web-Servers, a copy of my dev box, and AD Servers. I also use VS on my dev box for simple things that don't need as much testing.
We use Virtual PC's for our development. As well as a VP for our build environment. The reason for this is so that we can switch between different projects without losing time. (for Support)
At our current client, we have an ESX server with virtual machines running on it. We access the virtual machines through Remote Desktop.
For my style in VS 2008, I use VibrantInk by Rob Conery.
We have Reflector and all Sysinternal tools available on all virtual machines.
I'm planning to have ReSharper on every machine also.
Firefox/Firebug combo is installed on every machine.
Web Developer for IE7 is also installed on every machine.
Cheers!
I really enjoyed using a single VM for each IDE I worked with, but that requires a beefy machine. However, my company has taken recently to the idea that the developers can do "just fine" with sub $500 machines. Thus, my current setup is everything on my only machine.
All of my tools are on my local machine. I generally work within the MVC mindset.
VMWare is set up on my machine, but it's only used on rare occasion for things beyond the control of my machine.
My work is primarily done on a windows machine, with Visual Studio.
I have Visual Studio 2005 and 2008 running on my main machine (Vista :p), and everything I can develop here without cluttering the machine, I do. Feels so much more responsive than in a VM. I have a VM for Linux-based development and several VMs for testing purposes. I never tested VMWare's debugging feature (run the debugger on the host and the debuggee on the guest), though I can imagine that that would be a good reason to have Visual Studio on the host, even if you don't care about responsiveness.
I have a number of IDEs and server products running on my main workstation. I also have a remote access laptop that has all the same critical software on it so I can develop locally (and not depend on Citrix and Remote Desktop to work on code fixes outside the office).
My main work system
Linux x64 dual core
Dual monitor
Redhat based OS
Vim, Kdevelop, Eclipse(with Epic, and Subclipse).
My system is similar(arch, and OS) to our servers, which is what I implement code for. Since I work for a small company with many hats, I tend to have a ssh'd mysql connection open in one window, with a vim screen open on the other side. Throughout the day I use SSH, VIM, SVN, firefox, and e-mail daily.
I put all toolchains and other apps needed to build my code into revision control, and write makefiles for all projects such that the version of the tools from the repository is used, not whatever may be in the $PATH. So when I do a label for a release, it includes everything needed to do the build, and depends on build machine setup as little as possible. All I need to do is sync to revision control, and type 'make'. Unfortunately this does require having cygwin installed on Windows, but personally, I consider a Windows machine just about unusable for development without cygwin, regardless of the prerequisites of the build system.
I have simple makefiles to build projects that include platform-specific .mk files. I don't manually create IDE project files. In a couple cases (Rowley Crossworks for embedded ARM development, Visual Studio for self-hosted windows PC development), I auto-generate project files based on my makefiles, as part of the "make debug" target, and then launch the IDE with the generated project. This makes debugging convenient, without requiring parallel maintenance of a IDE-specific project file in addition to my makefile.
I am about to set up a new development environment for a new department.
Build environment (support both Java development and .Net) will be on to separate VMware machines running on the same physical computer. Both images will use 2008 server.
Developer machines will be desktop computers, most likely qith 6 gig ram, big harddrives, 1 or 2 cpu's with dual or quad core, 24" screens * 2, etc., and with 2008 server installed. This to ensure that the developer code is compiled on the OS. Desktops because I want the developers to be able to use VMware to test, etc., without spending to much time complaining about lack of performance with 2 VMwares running at the same time :)
I am trying to figure out the build environment now. Considering Team City, ++. Difficult to find the right one when you want to support multi-platform environment without to much fuss :)
Every developper setup includes a MacBookPro 17" with a 22" lcd screen.
Eclipse is our IDE, and we use VMWare to host our developpement database (oracle) under winXP.
Obviously a lot of your answers are going to depend heavily on what kind of development each person does. Maybe we should be categorizing these? :)
Web Development
I use a VM to run a Linux guest with a development webserver. I use Notepad++ on my host for editing (recent convert from jEdit), and with drive mapping in the VM software (Sun's VirtualBox), my dev webserver guest machine has no problem serving up the ever-changing source files. I also use the Windows XP IE6 VPC image in another VM to test the page in IE6. I use this setup even if I'm not developing a complicated web-app and am simply working on a static HTML page; there are still some quirky differences in behavior between a locally opened file and a served webpage in a number of browsers that make this worthwhile.

Hyper V to Virtual PC

I am currently using Windows Server 2008 Standard and have several Hyper V machines. These are development VM's and I want to now switch back Vista x64 because I am missing Aero.
I know Windows Server 2008 can have aero but the host performance is very very bad when I run VM in Hyper V.
I want to export my Hyper V machines so that I can use it in Virtual PC. Anyone know an easy way?
If you have built them as Hyper-V machines, I don't think you can go back. There are serious differences in the HAL for Virtual PC and Hyper-V. You can move a VPC to Hyper-V permanantly by removing the VPC add-ins ans adding the Hyper-V integration drivers/services and re-detecting the hardware.
A VPC can run in Hyper-V just fine, don't add the machine drivers for Hyper-V and you can go back to VPC with no problem.
VPC to Hyper-V is one way.
Hyper-V is designed to be used on the server, obviously. Whereas VirtualPC is designed for the end user. Hyper-V will give you more control, and the ability to create and restore snapshots. However, it does not have a direct console interface to the VM, you would use a browser to access the console. I would go Hyper-V, but it really depends on what you're using your VMs for. Luckily, they share the same format for virtual disks, so you can try it out with your existing VMs.
You should review Windows 2008 R2 SP1 upgrade with RemoteFX, it comes with a new video driver for VM's that allow 3D, extended desktops and more. It will help resolve some of the issues you are seeing today.
Both the Host server and VM need to be running SP1 of Windows 2008 R2.
http://blogs.technet.com/b/virtualization/archive/2010/03/18/explaining-microsoft-remotefx.aspx

Resources