Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Saturday, July 5, 2008

Share VMWare Image between Dual-Boot Operating Systems


How to Share a VMWare Image Between Windows XP and Ubuntu 8.04


Sharing a VMWare Image in a dual-boot setup involves the following prerequisites:

- One ntfs partition with Windows XP Professional installed
- One ext3 partition with Ubuntu 8.04 installed
- One fat32 partition
- At least 1GB of RAM
- VMPlayer installed in Windows XP and Ubuntu 8.04
- VMImages stored on the fat32 partition


Stored on the fat32 partition is one Windows XP Home VMImage. I don't have VMWare Workstation. So you may be wondering how I was able to create my own Windows XP Home image. I'll get to that later.

I first boot into the Windows XP Home installation using the Windows XP Pro host. I moved some files around, made some changes to some files. Then shutdown the VMImage. I reboot the computer into Ubuntu 8.04, started VMPlayer, and boot into the very same Windows XP Home image I was just working with on the XP host. My changes were all there!

Windows XP VMPlayer on Ubuntu select copied

When I first started up the VMImage in Ubuntu, the system asked me if I moved or copied the VMImage. Well, I didn't move it, but I didn't copy it either. Since I wasn't sure what option to pick, I selected the "copied" option recommended by VMPlayer if you don't know whether or not you moved or copied the image. This will happen again when I switch back to the Windows host. So far, selecting "copied" has not negatively affected performance.

The first time booting the image in the new host, networking didn't immediately work. Wait a few minutes and it may fix itself. You can also go into VMWare tools, if it's installed, and make sure your Ethernet card is enabled. So far, I've had no issues with networking.

I'm very impressed with VMPlayer! I can run Windows XP in a VMimage in both Windows and Linux. It's stable, fast, and allows me to work on Windows projects on both Ubuntu and Windows hosts.

Boot Windows XP in Ubuntu using VMPlayer


Using Microsoft Virtual PC to Create Image and Convert with VMWare Converter



Previously, I was using Microsoft Virtual PC 2007, which wasn't cross-compatible with Linux. To answer the above unanswered question of how I created a Windows XP Home VMWare image without VMWare Workstation, I used VMWare Comverter to convert my Windows XP Home Virtual PC image to VMWare. In Virtual PC, it took a long time to boot up. Once booted, response was slow and unusable. I quit using the Virtual PC image long ago because it was simply too slow.

In VMPlayer, I feel that the Guest operating system runs smoother than the Windows XP host itself! I'd recommend this setup for anyone who wants to run Windows from Linux and Windows from Windows. Additionally, although Virtual PC is slow, it's a great tool to allow you to create a Virtual image and then convert it to VMWare using the VMWare Converter.

UPDATE: I've been using this setup for over a month and I'm still happy with it!

Wednesday, March 5, 2008

500 Gigabytes of Relief

Backup Humor



I just bought a Seagate OneTouch 4 Maxtor 500GB external hard drive. The hard drive is marketed for backup purposes and comes with the backup software installed on the hard drive. Below is a note included in the instructions for step 2:

Note: It is highly recommended that you copy the current contents of the OneTouch 4 to your computer before proceeding. Reference Seagate Knowledge Base article 4169 for more information.

It doesn't inspire confidence to know that I have to backup the software on the backup drive in case something goes horribly wrong. If the unthinkable does happen, the backup software is the least of my worries. I'm not too concerned. The really important things will be backed up on a CD or a DVD.


Solution to my Software Backup Problems



Having this hard drive will solve a big problem that I have. Lack of space. With two Linux installations, Windows XP, and several Virtual PC images, my 160GB internal hard drive has reached capacity.

This has led to many other problems that all stem from lack of space. I want to try more distributions of Linux, but I have so much data spread out on different partitions that I was afraid I might lose something important if I tried to install the latest version of Ubuntu or SUSE. Now I am free to proceed with an upgrade.

I also wanted to be able to convert my Virtual PC images to VMWare as part of the Microsoft Quit Date. This has not been going as well as I've planned, but it hasn't been going bad.

I am using the Mozilla Thunderbird Extension Lightning for my Calendar application; however, I'm still using MS Outlook for email. If I can get a solid Linux distribution running then this will help reduce my dependence. At the moment, Pandora is the only music that I have in Linux. I had MP3 support briefly, but for some reason G-Streamer is complaining about missing something.

