Archive for Admin Notes’ Category

26

Nov
2010
Comments Off on Extending the system disk on a Windows VM

Extending the system disk on a Windows VM

I have had to do this on a few different occasions, and while its simple, I do not always remember the procedure so here it is for others to reference when needed. The issue is you setup your windows VM and after a while you start running out of disk space.  What do you do? The easies thing is to add a new disk to the VM image and put most of the installed programs there, but that requires that you have planned ahead of time.  If you resize the system disk in a Windows VM, you will have the un allocated space when you restart the VM, but Windows does not let you extend that drive. Here is that easiest way to proceed.  Keep in mind that you will most likely loose all your snapshots using this procedure.

Requirements

  • Windows VM whose disk will be extended
  • Second Windows VM that will be used to extend the disk size of the first.
  • Windows XP or higher on both VMs

Procedure

  1. Shut down the VM image you want to extend.
  2. Open the settings of a second Windows VM (it must be shutdown as well).
  3. Add a new disk to the second Windows VM, but instead of creating a new disk file, choose the system disk from the VM you want to extend.
  4. Start the second Windows VM.
  5. Check to make sure the new drive and all its contents show up now in the VM.
  6. Start a terminal session (cmd.exe)
  7. Type diskpart
  8. At the new prompt, type list volume
  9. Choose the right value by typing select volume <#>, where <#> is the number of the volume you want to extend.
  10. Once the volume has been selected, just type extend.  This will extend the drive to use all the available unallocated space.
  11. type exit.
  12. Shut down the second VM.
  13. Remove the drive you added in step 3 from the second VM.
  14. Start the Windows VM you wanted to extend and now the disk space should be available for use.

Hope you found this useful and good luck.
read more

28

Oct
2010
Comments Off on Add new files to SVN from the command line

Add new files to SVN from the command line

Here is a little tip for automating files that need to be added to SVN. First make sure you are in your project folder that is under source control. Then try the following:
svn status | grep -e ^?
With this you’ll notive that it will list the files, but its not in a format ready automatable. So lets enhance it:
svn status | grep -e ^? | awk '{print $2}'
This time we get a list of the files that need to be added, but lets take it a step further and also add the files to SVN in one step:
svn add `svn status | grep -e ^? | awk '{print $2}'`
There. Now all you have to do is commit.
read more

5

Oct
2010
Comments Off on How to verify MX records for your domain

How to verify MX records for your domain

You won’t be able to get any email until you set the MX (Mail eXchange) records for your domain. This is usually done for you, unless you decide to use a different provider for your email such as Google. Eventhough, there are instructions and online tools that will do this for you, but sometimes you just want to be the master of your domain, so here goes:
$ nslookup
> set type=mx
> mydomain.com
Server: 172.138.101.1
Address: 172.138.101.1#53
 
Non-authoritative answer:
pelaxa.com mail exchanger = 1 ASPMX.L.GOOGLE.COM.
pelaxa.com mail exchanger = 5 ALT1.ASPMX.L.GOOGLE.COM.
pelaxa.com mail exchanger = 5 ALT2.ASPMX.L.GOOGLE.COM.
pelaxa.com mail exchanger = 10 ASPMX2.GOOGLEMAIL.com.
pelaxa.com mail exchanger = 10 ASPMX3.GOOGLEMAIL.com.
pelaxa.com mail exchanger = 10 ASPMX4.GOOGLEMAIL.com.
pelaxa.com mail exchanger = 10 ASPMX5.GOOGLEMAIL.com.
read more

30

Sep
2010
Comments Off on How to move your cvsroot folder

How to move your cvsroot folder

I recently came across a client who was running out of space on /var and needed to move some files off to a different location. There is history behind it, and this should not be your first option, but the short of it is that cvsroot was one of the folders that needed to be moved. Here is what I did to get them going again:
  1. Made sure all users where off of CVS.
  2. Moved the cvsroot from /var/lib/cvsroot to the new location (/newfolder/var/cvsroot)
  3. Added the CVSROOT env variable to /etc/profile. This way users running CVS from the command line do not have to specify the -d parameter:
  4. 1
    2
    
    CVSROOT='/newfolder/var/cvsroot'
    export CVSROOT
  5. Updated pserver configuration to reflect the new location. Now your file may not be located exactly where this was, but it should help you track it down:
  6. $ sudo vi /etc/xinetd.d/cvspserver
    Change –allow-root to reflect the new path
  7. Restart inetd
  8. $ sudo /etc/rc.d/init.d/xinetd restart
read more

Page 2 of 212