Working with the "back-end" of I.T. systems. Learn. Apply. Repeat.
The things learned as an IT Pro'fessional turned software tester, researcher, and product manager.
Wednesday, December 17, 2008
You want to convert a machine to a vhd
I am going to cover two items: XenConvert (free, converts running machine), and a Hyper-V feature (part of Hyper-V, converts any mountable disk).
Using Hyper-V:
With Hyper-V you can take a physical disk, attache it to a Hyper-V host and convert the disk (fully intact) to a VHD. A neat feature that no-one talks about.
This is great for a number of scenarios where you have a physical drive, a host, and the machine on the physical drive can be is is offline (we will assume that this is a disaster recovery exercise).
But those are the limitations. Still, a neat feature.
Here's how:
Mount the disk to a Hyper-V host. (SCSI, in an external enclosure, ATA, however)
Be sure that the disk is attached and recognized in Disk manager
Open Hyper-V manager
Select Actions -> New -> Hard Disk..
Step through the wizard to select your type of virtual disk, the location, then stop.
On the Configure Disk page, select the option "Copy the contents of the specific physical disk"
Then complete the wizard.
This then copies the contents of the desired physical disk (not just the files, but the actual blocks, formatting and all) to a VHD.
That is it.
Another option is to
Use XenConvert:
Download the XenConvert tool (You can download it from MyCitrix (@ Citrix.com) where you download XenServer)
Install it within the Operating System that you want to convert (again, physical or VM).
Then begin the conversion process choosing VHD as your output.
You can just convert an existing installation to VHD (it can even route the VHD to a network share using a mapped drive).
the benefit of XenConvert: You machine is running the entire time.
I have converted SQL, Operations Manager, and SCVMM servers to VHDs (yes, they boot and everything) then moved them to either Hyper-V or XenServer.
I hope you get creative with your options.
You can convert physical to virtual, virtual to virtual, etc. No need for expensive conversion tools as long as you have the time and the knowledge.
Tuesday, December 16, 2008
Should I put all my VHDs on one volume?
This might be easy for storage management and for backup management. But you have to consider the ancillary impacts that this might have on the overall environment.
The greatest impact will be the impact that each VM has upon another VM.
This is where we need to h ave a full understanding of all of the components involved in our virtualization infrastructure and how all of those components interact and affect each other.
Here is the statement that began the idea for putting this to blog:
"We were hoping to create a "big" LUN, store all our Hyper-V Guests on that LUN, assign the LUN to several HOSTS, and access the Guests that way."
Now, the response:
That is all fine, good, and noble - but you may want to reconsider.
Even VMware has had the recommendation (for a great number of years now) of no more than 10 VMs per LUN (they consider this a 'rule of thumb' that is taught in class).
Why? Disk IO.
You have to balance the disk IO demands of the VMs stored on the LUNs.
If you have VMs with a bunch of disk IO all happening at the same time they end up impacting each other.
For example - you always split out your SQL databases from the temp log, from the OS - for the same reason.
In this case you have different considerations - VM1 will impact VM2.
An easy test you can do at home:
With many VMs on a single LUN, boot one and wait for Integration Services to report some data from within the VM (Integration Services loads late in the stack so it is a good measure that the VM is nearly done booting).
Be sure to time it.
Now, repeat the test, this time with 4 VMs all at once.
Don't stop timing until all four are up, then get your average time to boot.
All that disk reading and page file building created massive disk IO.
Just something to think about as you plan your infrastructure.
Thursday, December 4, 2008
Dedicating a physical NIC for Management with HyperV
BTW - the Microsoft recommended configuration is a dedicated Host management NIC that is not associated with a virtual switch.
I have pulled this from a real example that I helped some with and have tried to protect the innocent.
My assumptions in this example:
Two NICs – ‘HP NC373i Multifunction Gigabit Server Adapter’ and ‘HP NC373i Multifunction Gigabit Server Adapter #2’
You are not local to the servers
In Network Connections you should see the following Device Names:
- HP NC373i Multifunction Gigabit Server Adapter
- HP NC373i Multifunction Gigabit Server Adapter #2
Microsoft Virtual Network Switch Adapter
An External virtual network exists that is named "InternalEthernetPort" and it is using NIC 1
What we need to do is:
1) make sure that 'HP NC373i Multifunction Gigabit Server Adapter #2' is not bound to a virtual switch
a. In the Hyper-V Virtual Network Manager there should only be one Virtual Network
i. It should be named “InternalEthernetPort”
ii. It should be of type External
iii. It should be bound to physical NIC ‘HP NC373i Multifunction Gigabit Server Adapter’
2) make sure that 'HP NC373i Multifunction Gigabit Server Adapter #2' is enabled and on the foo.bar.com network
a. This should show the Hyper-V host as multi-homed as it would have two NICs on the same network. And may produce an alert. It should have two IP addresses on the foo.bar.com network.
3) Connect to the Hyper-V host on the second NIC - 'HP NC373i Multifunction Gigabit Server Adapter #2'
4) Disable the Hyper-V virtual NIC that is attached to “InternalEthernetPort”.
a. Do this through Network Connections - Control Panel -> Network and Sharing -> Manage Network Connections
b. Find the NIC whose Device Name begins with “Microsoft Virtual Network Switch Adapter”
c. Select -> Right click -> disable
i. I am sure that you can predict what would happen if the order was wrong, or the wrong NIC was selected.
The end result should be:
- VM network traffic is using switch “InternalEthernetPort” which is using physical NIC ‘HP NC373i Multifunction Gigabit Server Adapter’
- Host management network traffic is using physical NIC ‘HP NC373i Multifunction Gigabit Server Adapter #2’
- This should maximize the host management throughput.
Oh, as a side note - Server 2008 R2 with Hyper-V makes this a lot easier and less complicated…
Tuesday, November 18, 2008
The feeling of success-VMware Server 1.0.6 on Ubuntu 8.04 x64
Then, suddenly, it works!
And you feel that you conquered the world.
Okay, I am writing this for myself as I know that I will have to do this again in the future.
The task at hand: Getting VMware Studio to work properly.
My personal opinion about the entire adventure: This application was obviously developed by a person that is hardcore Linux and considers Windows a scourge on the landscape.
I arrived at this opinion after noting in the readme that the OpenSSH engine is not known to work properly for the installation on any operating system other than WinXP.
(at that moment the software tester in me said: "duh" - security enforcement is next to nothing)
Anyway - back to the task at hand.
Installing VMware Server (1.0.6) on Ubuntu 8.04 (64-bit)
First of all - I would like to thank the Ubuntu community for all the documentation. Tons of it. My only problem, it gets really confusing and hard to follow. I ended up with instructions from three sources and even dribbled this down into its most basic steps (fewest possible).
Second, if you need the gory details - please reference the links that I note.
Let us begin:
Download and install Ubuntu.
During the install, enable the OpenSSH server.
Oh, and set a root password (I found it all goes better in the end - as VMware Server wants you to use root anyway)
sudo passwd root
Then go here: https://help.ubuntu.com/community/VMware/Server/AMD64
and do the following (you only need to use sudo if you are not logged in as root):
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential linux-headers-`uname -r` xinetd
sudo apt-get install build-essential linux-headers-`uname -r` xinetd gcc-4.1 g++-4.1
sudo apt-get install ia32-libs libc6-i386
Then download VMware Server and put in under /tmp
tar xvzf VMware-server*.tar.gz
cd vmware-server-distrib
sudo ./vmware-install.pl
Please read the prompts.
There is a build error at one point, do not accept the default no, say 'yes' else you will be stuck and install fails.
Also, I freely declined VM NATting - the default is on. why? I ask.
Now, before installing the Server interface we need to fix something, else the MUI install will fail.
https://help.ubuntu.com/community/VMware/Server
mv /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1-old
Now, we can download the VMware Server MUI and put that under /tmp
tar xvzf VMware-mui*.tar.gz
cd vmware-mui-distrib
sudo ./vmware-install.pl
After install completes the service will not start properly, guess what? Another fix, because the startup script is broken.
http://www.go2linux.org/vmware-server-on-debian-etch
obtain the patch from here: http://users.piuha.net/martti/comp/ubuntu/en/httpd.vmware.diff
and place it under /tmp
cd /
patch -b -p0 < /tmp/httpd.vmware.diff
Then start and query the Management service
sudo /etc/init.d/httpd.vmware start
sudo /etc/init.d/httpd.vmware status
Now, on your desired remote client machine be sure to download the VMware Server Client package and install it.
Only the latest VMware Server 2 has a built in web management console.
(and its installation is supposedly far less painful)
Wednesday, October 15, 2008
Virtual Machine Interoperability with Hyper-V and XenServer using OVF
For the past few months I have been involved with a virtual machine interoperability project called: "Project Kensho"
Project Kensho uses virtualization interoperability standards that are currently being developed by the DMTF (Distributed Management Task Force - the people who are bringing us lots of things such as CIM and DMI) to provide a framework for all of the virtualization vendors to use to talk the same language.
You can check the whole thing out here:
http://community.citrix.com/display/xs/Kensho
And..you won't see a bunch of screen shots, because I already did those (they are at the link above)
What does this mean to the administrator that is in the grind all day long?
You can take a VM and move it from one virtualization host to another.
You can export an entire enterprise application environment (some complex application that needs SQL, IIS, Active Directory - and those components must run on individual machines).
You can import items like these from other sources.
Here are some real world examples of what I use this for today:
Exporting a complex or large test environment.
I have an environment of 30 client virtual machines. I can export that to a package, sit on it, rebuild my hypervisor, import it back. I can also import those virtual machines to either XenServer or Hyper-V.
I also have an environment of 4 servers (the virtual disks are 36 Gb each) - but I can export and store and then import and use.
It actually ends up making my life a bit easier.
Go ahead, check it out.