Don't get me wrong, I like troubleshooting broken software, but not my music player. I just want that to work. I don't care why it broke, or why Novell didn't include it by default, after fixing it once and having it break, I am at a point where I just want to hear music without having to read a bunch of knowledge base articles.

However, overlooking media player issues, there are a ton of advantages to using Linux. As a programmer, it is 10 times easier to get things done. Web programming isn't the same when loading a local file in the browser. You're not using http when you do this, you're using the file protocol. AJAX, as well as other techniques, behave completely different under this scheme. To get an accurate idea of what a JavaScript library or technique will do when served on a web server, you need a development platform that mirrors this environment. In Linux, I can configure Apache, PHP, even Java's Tomcat servlet container, in under 30 minutes. In Windows, I'm not as confident.

I can also use tools like grep, vi, and locate in Linux. In Windows, I am lost without these. The cute puppy that appears in Windows Search is cool and all, but I don't have all day to search for a string in a file in the file system, I just want results. Grep gives almost instant results. Sure, there's no puppy, as my 7 year old nephew would say, but it's fast.

Little by little, I have been moving data to the hard drive. In the next couple weeks, I hope to have SUSE 10.3 installed on a partition. I might also install Ubuntu. We'll see what happens.

Oh, and in case something happens to the hard drive, don't worry! I've backed up the backup software on my computer. Now you can sleep at night.

UPDATE (7/5/2008): I installed Ubuntu 8.04 last month and love it! I also share a VMWare Image with Windows using VMPlayer on Ubuntu, which is a great alternative and enhancement to dual-boot setups.

Thursday, November 1, 2007

Rebooting Linux

Rebooting Linux. These are two words that are seldom said in the same sentence. Its something that most Linux users just never think about; but recently, rebooting Linux was the topic of conversation between myself, and a coworker with a Windows background.

"Why are we using Linux as a server?", she asked. This is a very good question that is likely to evoke a myriad of different responses.

"I think that Linux is used because of it's modular nature. Updates, configuration changes, and other maintenance can be done to the server without needing to reboot it.", I stated. Restart or reboot the computer

"Well, when does it need to be rebooted?", asked my coworker. Wow! I never really thought about it like that before. When does it need to be rebooted? Of course, I knew from experience that Linux could run for months without requiring a restart ever since Professor James Caldwell of the University of Wyoming stated that his office computer reported over 100 days of uptime since the last reboot. But I never really thought about why Linux would require a reboot.

With Windows, it's fairly obvious. Rebooting a Windows box is done in all of the following situations, yet none of these situations require a Linux reboot:

1 - When updating or patching the operating system.
2 - When installing new software of any kind.
3 - When it locks up or slows down.
4 - As the first step in any troubleshooting procedure.
5 - As a secondary, tertiary, intermediary, or final step in any troubleshooting procedure.
6 - Automatically, when you're not looking.
7 - As a troubleshooting step.
8 - When an application conflicts with the system.
9 - As a troubleshooting step.
10 - As a trou...

Anyway, I've had the opportunity to install some software on the servers at work, and not once have I had to reboot the server. Not once has the server locked up, acted sluggish, or thrown the blue screen of death. I've heard our IT department speak of worms on Windows Servers, but laughter ensues when someone asks what kind of virus software is installed on the Linux servers.

The conversation between my coworker and I continued: "When do we need to reboot a server?", she asked.Restart or reboot computer

"That's a good question. I'm not sure. I don't think it matters. But you've made me curious... Let's see how long it's been since svrXX was rebooted...". So at the SSH terminal, I type 'uptime' at the prompt, "162 days!", I exclaim.

"It has to be rebooted in 162 days?", she asks. Having primarily a Windows background, the concept of not having to reboot is a bit perplexing to her.

"No, that is how long it has been since it was last rebooted!", I explain. I try running 'uptime' on another server, "Check out this one, 315 days! This server was last rebooted almost a year ago! Now, there's no uptime command for Windows --", probably because hours are easier to remember than months, "but if you could type uptime at the prompt it would probably tell you that it had been running for only a few days."

"Oh! Can I try uptime?", she asks.

