05.20.09

New focus for venturehosting.net

Posted in Uncategorized at 10:17 am by michael

I’ve let this blog flounder for too long.  I’ll be spending some time in the next couple of weeks updating the look and feel, as well as adding tons of new content.  I got pretty busy with client work, and personal projects, and really stopped working on this site.  I feel it’s time to kick it into high gear and make a contribution to the virtualization and dedicated server community.  I’m also going to put some time into new graphics. I’m no designer, but I should be able to come up with something…

I really like linux and the various BSDs as a server platform, so I’m going to focus mainly on that.  I’ll still talk about virtualization, but not working with vmware everyday anymore has made me lose interest.  This blog is going back to my roots, web programming, unix administration, and solving obscure problems.  That’s what I do best.

If you need some work done on a server, or want to host a site with a provider that is exclusive and knowledgeable, drop me an email at michael [at] venturehosting.net and I can probably help you.  I am very selective about who I work for, but if I decide to work with you, I’m sure you’ll be pleased with the results.  If I decide not to work with you, don’t take it personally, I’m a unix geek, we do that sometimes.

11.13.08

How to Mount a Mac OS X dmg file in Linux

Posted in Mac, Linux at 3:12 pm by michael

Ran into a problem today with mounting a dmg file from mac os on my linux machine.  Apparently some dmg files are compressed so you can’t just mount it normally.  You need a utilty called dmg2img which will decompress the dmg file and allow you to mount it normally on the loopback.

You can get dmg2img here.

You’ll have to compile and install it, then you can run it like this:

dmg2img -i filename.dmg -o filename.out.dmg

Then you’ll be able to mount it normally on the loopback like this:

mount -t hfsplus -o loop /path/to/filename.out.dmg /path/to/mountpoint

Hopefully this will help someone who has the same issue I did with mounting a compressed dmg file from Mac OS X

10.23.08

Squid as a Transparent Proxy on a stand-alone machine

Posted in Ubuntu at 4:24 am by michael

A buddy of mine had a problem getting squid to work right on a stand alone machine.  He installed Ubuntu and Squid and configured it according to directions but since it was stand-alone and not a router machine, the normal transparent proxy iptables rules wouldn’t work.  It turns out without the routing portion you have to change things up a little.  Here are the iptables rules that fixed his problem. You simply use these rules instead of what the howto says to use.

iptables -t nat -A OUTPUT -p tcp -m owner –dport 80 –uid-owner proxy -j ACCEPT
iptables -t nat -A OUTPUT -p tcp -m tcp –dport 80 -j DNAT –to-destination 127.0.0.1:3128

This is the first step to securing a machine for kids to use as a “safe” web surfing machine.  Squid does the transparent proxy, but it’s dansguardian that makes it filter content that you might not want your kids to see.  There is a lot of documentation listed on the site on how to configure various pieces, but there was nothing that showed how to configure iptables for a stand alone machine.

08.25.07

How to fix SSH Timeouts

Posted in Ubuntu, Linux at 2:00 am by michael

If you’re like me you use ssh quite a bit throughout your day. I have had problems with ssh timing out on me after just 5 or 10 minutes for a long time now. I recently got fed up with it and decided to find a solution. It turns out that the problem wasn’t really ssh or even the shell. The problem was router NAT tables. You see most routers will close an idle connection that is being translated to save space in the tables. Normally I would say this is great, but for ssh, where sometimes I will leave it logged in yet idle, this was frustrating. I did some searching and found an option that made this problem go away.

All you have to do is simply edit the file /etc/ssh/sshd_config and add 1 line:

ClientAliveInterval 300

That’s it. Add that line to the bottom of your sshd_config file, save it, and then restart ssh. This option will cause sshd to send a keepalive across an idle connection every 5 minutes. This prevents the router from timing out the NAT connection, and you can happily idle as long as you need to. This option should be used with care, it’s never a good idea to leave a login session open on a computer that is not secure. As long as you aren’t lazy and leave your computer unattended where someone could use your session, you should be safe. Never, ever, ever leave yourself logged in as root on a server for longer than absolutely necessary. This is just plain common sense, but I can’t stress it enough. I have seen too many “pranks” played on people who did this out of pure laziness. Whenever you are using root, do what you have to do and exit the shell. If you want to stay idle, do it as an unprivileged user.

