Resize a VMWare Image of Windows XP

Published on Saturday, January 27, 2007


Over the years I have been shrinking the number of computers I own.  At one point my dorm was littered with old P100s, running whatever OS I felt like playing with at the time.  

VMWare comes to help.  In this recent oops, an image I made (for Windows XP), was slightly too small.  I didn't feel like reinstalling XP + cruft, so just resized the image.  This is the process:

1) Make Clone or just backup your VMWare image.

2) Note: if your disk is a Dynamic Disk, you won't be able use GParted.  There is a chance you can use Disk Management inside Computer Managemen inside XP.

3) Turn off VMWare image.

4) Grow the image.  

 vmware-vdiskmanager -x sizeGB yourimagename.vmdk 

5) Download the GParted LiveCD

5) Change the CD-ROM drive of your  VMWare image to boot from the ISO you just downloaded.

6) Boot VMWare image.  Make sure to press ESC right when it starts.

7) Follow the instructions for GParted. I had to select the Xvesa option, then Done.  Choose your language and keyboard and resolution.

8) GParted will come up.  First delete the partition (the empty one!), and make sure it says unallocated.  Then go up to Edit and hit Apply.  Then select the partition and say Resize.  Hit apply again.

9) Reboot image.  Windows XP will come up, and go through checking the disk.  It will reboot again, and you should then be able to log in.

Version 3.0

Published on Friday, January 26, 2007

To all my loyal (but most likely few, and mainly with the same last name as me):

I think I'm going to redo the structure of my site, yes, it is about time.  I've been using a CMS (Content Management System) to categorize everything, but it is time to ditch that and write something.  Time to stop being lazy.  Time to stop procrastinating.  Time to learn something new.

Let me make this clear: version 3.0 surely won't be based off PHP.

Darn You HiNet

Published on Wednesday, January 24, 2007

As you may know by now, I'm in Taiwan.  Live is pretty good here, especially the internet -- I'm sitting on a pretty decent 12M/1M connection.  But the company I have my internet through seems pretty laid back about network usage
-- which for me isn't good.  Their entire IP subnet appears banned from IRC, which means I have to be a little sneaky when I want to talk to my I.T. friends in New Zealand.  Worse, some websites even banned the entire subnet:

Your access to this site has been denied because of the large amount of abuse produced by the users from your country. The access will be enabled once we perform the investigation of the abuse issues. Thank you for your patience and understanding.


Luckily, Tor+Privoxy+FoxyProxy provides a quick way around any blocks that might be setup.  So, to the developers of these solutions, my kindest thanks.

Lightweight Detection

Published on Tuesday, January 23, 2007

I love my Snort, I really do.  But sometimes, I just don't need all the extra overhead -- sometimes the resources on a server are somewhat, limited.  Looking for a solution I stumbled upon PSAD , a way to detect port scans.  Since port scans are often one of the first tactics used to find vulnerabilities on a server, it is a pretty good idea to detect them.   Depending on the attack, I receive a nice little email telling me what is going on.  To test it out I first fired up nmap, and received a few emails.  Next I fired up nessus with updated plugins -- you can be the judge.  I now have 50 emails from myself telling me somebody is doing something naughty:
=-=-=-=-=-=-=-=-=-=-=-= Tue Jan 23 10:30:04 2007 =-=-=-=-=-=-=-=-=-=-=-=

         Danger level: [5] (out of 5) Multi-Protocol

    Scanned tcp ports: [11-41111: 337 packets]
            tcp flags: [SYN: 337 packets, Nmap: -sT or -sS]
       iptables chain: INPUT, 337 packets



      Syslog hostname: kelvinism

     Current interval: Tue Jan 23 10:29:54 2007 (start)
                       Tue Jan 23 10:30:04 2007 (end)

Automated MySQL Backups

Published on Monday, January 22, 2007

Historically I've used the ever-so-popular AutoMySQLBackup script.  While it seems to work just fine, I've decided to give another solution a whirl.  This solution, provided through Zmanda, seems to be less hackery and more enterprise.  The instructions are very clear, and the backup test went as planned.  Looks  like this is another gem for the toolchest.

S3's Super Backups

Published on

My buddy Ian  mentioned Amazon's S3 service, and the potential for using it for fun webapps.  While utilizing it for webapps will have to wait a few months, I was able to use it as a cheap backup for my home server (pictures, documents, etc,.) -- and my server that houses my email and websites.  The setup is pretty quick, and most of it can be detailed here.  The ruby package is here   I'll toss in my recommendation to use the jets3t Cockpit application for viewing the buckets, especially considering the Firefox extension didn't work as advertised.  My only two comments will be this:

1) Making sure SSL is working.  The site mentioned above just has you hunt down some random bash file, that isn't even hosted anymore.  On my Debian system I simply added this to my

export SSL_CERT_DIR=/etc/ssl/certs/

2) The second suggestion is another example of the s2sync layout.  Let's say you created the bucket "kelvinism" -- the following would move the documents inside a test folder from /home/kelvin named test to a folder named test in the kelvinism bucket.  Sweet.

 s3sync.rb -r --ssl --delete /home/kelvin/test kelvinism:/test