Showing posts with label Microsoft Virtual PC 2007. Show all posts
Showing posts with label Microsoft Virtual PC 2007. Show all posts

Sunday, 4 January 2009

Setting up Ubuntu on VMWare Server as Web dev env

This morning got up about 8.50am, so just had time for breakfast, then had to go to church.

After church I went on Animal for a bit, but Ben had a mardy because Mac was going on his PC so Ben wanted to go on the Wii, so I let Ben use the Wii. I had got a bit of a headache so I just lay on the sofa bed and floor for a few minutes until Jin the Pinner thyme.

After dinner I went on my comp and tried a few more times to get Ubuntu (installed on a Microsoft Virtual PC 2007 virtual machine) to work at a decent resolution, but still couldn't do it. I gave up and downloaded VMWare Server 2.

After installing VMWare Server 2, I started it up, it opened Firefox but had an error about an invalid security certificate. So I googled about this, and found a troubleshooting page on the VMWare website, that says to add an exception. But there wasn't an option to add exception, just an okay button on the alert box to tick.

So next I tried it in Opera. This time it just said it couldn't find the page. I looked at the VMWare troubleshooting page again, and changed the url it was trying to connect to to 127.0.0.1 (local loopback address) instead of my PC's name. That got me into the VMWare Server.

The first problem I had was that it wanted a username and password to login, but it hadn't given me a choice of setting any when installing. I read some of the VMWare Server User's Guide about how to set up a machine, install an OS etc and found it was just my username and password for the host OS.

Next I tried setting up a virtual machine. I wanted to use an ISO file for the CD drive, but when I went to locate the ISO file it wouldn't let me browse my computer, and just had a datastore called 'standard'. What I had to do was exit the create a new VM procedure, then on the right hand side of the screen in the 'Commands' box, I needed to 'Add Datastore', then select the directory where the Ubuntu ISO was saved. After that I could create a new Virtual Machine and choose the ISO file from the new datastore I'd just created.

While VMWare Server 2.0 can handle 64 bit OSes (unlike Microsoft Virtual PC 2007 it seems), I decided to just install the 32 bit of Ubuntu as I figured it might have more compatible programs than the x64 version.

When my virtual machine was set up, I booted it up, but nothing happened (other than the machine showing as being switched on in the browser). I read the user guide a bit more, then tried it in IE7. It needed to install a plugin, but then it worked and loaded up the Virtual Machine okay. First thing I tried after it had loaded the live version of Ubuntu, was to change the resolution. There was a large choice of resolution options, I chose the same one that I currently have Vista (the host OS) set at (1280x960) and it worked fine. I guess I should have just installed VMWare Server yesterday and saved myself all the trouble trying to mess around getting it to display at a decent resolution in Microsoft Virtual PC 2007.

I had set the networking option on the Virtual Machine to bridged, which should make the machine appear on the network. When I was using VMWare before (Workstation/player I think) bridged networking didn't allow me to connect to the internet (from Win XP anyway), but I tried the internet and it worked. I installed Ubuntu, and then had to install the updates, which takes quite a while.

While Ubuntu was updating itself and I was installing some other programs I checked Luminous Landscape, Moose News Blog and Andy Rouse's blog.