Another coworker overhears our conversation, "Actually,", he begins, "there is indeed a command you can use to view statistics from the DOS prompt. Type 'net statistics server'."

Upon discovering this information, my curious coworker types the command in her DOS window. "My computer has been running for eight(8) hours!", she said. "I just turned it on this morning."

I looked at my screen. "Mine shows a whopping six(6) days!", and it definitely showed. The PC was running slow. Clicking on an icon resulted in a delayed reaction, kind of like in cartoons where the character gets his foot stepped on and it takes a few minutes for the signal to reach his brain. There were 46 Firefox tabs open, 2 VMWare images running, a few Notepad windows, collaboration software, a database manager, a couple folders, and several Putty windows along with a mess of other open programs.

Like an old muscle car, I was pushing this thing to it's limit and it was still driving forward. It was definitely being taxed, so no wonder I have problems with my computers, but I wonder if I would have the same problems with Ubuntu or SUSE installed on my workstation PC? With SUSE or Ubuntu, I could "rip the process out of the wall" using 'kill -9', as another co-worker would say; but with Windows, eventually you come to a point where you have to just kill the motor and restart.

But why risk any downtime if you don't need to?


P.S. In all fairness to Windows, I did take note of the fact that Ubuntu 6.0.6 did require a restart after some updates. I was unpleasantly surprised by this and am not quite sure what to make of it. Of course, I think Ubuntu was designed more for home desktop users rather than for use as a server. More research will be needed in order to determine if Ubuntu Server suffers from this same requirement.

Saturday, October 27, 2007

Using VMWare as a Cross-Platform Virtualization Platform

As part of my Microsoft Windows XP Quit Date strategy, I have been looking into using VMWare as a replacement technology for my Microsoft Virtual PC images.

I started using Virtual PC as a replacement for my dual-boot setup. I still have a dual-boot (actually a tri-boot setup), but I rarely, if ever, use it. The problem is that everything that I do need is on my Windows XP, NTFS-formatted, C: drive. NTFS-formatted drives are not writable from Linux, so when I boot into SUSE or Ubuntu, I feel like I can't update the files that I need to update or use software that I need to use.

As a result, I set up a SUSE 10.1 Virtual PC image. I don't use the GUI. Although GNOME looks awesome when I boot directly into SUSE or Ubuntu instead of Windows, the GUI is somewhat restrictive in Virtual PC. Instead of 1280x1024 screen resolutions, I'm limited to 1024x768.

Since starting my new job back in February, I've become extremely comfortable working from a Linux command prompt. In fact, I'm so comfortable at the command prompt that I feel lost when I try to do something using the GUI. Come to think of it, I don't even think we have the GUIs installed on our servers at work!

The main advantage that this gives me is a powerful development environment. I run Apache on the Virtual PC image, and I use this configuration to locally host development environments for websites that I am working on.


The NavCalendar Application



For example, I'm working on a Calendar application for Edúcate Ya. I'm building it in PHP. I chose PHP because their website is already built using PHP, and by using this technology I can get this application to market quicker than I would using some other technology. I host the development environment at http://dev.educateya.org locally on my Virtual PC image, and I created an entry in my Windows host file that maps the local IP address of the Virtual PC image to that host name. (The host file is located at C:\WINDOWS\system32\drivers\etc, and if this is the first time opening the file, one entry will be present by default. The default entry maps the host name "localhost" to the loop back IP address 127.0.0.1).

I configured Apache using Virtual Hosting. I created a configuration file mapping the IP address of the VMImage and port 80 to the hostname dev.educateya.org. After restarting Apache in Linux, and flushing the Windows DNS cache by running "ifconfig /flushdns", I was able to view the development version of the website on my local network.

In addition, this configuration gives me the ability to view the website on any computer on my network as long as the host file is mapped with the IP address and host name. This means the Virtual PC image could run on a server instead of my local PC, which would free up some memory used by the Virtual PC image!


Migrating to another Operating System



I've strayed from my point. I have, however, provided some insight into how I use virtualization technology and why it would interfere with my productivity should I lose the ability to boot my SUSE image. Virtual PC only runs on Windows. It can run many operating systems. I've successfully run Windows 3.1, Windows XP Home, Windows XP Pro, Windows Server 2003, Ubuntu 6.0.6, SUSE 10.1, several Knoppix versions, and FreeDOS. Currently, I only depend on the SUSE image although I have used the other operating systems as test platforms on several occasions.