Having ssh timeout when you are not quite done working but still idle for whatever reason can be really annoying. This small fix should make things much more bearable for people that work like I do. I’m glad I finally took the time to research this issue, and I share it here so that others can learn from my discoveries. Enjoy.

07.19.07

Review of VirtualBox for Mac OS X

Posted in Uncategorized at 11:38 am by michael

I was reading about various virtualization solutions today and saw that VirtualBox has a Mac OS X version available. I downloaded the newest version, 1.4.1 beta 2. I installed it, and configured a standard ubuntu server. Installation is dead simple, and the look of the program is nice. About the same as Parallels 3. I like the wizards they use to create a new virtual machine as well as the virtual disk manager, that’s a nice touch. For a free product it’s very polished and nice looking.

Installing Linux was just as easy as it is on Parallels, with the same issues I’ve had with the kernel in Ubuntu Server edition. I figured out how to fix that on Parallels and the same thing applies here, simply install the generic kernel after you install the base OS and you’re good to go. VirtualBox doesn’t support Intel’s VT-x technology, so it doesn’t run quite as nicely as Parallels. As a matter of fact it pegs my CPU usage at close to 100% while any disk activity is happening. This is not a good sign for hardcore use. The performance difference between VirtualBox and Parallels is noticeable. VirtualBox is lacking some functions on OS X, including host networking. Due to VMware and Parallels I’ve come to expect certain functions and features from a virtualization solution, and that puts VirtualBox at a disadvantage.
VirtualBox has potentional to be a good competitor but it lacks performance and features that others have. Reading their website one of the best features they offer in the closed-source version is a built-in RDP server. That is a very interesting and useful feature. That could seriously hurt VMware and Parallels both if VirtualBox can only catch up on the other features. The high cpu usage issue I had would make running multiple virtual machines too much of a strain on a system. I’m optimistic that if they can get their features in line with the competition they will be a major player in the virtualization arena. I’m looking forward to the next release, but I am not going to be using VirtualBox on a regular basis yet.

07.09.07

Installing Feisty Fawn (Ubuntu 7.04) Server Edition on Parallels 3

Posted in Mac, Parallels Desktop, Ubuntu at 5:32 am by michael

I had some major issues again using the Server Edition of Ubuntu 7.04 to install a new virtual machine in Parallels 3. Ubuntu Server seems to have some things enabled in the server kernel that Parallels just doesn’t like. I also ran into a problem trying to use more than 512 megs of ram for the virtual machine. Hopefully this gets sorted out in the next update to Parallels, since I prefer to use 768 megs of ram for my virtual machine.

I used the latest version of the Ubuntu Server iso to install. I am assuming anyone using this install method is at least at an intermediate level of using Linux, so I’m not going to hold your hand too much. I am using Parallels 3 build 4128, and have done this install successfully 5 times now. I configure the virtual machine to use 5 gigs of hdd space, and 512 megs of ram. I run through the server install as normal, choosing the “install to hard drive” option at boot. The screens are pretty easy to handle, the hardest part is partitioning the drive, and you can just choose the “guided” option for that if you aren’t as picky as I am. As a note anything over 3 gigs of space should work for a virtual machine, I happen to use 5 gigs so I have some room to play with. I have a linux server that I can connect to over the network if I need more space than that.

Once the install finishes it will prompt you to reboot. Allow it to reboot but press the stop button on the virtual machine once it starts to load grub. Then go to Edit->Virtual Machine on the Parallels menu. On the virtual machine configuration editor, choose Options on the left, then click the “Booting” tab on the right. Look for the “Boot Sequence” section and select “CD-ROM, Hard Disk, Floppy” so it will boot from the iso again. This is important because you want the virtual machine to boot from the cdrom so you can get a shell and install the generic kernel instead of the server kernel. After you’ve changed the boot sequence setting, click “OK” and then boot the virtual machine with the green play button.