The other programs I installed were:
  • Konqueror (sudo apt-get install konqueror)
  • Java 6 JDK (sudo apt-get install sun-java6-jdk)
  • Netbeans 6.5 IDE PHP (download from http://www.netbeans.org/downloads/, then right click on file and on permissions tick execute, then okay and open the file.)
  • Apache2, PHP5, MySQL (sudo aptitude install apache2 php5 php5-gd mysql-server php5-mysql)


I was following the Netbeans guide to Installing and configuring PHP, Apache, and MySQL for PHP development in Ubuntu. As soon as I finished installing those programs, I checked http://127.0.0.1 in Ubuntu, and it came up with a message saying 'It works!'. So that was good. The next thing I needed to check was that it would be accessible from my host machine, as there's not much point going to the hassle of developing my site in Ubuntu on a virtual machine if I can't test how the site's working in Internet Explorer.

So I got the IP address of the virtual machine by ifconfig in the terminal. I typed the IP in from my host machine, and got the same 'It works!' message, so looking good. What I would like to do is get a web development environment setup in Ubuntu the same as my web server, then this should make developing my site easier, since it should work the same in my local environment as it does on the webserver.

After tea I played on Animal for a bit, and caught a string fish. I also made another good snowman, and caught 2 Football fishes in a row.

After that I installed VMWare tools to the Ubuntu guest OS, then when that was installed I added a drawer to my taskbar and put Konqueror and a fish inside it:


I checked ebay for Lowepro bags, but couldn't see any at a decent price that would hold the 450d + 100mm/2.8 macro or MP-E 65mm/2.8 macro + MT-24EX attached, ready to take out and shoot. I installed Vista SP1, but haven't checked if it's broken anything yet. Ben and Mac went to bed a while ago, so I think I'll go to bed now and see what Vista SP1's broken tomorrow.

Food
Breakfast: Grapefruit marmalade toast sandwich; cup o' tea.
Dinner: Ham quiche; half a sausage; potatoes; peas; butter. Pudding was: flapjack; dried tropical fruit pieces. Coffee; Belgian milk chocolate.
Tea: Beef Pastrami with mustard sandwich; apple; slice of victoria sponge cake with jam; small bag of milk chocolate buttons; cup o' tea.

Saturday, 20 December 2008

Troubles with Microsoft Virtual PC 2007

This morning I checked my email and then had a quick play around with the Raphael javascript library to create a div with rounded corners. It can also do gradients as well, and apparently works on Safari, FF, IE6 and IE7. I got it to make a rounded corners box underneath some text in a div on FF3. I haven't tried it on any other browsers yet. I had to change to js so it appends the graphic to an element rather than just document.body (only 2 lines that need changing, pretty simple).

The main problem I found with it was that you can't (as far as I can see) set % height and width, but only px values. So if I have a div set to 50% pagewidth, I can make the Raphael curved corners box fit the div by setting it's height and width to the offsetHeight and offsetWidth of the div. But then if the page is resized, the Raphael curved corners box will stay the same size. You could add an onresize handler to resize the Raphael box, but if you could set % values it would be much better. Whether % values are a restriction of the underlying vector graphics engines or of Raphael I don't know. I will have to look into Raphael more, but really should finish off work on milkcapmania first.

Then I went on Animal for quite a while and caught a Tuna! After that I went on HMV.com to see if I could spend my hmv vouchers that I received from pigsback.com today. Unfortunately it didn't seem that I could redeem them online, just e-gift vouchers that have lots of spaces for entering lots of characters and discount code, which didn't work when I entered the voucher number.

The vouchers are also redeemable at Waterstones and lots of other places. There's a Waterstones in town, so maybe I can spend them there in the January sales.

After that I tried installing Ubuntu on Microsoft Virtual PC 2007 as I wanted to have Konqueror available for testing web stuff like Raphael on. Unfortunately it gave an error saying that the PC wasn't x64 but i386, and to use the i386 version of Ubuntu. I tried downloading the latest version of Microsoft Virtual PC 2007 for 64bit OSes, but still the same problem. So I did some googling and found a guide to installing Ubuntu on Microsoft Virtual PC 2007, which recommended to install the Service Pack 1 version of Microsoft Virtual PC 2007. So I did that, but it just unintalled my current version. I installed it again and it installed.

I tried to install Ubuntu on it again, but still the same error. Unfortunately there doesn't seem to be any option on Microsoft Virtual PC 2007 that lets you set the processor, so I had to download Ubuntu again, but the i386 version. Then Ben, Clare and Mac came back from down town, and we had lunch about 1.15pm.

After lunch Ubuntu had finished downloading (I used the torrent, which downloads very fast). But instead of installing that, I first tried installing OSX86. Unfortunately that didn't work, and gave an error about the processor or sumat. So I did some googling and read something about installing the Virtual Machine Additions. I tried that a few times, but never got anywhere. I think that actually the Virtual Machine Additions are only to be installed from Windows or DOS environments, when you've already installed the OS.

I tried installing OSX86 again and this time got an error about 'com.apple.Boot.plist', I did some googling and read this: com.apple.Boot.plist not found errors fixed by Chameleon, ppf patches also available for Kalyway 10.5.2 & Leo4Allv3. The CD image I've got is iATKOS_5i Leopard 10.5.5, so I tried a patch meant for iATKOS 2.0i, since there didn't seem to be one for 5i. Unfortunately I still got the same error.

So I tried following this guide over at the OSx86 forums: Retail DVD Guide, 10.5.5, PC-EFIv8 or Chameleon, EFI studio, Vanilla or Modbin 9.4, GA-P35-DS3P (L,R), DS4, or OS X Compatible board, Sept 25th v4.3 Guide w/ latest kexts, Vanilla or modbin, Chameleon. But didn't get anywhere with that either. It seems from the guide that you need 2 drives/partitions to do the install, I'm not even sure if you can set up a virtual PC to have more than one drive. Would be a bit pointless to have 2 drives in a virtual PC anyway. So I'll leave this for another time.

After that I got Ubuntu installed on a virtual machine, was pretty easy. But the internet didn't work. I tried setting 'Local only' instead of 'Shared Networking (NAT)', and restarting it, but it still didn't work. I did some googling, but all the info just said to set the network adapter in the Microsoft Virtual PC 2007 settings to whatever adapter you use to connect to the internet on your host PC, and then in Ubuntu selected 'Wired' under the connections. My PC connects wirelessly to the internet, and the wireless adapter isn't listed in the network adpater options in the Microsoft Virtual PC 2007 settings.

Shared Networking (NAT) works for my IE6 and IE8 virtual machines, so I thought I'd try logging into the IE6Tester machine to see if there were some connection settings in there that I needed to copy across to the Ubuntu installation to make that work. But the IE6 virtual machine couldn't connect to the internet either. It normally works okay, so I shut it down and started it up again, and the internet still didn't work.

It gave me an error about 'Duplicate Name Exists'. I did some googling, and it said this is a problem if 2 PCs exist on the same network with the same name. So I tried changing the name of the PC (The IE6 virtual machine, not my real PC) and also tried changing the Workgroup, but it just kept saying that the name already exists, whatever I typed in.

I tried using the 'Network ID' wizard, which required a restart when it finished. When the PC restarted the same error popped up, and it also needed me to enter a password to login. I had no idea what the password is, as it's a IE6 Testing environment VHD provided by Microsoft. I expect they do say what the password is on their download page, but it's never asked me for a password before. So I just shut it down and then started it up again. I still got the same error and login screen.

So I gave up and tried shutting down and then switching on again my real PC. When it loaded up again, I started Microsoft Virtual PC 2007 and loaded the IE6 virtual machine. I googled for IETester password and one of the results said it was 'P2ssw0rd', so I put that in and it logged in okay. Hooray! The internet worked. So I started up the Ubuntu virtual machine, and the internet worked on that as well.

Now I'd got the internet working on Ubuntu I wanted to download Konqueror since Ubuntu comes with Firefox, which I can already test pages on in Vista. So I googled 'Ubuntu Konqueror' and found this thread on the Ubuntu forums: Konqueror on Ubuntu? Particularly helpful is the last post there, which says to type
sudo aptitude update && sudo aptitude install konqueror
So I opened terminal, pasted that (shift-ctrl-v) and pressed enter. It wanted to know my password, but when I typed nothing was being entered. After a few tries it worked - although it doesn't show what you're typing (presumably for privacy/security reasons) the text you type is entered, so you just need to enter your password and press enter. After it downloaded and installed Konqueror I opened it up just to check it worked, it did.

Then I typed most of this looong boooring (as usual) blog post. I checked Ubuntu again and it said it had 203 files to download/update - and I thought Microsoft was bad for patches! I guess that the Ubuntu updates are improvements rather than just patching security holes though.

Shaz mateazz came home yesterday and also her boyfriend Mark, though I haven't really seen them at all apart from at breakfast this morning as they only got here about 10pm yesterday and were out all day today.

I wrapped up everyone's Christmas presents with Ben, played on Animal a bit, then it was dinner time. After dinner I watched Lost with Mac and Ben, then me and Mac watched a Scorsese Blues documentary.

Food
Breakfast: Lemon marmalade toast sandwich; cup o' tea.
Lunch: Sicillian style ham sandwich; Banana; Gregg's doughnut; small piece of end offcut of flapjack made with honey and muesli; cup o' tea.
Dinner: 2x Delee Pork & herb sausages; mashed potato; baked beans. For pudding I had chocolate and butterscotch whip (mixed together, was actually nicer like that) with tinned mandarin slices and a trifle sponge. Coffee.