As I mentioned, Virtual PC can run several operating systems, but it can only run on Windows 2000, XP, and Vista. Since I want to move toward software that runs on multiple platforms, I've been looking at VMWare. I use VMWare Player at work to run a Linux environment on a Windows XP machine in much the same manner as I do at home, and it works great! One of my coworkers also ran a Linux VMWare image on his Ubuntu desktop. Therefore, I know firsthand that it's cross-compatible with both Windows and Linux, and I know how the software works.

But what I recently discovered this-morning was something that is quite common in many open source software packages. VMWare offers users the ability to convert Virtual PC images to VMWare images! This is awesome! I don't have to go through the time-consuming process of reinstalling SUSE 10.1 on a VMImage and configuring it the way I want! Using the VMWare Converter, Virtual PC users can convert an image to VMware format!

After getting more hard drive space, this will be the next step in preparing to quit using Microsoft Windows XP.

Running dual-boot setups concurrently



While writing this piece, I stumbled upon an article that describes how to Run an Existing Windows Installation on Ubuntu with VMware Player. The author does not describe why these steps work, but he does outline the steps required to configure VMWare Player and the Windows installation. Personally, I wouldn't try these steps on a production machine, as having a third-party tool control Windows is not supported by Microsoft. Of course, neither are dual-boot setups, but I've never had an issue with dual-boot setups. Also, with a dual-boot setup, the operating system is not controlled by a third-party process. However, by following these instructions, you'll be allowing a third-party tool to control the environment that Windows runs in.

The bottom line is that VMWare Player can run a non-virtual installation of Windows, according to the article. I'm not going to try this myself as I don't have a spare PC available, but if anyone has tried this I would love to hear your experiences!

In summary, I've included a list of cross-compatible open source software that I currently use:


Soon, I'll add VMWare to the list.

UPDATE - 7/5/2008: I have configured VMware Player on Ubuntu 8.04 to share a Windows XP VMWare image with Windows XP Pro as an enhancement to a dual-boot setup. Read more about it! It's easy to setup and configure, and you'll be glad you did!

Friday, October 5, 2007

Gedit and Open Source Text Editors

I found this article on the GNOME default text editor, Gedit to be quite interesting. I was impressed by the functionality that it provided when I used it in both SUSE and Ubuntu while I was working on a Firefox Extension.

The editor is actually more powerful than I gave it credit for. Micah Carrick, the author of the article, uses the editor as an Integrated Development Environment! Apparently, there are plugins that come with Gedit by default that allow you to customize and extend the functionality of the editor. In just a few short steps, you can import a file tree, connect to an FTP site, or instantly insert XHTML, CSS, PHP, and other code simply by clicking on items in a tag list!

Is tab completion something that you find helpful or perhaps necessary? There is a plug in for that as well. Apparently, there is also an embedded terminal that supports ssh connections. Although I'm happy with Putty in Windows or the default terminal in Linux, this could be useful if you prefer to integrate your tools into one application.


Vi



Although Gedit is open source, I'm disappointed that it isn't available for Windows. One thing that really makes an application stand out is cross-platform compatibility. I'm not just a proponent for open source software; I'm a supporter of open source software that runs on multiple platforms because it promotes freedom of choice. This cross-compatibility is part of my Microsoft Quit Date strategy.

In terms of text editors, I prefer Vi. Not only does it come standard with every single Linux distribution out there, but also it's available for Windows! I use it both at work and at home, and it makes editing code much easier when I'm away from a Linux terminal. The most beautiful thing about Vi is that if I'm sitting in front of an open Linux terminal, I can edit any text file, anywhere I want. If I'm editing a file located on a computer in India, I can do so. While the terminal does respond a little slower, quickly editing a file would be difficult using an Integrated Development Environment.

The main problem with using an IDE is that you have to configure it. It doesn't work right out of the box. While tools like Vi have a very steep learning curve, I can move from one computer to another and pick up working right where I left off with nothing more than a Linux terminal and a VPN connection.