At this point parallels should boot the cd again. Choose “Rescue a broken system” from the menu and hit Enter. It should boot into rescue mode, it will ask you a couple of questions, similar to the install process. If you’re in the US and using english, you can pretty much just press enter at every prompt, until it asks about disks. On a guided or typical ubuntu install under Parallels the root filesystem should be /dev/sda1. Choose that one, and hit Enter. On the next screen select “Execute a shell in /dev/sda1″

Once you are at a shell, verify you have network by sending a ping to google or yahoo. You can’t do these next steps without your network working, since we’ll be using the network to update and install packages. We start with an update and upgrade, to get all the newest versions of installed packages.

aptitude update && aptitude -y upgrade

After this is complete, you want to install the generic kernel.

aptitude -y install linux-generic linux-image-generic

If everything goes smoothly and you have a decent internet connection, this process should take less than 20 minutes. After that, simply remove the packages for the server kernel.

dpkg -l | grep linux-image

This will show you the exact version of the server image you have installed. Use it in the next command for the last package if your version isn’t the same as mine.

aptitude remove linux-server linux-image-server

aptitude remove linux-image-2.6.20-15-server

Assuming you didn’t run into any problems, type “exit” to return to the rescue menu. Choose the reboot option, then stop the virutal machine with the red stop button. Go back to Edit->Virtual Machine on the Parallels menu, select “Options” on the left, then the “Booting” tab on the right. Change the boot sequence back to “Hard Disk, CD-ROM, Floppy”

Boot the Virtual Machine and it should get you to the login prompt. After you are logged in, install whatever software you would normally on your server setup.

A note, if you are using an actual cd instead of just having Parallels connect to an iso you downloaded to your mac, it may be necessary to choose Solaris 10 as your operating system for the initial install and “fix” phase. There have been reports of the cd emulation not working otherwise. Simply set your OS Type to Solaris, and the OS Version to Solaris 10 when you first configure the virtual machine. Use the process outlined as above, and once you are ready to boot the system, edit the virtual machine configuration again. Set your OS Type to Linux, and the OS Version to Ubuntu Linux.

07.03.07

Macbook Replaced

Posted in Uncategorized at 11:43 am by michael

I sent this to consumerist.com already but I’ll make a post here about it as well. Apple replaced my macbook last week. They took the smashed up pieces of my old one in trade for a brand new one. I’m very happy now, Apple has regained my loyalty. Some people call me a sellout, but I really like the product, my only issue was the service. Now that they’ve corrected the mistake, I’ll gladly convert friends and family. They were very nice and polite, and didn’t require me to remove my video or sign anything at all to make the replacement happen. They even transferred my applecare warranty from the old macbook to the new one. Although it took 6 months to happen, I am happy with the resolution of this issue.

Every flame is just proof that jealousy is an ugly beast. I got flamed for making the video, and I’m getting flamed for getting my issue resolved, and I’m even getting flamed for saying I might actually try a letter instead of a sledgehammer next time I have an issue. I still refuse to associate with the asshat fanboys who tried to make this personal, but Apple did right by me in the end, so they deserve my loyalty.

06.22.07

The Macbook Destruction Saga Continues

Posted in Mac at 6:12 pm by michael

I will clarify a few things that have been asked in comments on digg and consumerist. My macbook was only 6 months old when it stopped working. I was still within the normal 1 year manufacturer’s warranty. I only mention in the video that I had purchased applecare to illustrate how much money I had spent in this situation. Before I destroyed the macbook, I removed the screen, the battery, the hdd, and the ram. The screen’s connector was damaged by me during removal. The rest of the parts were sold prior to the video being made, to help pay for my new laptop.

The situation has turned into a flamefest. At first I was defensive, as I think many people would be when they get called a retard, or stupid, or an idiot, or a tool, or whatever else has been said. I got over that, now I just think they are funny. Thanks for making me laugh.

