Tuesday, August 11, 2009
VMWare Server 2.0 2.0.1 2.0.x DNS via NAT broken
- created a Linux machine (Ubuntu 8.04.3) hosting VMware server 2.0.1
- two network cards, one to WAN (DSL), one with NO ip address used to bridge a physical network (wireless access points) to the captive portal "fenced" network
- created a virtual guest using downloaded VM image of pfSense 1.2.2 (and tried 1.2.3 beforehand) which is running Freebsd 7.0
- created a second virtual guest using Ubuntu Server 9.10 beta as a client for testing the pfSense captive portal
- scenario worked during testing off-site and after the installation on-site at clients location
- intermittent issues began cropping up with either slow, or no internet access for the kiosks using the captive portal, or the wireless guests
- a reboot of the Linux host machine seemed to "fix" the issues
- issues came back a few days later, or maybe sooner, but were not as apparent
- I start troubleshooting the issues using the Ubuntu server guest VM, and find that I can ping hosts directly by IP on the Internet, but not by their hostnames... DNS requests fail almost all the time
- I login to the pfSense via SSH and try some ping tests... once again, direct IP addresses work, while domain names do not resolve and fail
- I try changing to different DNS servers, doesn't help
- I try using nslookup on the Ubuntu server guest VM, issuing the "server ip.ip.ip.ip" command to switch to a known working DNS server, and issue a lookup for a domain such as www.google.ca or www.yahoo.ca which promptly (or not so promptly) fails after a few seconds
- I try the same nslookup command on the Linux Host machine, which works perfectly fine.
- I start googling for VMWare issues with NAT networks (which is what the pfSense WAN network was using with VMware to get to the internet
- I find some issues in the forums at vmware, but the ones I found were mostly issues with Windows XP Host machines, which had a work-around editing the NAT config file for vmware and setting the DNS lookups to ordered instead of burst
- I look into this file, on the Linux host, and I find the dns section, but am told by a comment in the file that this section is ignored by Linux Hosts, and only used with Windows... what luck (not) :/
- I continue googling trying to narrow it down to vmware server issues since many of the issues were related to VMware Workstation I believe.. but really get nowhere
- I start thinking of new ways to avoid using the NAT networking in VMware
- idea1: install a 3rd physical network card into the Linux Host machine, provide NAT services via Linux on this interface, and bridge the pfSense WAN network to this interface
- problem with this idea.. server is a 3hr round-trip drive away from me
- idea2: switch to KVM for virtual hosting instead of VMware
- problem with this idea.. server processor does not support AMD-V or Intel VT.. I don't mind swapping the CPU out, but once again, 3hr round-trip not desirable
- idea3: switch to XEN for virtual hosting instead of VMware
- problem with this idea.. time, and working on a server remotely is slightly more dangerous if I break something mid-work, once again, 3hr trip to fix if I do break something
- idea4: try putting a virtual network interface or "alias" interface (nothing to do with VMware) on the primary NIC that attaches to the internet on the Linux Host machine, give it a private subnet address different than any other physical or virtual network currently in use (192.168.50.1), and enable forwarding on this virtual interface on the Linux Host and bond the pfSense WAN nic in VMware to this physical interface, set the pfSense WAN to static IP (192.168.50.129) and gateway of the Linux Host's alias IP of 192.168.50.1
- problem with this idea.. don't know if it'll work, somewhat risky playing with networking on remote server, seems complicated
- I went ahead with this idea after weighing the other ideas.
- after choosing idea4, I went ahead and implemented the changes, setting up the virtual alias of eth0:50 with an IP of 192.168.50.1, enabled IP forwarding manually for testing, then later in the sysctl config plus 2 other settings related to forwarding, created a small script to run the 4 iptables rules that implement the masking/masqing/masquerading/NAT redirection functions of linux
- I modified the pfSense WAN IP to be static 192.168.50.129 netmask 192.168.50.0/24 (255.255.255.0)
- I adjusted the pfSense virtual guest's first virtual network card to be bridged to the Linux Host's primary network card (default network name in VMware is "Bridged") which is used as the WAN interface in pfSense
- maybe some reboots involved since things weren't working initially
- also made a correction to my pfSense netmask, since I mistakenly chose /32 initially instead of /24 netmask
- can now ping from pfSense interface to linux host's eth0:50 ip of 192.168.50.1, and vice-versa
- can ping outbound from pfSense to the internet
- nslookup requests from pfSense work
- switch to the testing guest Ubuntu Server VM, and reboot it to get a new lease from the pfSense captive portal, probably not required, but reboots are the order of the day it seems
- nslookup requests from the testing guest using the captive portal work
- call client to have them test using their Kiosks
- wait to hear from client, and continue to test with testing guest to see that the intermittent issue side of things doesn't crop up again
- waiting to know if it all worked out
Saturday, July 25, 2009
VMware Server 2.0 (free) gotchas
Gotcha1: USB Devices in VMware guests
Using VMware Server 2.0 (free), I ran into my first requirement of needing a USB Software Dongle Key to work inside a virtual machine running Windows XP. All the documentation kept mentioning the steps of a) add a USB Controller to the virtual guest inside the VMware Server control web interface (this was the easy part) and then b) Enable the USB Device in the web interface on the VM.
I for the life of me couldn't find where it meant there was somewhere to enable the specific plugged in USB device that you had plugged into the Host machine, allowing it to work on a specific guest... after much googling and not coming up with something, I finally noticed a new button on the VMware guest page in the web interface, to the right of the regular 4 buttons (Stop, Pause, Play, Restart), a new button appears with the USB Icon, and you can enable/connect the USB Device to the VMware guest by clicking on it, and checking off the appropriate USB device... as simple as that. (gee whiz)
Gotcha2: Adding Datastores to VMware 2.0 (free)
I was trying to determine how to add additional datastores to VMware Server 2.0 to no avail... everything kept mentioning or even showing pictures of the screen with the boxes to fill in, but nothing mentioned how to get this screen up in the first place, or at least not enough for me to clue in and I was unable to find it... after googling for a while, I went back to the web interface, and eventually lucked out (and apparently I am blind... or was very tired), and determined that if you just click on the Server in the list on the far left of the web interface, on the far right is your standard options such as "Create Virtual Machine", "Add Virtual Machine to Inventory", and... you guessed it, "Add Datastore" ... not sure how I missed that one... but I actually didn't "SEE" it until I clicked on the one original/default datastore that was added during configuration, from the list/display window in the middle of the web interface with the server selected... which showed some additional options for that datastore (rename, refresh, remove datastore).. and I finally saw the "Add Datastore above all those new options.
So, I guess the 2nd one wasn't really a gotcha... just more of a blind mistake or I was more tired than I originally thought. Anyways, a heads-up for anything that may be blind like myself.
Gotcha3: VMware Server 2.0 (free) 64-bit Host, but unable to successfully use 64-bit Guests
I am using some second-hand HP DL585 G1 servers with 4 x Opteron 848 2.2Ghz CPU's in them... I totally forgot about having earlier checked if they had VT/AMD-V capabilities months earlier (they don't with this cpu revision of CG or C0 (I forget which C* they are, but anything C* generation or older do not work ie. stepping CG does not, but E1, E4 or E6 does support it))
So, off to HP's site to see if there are firmwares that work with the E* revision cpu's, and then off to Ebay to try and poach some.. since they seem to be quite reasonable prices.. assuming they work with my server(s). Just for anyone else that might be trying to run older gen Opteron's without AMD-V support, and trying to setup 64-bit virtual guests unsuccessfully.
fi.
Sunday, July 19, 2009
Windows Update fails in Vista using Shaw Internet using "Automatically Detect Settings"
In Internet Explorer 7 or 8, open the Tools Menu (press the ALT key once if the menu bar is hidden), choose Internet Options down at the bottom of the Tools Menu, Choose the Connections Tab from the list of tabs across the top, Choose LAN Settings down near the bottom right of the window, and make sure to UNCHECK "Automatically Detect Settings".
Problem should be solved, simply try Windows Update again, this has fixed the error for me on several machines... I don't know if its my local shaw proxy server that is being detected, and failing for some unknown reason.. but, thought I would blog about it since its happened several times in the past, and seems to be better to simply disable the proxy anyways.
fi.
edit: apparently i have an older post in my blog that describes this exact issue, including the error codes... and here I was thinking my blog could act as my memory on some things... go figure :p
Wednesday, July 1, 2009
"Grub hard disk error"
- installed ubuntu server 8.04.2 LTS on machine using 160gb IDE drive (hda), including a single /boot partition and an LVM partition for root (/) and another LVM partition for swap.
- installed new 500gb Sata drive into machine
- created similar partition schema (partition 1 = 250mb /boot partition (sda1)), (partition 2 = logical of the rest of the space (sda2=extended info, sda5=data partition that was created inside the extended partition
- used dd to copy hda1 (250mb /boot) to sda1 (new 250mb /boot)
- made sda1 bootable using cfdisk
- added sda5 partition to main volume group using pvcreate
- used pvmove to tell LVM to move anything on the /dev/hda5 physical volume
- after ~4 hours (150gb @ 12mb/sec average, since its slow due to using atomic writes, etc), it was done moving all data off of the old 150gb physical volume
- used vgreduce to remove the hda5 physical volume from the main volume group (since nothing is on that partition now (well, technically its probably got all the data if you wanted to try recovery of some kind, I don't believe it writes 0's or anything to it during a pvmove))
- tryed using grub to re-install to new hard-drive (sda), all messages seemed to be fine
- shutdown machine and removed the 160gb IDE drive
- got "Grub hard disk error" ... with no other useful information, or ability to "enter" grub
- attempted to manually fix grub using rescue mode of ubuntu server install CD
- googled for a while
- didn't find anything that really helped me, but some useful information none-the-less
- then realized one of the options in the rescue menu was "reinstall grub" or something to that effect, I chose to re-install to (hd0) (thats hdZERO)
- I then chose to reboot the system
- Magic happened, and grub loaded correctly, and then promptly loaded Ubuntu Server for me, along with my VMWare instances that were set for autostart.
- Problem solved... why my manual grub flailing around didn't fix anything (tried many different things between grub-install, setup-grub, setup (hd0), etc, I have no idea why, but I'm happy that this route worked for me
Friday, June 19, 2009
Windows Vista CBS.Log and SFC Scannow failure
windows resource protection found corrupt files but was unable to fix
some of them. details are included in the CBS.log
windir\Logs\CBX\CBS.log
C:\windows\logs\CBS\CBS.loglinks:
how to take ownership of files in windows vista
well written howto on troubleshooting/repairing windows vista
Examples of taking file ownership/permissions:
C:\>takeown /f "C:\program files\windows sidebar\settings.ini"
SUCCESS: The file (or folder): "C:\program files\windows sidebar\settings.ini" now owned by user "Owner-PC\Owner".
C:\>icacls "C:\program files\windows sidebar\settings.ini" /grant Owner:F
processed file: C:\program files\windows sidebar\settings.ini
Successfully processed 1 files; Failed processing 0 files
http://jsbi.blogspot.com/2006/12/how-to-recover-boot-failure-in-windows.html
http://forums.wincustomize.com/?postid=348387
http://www.vistax64.com/tutorials/86959-access-vista-install-dvd-files.html
http://support.microsoft.com/kb/928228
Monday, June 1, 2009
Set Grub Default to Windows or Last Selected Choice
I wanted to make it so Windows would be the default on the grub menu. This in itself is actually rather easy, just setting the 'default' option in grub to the line number that Windows shows up in the Grub boot menu. This becomes a problem later in "life" if Ubuntu is updated, and a new kernel is installed in addition to the old kernel, this changes the line that Windows will show up on. One way around this was to move the lines that add Windows to the grub menu up to the top of the menu.lst, therefore it shouldn't change (hopefully)... but I came up with a better suggestion with a little more digging on google. Instead, I simply enabled the usefulness of the savedefault option in Grub, so that any grub menu options (kernel options/operating systems) that have the savedefault in their list of commands would change the default O/S to THAT O/S. If you don't have a "default 0" option, thats fine, just make sure you add the new "default saved" option to your config somewhere in the global area (near the top area).
** The lines with #XX in front of them have been replaced by the respective following line of each of them.
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
#XXdefault 0
default saved
## should update-grub adjust the value of the default booted system
## can be true or false
#XX# updatedefaultentry=false
# updatedefaultentry=true
## should update-grub add savedefault to the default options
## can be true or false
#XX# savedefault=false
# savedefault=true
If my friend ever goes into Ubuntu, it will change the default to Ubuntu, but all he has to do to get it to default back to windows again, is simply choose to boot into windows again from the grub menu, and it will then default to windows again. Problem solved.
One other option could be to remove the savedefault from any menu entries that you don't want to make changes to the default O/S menu choice during boot-up, if you happen to boot that entry once in a while and don't ever want it to be the default.
Monday, May 18, 2009
Using sfdisk to backup and restore partition tables
Using sfdisk with the -d option we can get a dump of the current partition table in a regular file, and if needed we can restore it from that file:
sfdisk -d /dev/sda > sda_table
and to restore the partition table to the same drive (or change device name for another destination drive):
sfdisk /dev/sda < sda_table
Regardless on the method used, having a backup of the partition table might be handy.
One more tip: another usage of sfdisk with -d is to create an identical partition table from another hard disk. In this example we are partitioning sdb with the exact same partitions as sda (ie. copying partition table from SDA to SDB):
sfdisk -d /dev/sda | sfdisk /dev/sdb
of course this can be handy when the hard drives are identical, in raid1 setups, etc. (actually, they don't even have to be identical, but the destination drive needs to be the same size or larger (exactly the same size, not "sales pitch gigabytes size")).
So there you have it (and I have it for my permanent memory now!).
Sidenote: copying the first 512bytes of your drive may copy many partition tables, but only if they do not include extended partitions, since the main/base partition table actually uses a reference that links to another part of the drive where it stores the rest of the extended partition table data. Don't ask how I know this, other then it was a late night, and interesting things were learned using hexedit! :) ask Jaymes if one must know! :P
Tuesday, April 21, 2009
Microsoft Outlook XP 2002 0x8004060c
Sending and Receiving reported error 0x8004060C (0X8004060C) Unknown Error: 0X8004060C
After googling, came to this page (http://support.microsoft.com/kb/304863) which explains the error in more or less words.
Short Answer: your PST file is full, you need to either start using a new PST file and use your old one as an Archive (quickest method I think), or create a new PST File, and move a bunch of your old emails into it (from the old PST file), and then compact your old PST file (google for how if you don't know how).
Problem fixed.
sidenote: a person may want to setup auto-archiving of older emails to another PST file to help avoid this, until the archive pst file becomes full, and then you'll have to adjust the destination to an additional (new) archive pst file after creating another one to use.
fi.
Vista Windows Update Error 0x80072EFE 80072EFE
In the end, it ended up being that since the "Automatically detect proxy" was enabled in Internet Options in Internet Explorer, it was trying to detect my ISP's proxies, and in the C:\Windows\windowsupdate.log file, it showed it as failing via a proxy (when I didn't have a specific proxy set).
Anyways, long story short, I simply disabled the Automatically Detect Proxy option in Internet Options in Internet Explorer, windows update now stopped trying to use a proxy that vista was trying to detect (maybe my isp's proxy was down.. or broken or ?). Windows update worked flawlessly after disabling the detect proxy option.
Articles (rather, posts) I found on the problem were often unanswered (successfully) or pointed towards an internet related issue with your system. I had gone through most of a microsoft howto (http://support.microsoft.com/kb/836941/en-us) (found via this post: http://www.vistaheads.com/forums/microsoft-public-windowsupdate/185095-windows-update-fails-error-80072efe.html)on troubleshooting the issue (after manually trying some things myself beforehand), and the howto pointed/reminded me to read the windowsupdate.log file, so I went and checked, and saw the proxy trying to be used (unsuccessfully). In this instance, it was definitely an internet related issue... (a broken proxy or some other issue with it).
fi.
Monday, September 29, 2008
Windows XP (Vista?) Login Screen - Screen Saver
The url this post links to, describes where (near the bottom of the page) to go in the registry to edit this setting, but didn't mention how to set it to the blank screen, add my recipe to it to get the blank / black screen screen-saver.
Browse to the following key with regedit: HKEY_USERS\.DEFAULT\Control Panel\Desktop
In the right side of the window, change the SCRNSAVE.EXE entry by double clicking on it, to contain:
C:\WINDOWS\system32\scrnsave.scr
That's all.... this can also be used to change to any other screen saver, just point it to the appropriate file.
WHY?: I did this on some vmware virtual windows XP machines to reduce any extra load the screen savers would put on them while they were sitting at the login screens.
EDIT: another link to microsoft on the subject:
http://support.microsoft.com/kb/314493
Monday, July 7, 2008
mouse keys in virtual pc 2007 and ubuntu hardy heron 8.04
to boot up the hardy heron 8.04 (kubuntu-desktop in my case) live CD successfully without virtual pc complaining about a processor error and promptly crashing the virtual instance, you need to follow these steps:
1. choose your language upon first boot of the live CD inside the virtual pc instance (english in my case)
2. press F4 and choose the Safe Graphics mode option (down arrow to it, then enter)
3. press F6 and add: "noreplace-paravirt" to the command line that shows on the screen (without the quotes)
4. press Enter to continue the process
The live cd should boot to a linux desktop (KDE or Gnome or ... depending on which live CD you are using)
to continue the installation, choose the install icon on the desktop, at this point, you may find it hard to use the mouse (via remote desktop connection to the windows host machine), so I suggest turning on mouse keys to use the number pad as a mouse instead, following these steps:
press the left-alt + left-shift + num-lock buttons together, at first, your windows host machine will ask about turning on mouse keys, I chose to disable the mouse key shortcut (in the windows host machine that I was RDP'd into), and closed out the mouse keys configuration menus, and then repeated the process of pressing left-alt + left-shit + num-lock again, and this time, the linux session recognized it (KDE in my case) and brought up a configuration window for it, I used the keyboard and pressed tab to change focus to "continue", and then spacebar for choosing continue. Now if num-lock is turned on, i can use the number pad to move my mouse around (5 is left click btw).
Thursday, April 3, 2008
Installing Ubuntu 8.04 LTSP OR Edubuntu
Unfortunately, with the new version of ubuntu (8.04) that is being released at the end of April 2008, they've changed everything around, and there is no longer a separate edubuntu (server) installation disk (per say), and you don't use the standard ubuntu-server disk either..... so how how then, do you install an edubuntu server or any other LTSP server (the advantage of the newly christened way of going about setting up edubuntu/ltsp... )? Read on to find out.. I originally spent 20-30 minutes googling for information and was coming up rather short on answers, until I finally decided to give the IRC channels a try, and happily (and quickly) found out the required details:
First things first, you need to download the pieces:
(Choose i386 or amd64 based on your hardware (64bit or 32bit), and/or based on personal choice. Personally I choose i386 initially for reasons that include better compatibility with certain programs and compiling programs from source without extra hassle, this should eventually fade as 64bit becomes the standard.. but, until then, I'll stick with builds that make my life less stressful! :) )
Required for Ubuntu 8.04 LTSP Server:
1. download the ubuntu-8.04-alternate CD Image
Required for Ubuntu 8.04 Edubuntu (LTSP) Server:
1. download the ubuntu-8.04-alternate CD Image
2. download the edubuntu-8.04-addon CD Image
Burn the Images that you need using your favorite burning software.
Installation of LTSP Server:
1. Put the ubuntu-8.04-alternate CD/DVD in your systems CD/DVD Reader.
2. Turn the machine on and let it get to the Ubuntu CD Install menu.
3. Don't get carried away and hit enter yet... instead, after choosing your preferred language, press the 'F4' key on your keyboard, this should bring up a menu, choose the LTSP option.
4. Press enter to start the installation.
sidenote: depending on how many network cards (suggested defaults included for 2) are in the system, some more interaction may be required during installation. If you want the simplest installation, just make sure you have two network cards in the system.
5. Congratulations, you now have an LTSP Server... this is all this post covers, as this is as far as I've gotten with my own LTSP installation, if you wanted an edubuntu LTSP server, read on to step 6, otherwise, enjoy your standard LTSP server:
6. After the installation, and rebooting, and logging into the desktop, insert the edubuntu addon CD/DVD into the system.
7. A popup should come up asking if you'd like to install the Extensions
8. After agreeing to install the extensions, an 'add-remove applications' dialog will popup, presenting the CD Contents sorted by category.
9. Select the edubuntu desktop category and toggle the checkbox next to the edubuntu-desktop package in the right window.
10. After all the install processes finish, restart your server to make the edubuntu artwork take effect.
11. Congratulations, you now have an Ubuntu 8.04 Edubuntu LTSP Server.
Note: some of these steps are near verbatim from the original article I was pointed to (and the one that this post links to), since I couldn't have said it any better :)
Now all I need to do is setup the client side of things :)