Of course, the main thing I like about Vi is that I can do so many things without ever having to take my hands away from the keyboard.

Although I like Gedit, the fact remains that it's not available in Windows. Since declaring my quit date, I haven't started using any new cross-platform tools. However, I realize that in terms of text-editors, I've already started this process by using Vi.

Tuesday, October 2, 2007

The Microsoft Quit Date

I think I need to set a quit date. I've been talking about doing it for some time now. Eventually, the time for talk will be over, and it will be time for action.

As I previously mentioned, I may be in the market for another computer in the near future. This could happen anytime between now and 2009. I want to set up a server. That may involve setting up a Linux box. It could involve using this PC as the server, which means I'll put Linux on this PC and who knows what on the new computer.

I currently use Windows XP Professional. Overall, I don't mind using Windows XP. First, I'm familiar with it, so my opinion of it is somewhat biased. Second, I recall how often Windows Millennium would crash, and I realize that in comparison, Windows XP is far superior.

What concerns me is DRM. It's a joke. I've read the articles and the arguments and how there is one group of people who use "freedom" as their argument against DRM, and I've read arguments from those who use the word "ownership" in their arguments in support of DRM.

I agree with the point that those who make investments in a creative work with their time, energy, sweat, blood, and tears should be able to receive compensation for their efforts. However, Microsoft doesn't care about that. They may claim they do, but that's just marketing. The reason for "caring" so much is for consumer lock in. Microsoft is not performing a selfless act when they implement encryption algorithms that force us to use Windows Media Player. I can see right through that. DRM is merely a smoke screen -- a cover -- for a technical monopoly.

There are other ways to ensure consumer freedoms while also ensuring that consumers are free to use whatever media they choose. Microsoft hires some of the smartest people in the world. Why didn't they invent a method for ensuring that encrypted music could be played on a variety of platforms?

I'll save the details of what they could have done for a later post, for now, let's stick to the topic: The Quit Date.

Eventually, Microsoft will stop supporting Windows XP. At this time, I will have two choices. (1) Upgrade to Windows Vista, or (2) upgrade to a Linux distribution. Both choices will involve learning a new operating system, both will involve dealing with issues of backward compatibility, and both will involve some form of trade-off.

I think the best thing to do to prepare for a Microsoft Windows XP quit date is to migrate to software that will run on all three operating systems. This will ensure that, when the time comes to make the decision, I will be able to make a decision that won't be based on the difficulty of switching from one operating system to another. I'll have the freedom to choose Linux, stick with XP, or if I happen to go temporarily insane -- I can choose Vista! Of course, I've heard a lot of positive remarks about the Mac book Pro, so I just might go that direction as well.

Below are just some of the things we can do to prepare for the time when this decision must be made:

- Use Firefox

Firefox is compatible with Linux, Windows, and the Mac. So any tools I've become comfortable with will be available no matter what operating system I use.

- Use OpenOffice

OpenOffice is not as good as the newest version of Microsoft Office 2007, but there is a trade off. Using MS Office, you effectively lock yourself in to their technology. If you can get by using OpenOffice, I would highly recommend it, as it works on Macs, Windows machines, and Linux.

- Use Mozilla Thunderbird

Currently, I still use Microsoft Outlook. Why? Because I used it in college with the Microsoft Exchange server that their IT department installed. I was "locked-in". Unlocking myself will involve moving all data in Outlook to another client. But with
some advance notice, I think I can move this data to Thunderbird by my quit date. Why use Thunderbird, you ask? Same reason I'm using Firefox. Cross-platform compatibility!

I could keep adding items to the list, but I'm not. Instead of being exhaustive, I'll reduce the list to two items that summarize simplifying the migration process:

- Use software that is compatible with multiple operating systems.
- Buy hardware that works on both Linux and Windows

With a desktop PC, I think this is an easier feat. I've never had problems with Ethernet and Linux; however, I have never been able to connect to my network through a wireless network card using Linux. I haven't tried in about 8 months so perhaps this isn't a problem anymore, but I'm sure there are other types of hardware the Linux community has not yet been able to reverse-engineer in order to develop a driver.

I'm thinking I'll give myself six months to switch everything over and become less dependent on my current operating system. So, by the first day of Spring, I'll be able to make my decision.
Google