Reading the comments, there have been many people who have spilled things on their Apple products and had them replaced. My point, made with a sledgehammer is this: Why did my product not get replaced while theirs did? At the very least Apple is selective about enforcing their policies, and that’s something people should know about them. At worst, Apple gives bad service to customers, which should also be known. What made these other people so “special” that Apple relaxed for them the same policy they used to deny my claim? Every story of someone actually spilling something and getting a replacement just upsets me more. I spilled nothing, yet my claim was denied by this selectively enforced policy. Was my money any different than these other customers? What about my situation was different? There was no spill damage that I could see, but even if there had been a spill I didn’t know about, why wouldn’t they simply replace it, as they had done for other people such damage?

I was well on my way to becoming a very vocal Apple fan when this happened. I planned to upgrade to a macbook pro at the end of this year. I was seriously considering getting an Apple TV, and I would have eventually bought an Apple iPhone. If Apple hadn’t refused to warranty the product, I would be an Apple Fanboy right now. After seeing the name-calling responses I got from the Apple fans in comments, I’m glad I didn’t end up that way.

My handling of the situation was not ideal, but it was personally satisfying. I gained closure on the issue at the end of that video. Things got stirred up for me again once the video shot up in popularity. Thankfully I’m now back to where I was at the end of the video, content.

06.21.07

digg.com and consumerist.com linked to my video today

Posted in Mac at 4:33 pm by michael

Wow. That was a huge amount of traffic both to the youtube video and my blog in a short time. Thankfully I had the cache in place and the site held up very well. Anyone that hasn’t seen it, here are the links:

Man Teaches Apple To Not Repair His Macbook By Smashing It With Sledgehammer on digg.com


Man Teaches Apple To Not Repair His Macbook By Smashing It With Sledgehammer
on consumerist.com

I’m actually impressed my server handled this as well as it did, though consumerist took the brunt of the traffic I got quite a bit of spillover here.

Now to address the comments. Apple fans seem to like to make personal attacks whenever anyone tries to say anything bad about Apple. That’s fine, though I expected a bit more maturity from that group, the internet is the internet and semi-anonymity encourages people to be douchebags. I will steer clear from Apple fans in the future though, I kept feeling I needed to defend myself from completely made up claims, but I got over that. Now I’m just enjoying all the sniping and back-and-forth action in the comments on both sites. Hell I even dugg up some of the funnier comments just for spite.

To clear up something that is being asked over and over again, I took the HDD, the ram, and the battery out of my macbook and sold them before the video was made. It seemed overly wasteful to destroy perfectly good parts. I screwed up the screen trying to remove it, or else I would have probably been able to sell it as well. I still have the screen, the connector to the mainboard is broken though.

I felt like I had to justify myself at first, mainly because everyone was calling me a liar, but I got over that pretty quick. I have nothing to prove to anyone, and the video stands on it’s own merit. It was fun to do and the controversy is amusing me to no end…

I haven’t felt the virtualization subject stirring me up lately, so I’m going to be adding several more categories to my blog after this, just so I have things to post about. I feel I should spend more time posting fresh content than I have been, and will be changing things around tomorrow. Other than that, I’m floored at the attention my video has gotten, but I figured it would piss some people off. The video is serving it’s purpose, presenting my experience in a novel way, and that seems to be a lightning rod for controversy. Thanks for the attention all, come back again and maybe you’ll like my posts.

05.23.07

Tuning VMWare Workstation

Posted in VMware at 1:24 pm by michael

There is a new document up on vmware’s site on how to tune performance in VMware Workstation 6.0.

http://blogs.vmware.com/performance/2007/05/getting_the_bes.html

I found the document to be helpful and informative, with a large amount of information to digest. Workstation 6.0 was a fairly big update, and this doc answered some questions for me on how to get the maximum performance out of the software.

Not much going on in Virtualization right now. KVM is in the stable Linux kernel, and people are not talking much about it from what I can see. Not sure if this is a good or a bad thing. I did some reading today about performance and it turns out Xen is still kicking KVM’s ass on that front… This will be interesting to see unfold in the next 6-12 months. Personally I don’t like either solution as much as VMware but then I have access to all this cool hardware specifically engineered to work with VMware.

I’ll come up with something to write about in the next day or two, but for now just wanted to point out this great document I found.

« Previous entries ·