Tuesday, July 17, 2012

Virtually Shared Folders

While in the midst of a class discussion, one of my classmates was doing a presentation on virtualization. The presentation was done very well and afterwards questions were asked. One question that seemed to be on most minds was how to access folders on the host from the guest installation. This is actually a very easy thing to do, at least with VirtualBox and I would expect that VMWare is just as simple.

I was actually surprised with how many students in the class had not explored setting up a virtual machine. The entire process is actually pretty simple (at least to me). The benefits of having a virtual machine are really only limited to one’s imagination on what would a person do with an OS that they didn’t have to care if it crashes? How much exploration or trial and error would someone be willing to do if they didn’t have to worry about the ramifications of making a mistake? What would be the educational benefits of being able to try something totally crazy or bleeding edge new?

In this how-to I’m going to show just how easy it is to set up file sharing between an openSUSE host and a Windows guest. Perhaps once people get the opportunity to see just how simple this is, more people will consider being a little more adventurous with their systems. This also gives new IT students an idea of how simple it can really be to set up a virtualized server running a variety of different operating systems for their users based on requirements of the clients.

The first thing I usually do is to take a look at my uppermost file system and decide which ones I want to share with any particular guest. Although it is completely possible to simply provide access to the entire root system of the host, I don’t recommend it. If something should go buggy or awry with any particular guest situation, I personally wouldn’t want it to have access to too much on the host system.

Since I use virtual machines fairly frequently, I have a file structure that I create with every OS installation with the intent of providing sharing to a virtualized guest. In this case I am going to be sharing Documents, Downloads, Pictures and School.



Once the decision of what folders will be shared then we can go ahead and start our virtual machine and set these folders up to be accessed from our guest machine. Obviously this decision can be done simply from the selection process or, as in my earlier day of setting up virtual machines, a person may want to create folders specifically to be shared with each machine in particular. As an example “Windows Folder” either in the top tier or as a sub folder perhaps under documents.

One example of why this would be good is if a person decides they don’t want to provide internet access to their virtual machine. I typically turn off internet to my Windows machines and only download or access the internet through my Linux host. By doing things this way I don’t worry too much about virus protection or malware getting to my Windows install. Even if something does get in, I really don’t care since the OS is just a virtual guest which can be simply replaced anytime. This decision can be invoked or revoked any time with just a simple setting.

The next action to take is to start VirtualBox and go into the settings tab in the top left prior to starting the actual guest OS.



Inside the settings, on the left hand side, navigate down to “Shared Folders” and click on it. In the window that opens over on the right shows a file tree window and just to the right of that is a tiny folder with a green plus sign. Click on this little folder and a file browser will open allowing navigation to the folder to be shared between host and guest systems.



Repeat this process to add all the files you will want to allow access to between the guest and the host. As I stated earlier, I wouldn’t get overly zealous with this action. It is much safer to be conservative especially when various file types will probably be created and shared to the host over a period of time. Keeping your file system clean and organized is always a good thing.

Repeat this process to add all the files you will want to allow access to between the guest and the host. As I stated earlier, I wouldn’t get overly zealous with this action. It is much safer to be conservative especially when various file types will probably be created and shared to the host over a period of time. Keeping your file system clean and organized is always a good thing.



This is all fine and good for being able to access our folder system on the host machine but, what we really want to do is be able to access these documents with an application set up to run in our guest. So lets go ahead and fire up Adobe Illustrator and try to access some image file which is truly stored in our Pictures folder on our openSUSE host machine. Files for use in applications can either be accessed this way or they can be copied over into the guest machine and utilized there. Keep in mind though that the guest machine in itself without a lot of files in it takes up a lot of space. Windows 7 is kind of a space pig (in my opinion) although the sacriface is worth the improvement over the Vista release.


Once we have our software open, lets go ahead and open up a file we want to work with.


The end results are exactly as we want. We opened a file which was originally stored on the host machine for use in an application written to run on our guest machine. Kind of gives us the best of both worlds doesn’t it?

As can be seen this was really easy to set up and execute. If for any reason anyone runs into a problem with their folder sharing with VirtualBox, the first thing to do is go to the VirtualBox website and sift through the forums. Odds are really good someone else has asked the same questions or had the same problems.









Tuesday, July 10, 2012

How-To Set Up VirtualBox in openSUSE 12.1


 
  Recently I needed to do a new install of VirtualBox on my openSUSE 12.1 desktop. I usually only do this when I get in the mood to test new operating systems or I need a version of Windows for something specific that Linux isn’t suited for. I used to keep a copy installed by default, but lately I have been more resourceful in getting things done without Windows. This just happened to be one of those times when I had a new OS that I had never experienced before and I needed a platform to try it out on (the story on that later).

 I know that a lot of people still aren’t familiar with virtualization or how to set one up or what they would even want one for. There are also a lot of relatively new Linux users that still do the dual-boot system on their computers running Windows next to Linux and choose which system to run on start. When I started using Linux back in 2009, I did the very same thing so I could continue to be productive in my old ways while learning to accept change and migrate over to a Linux OS. Whatever the reasoning, often times Linux users still end up needing a copy of Windows for some reason or another now and again however, as each new release of the various Linux distributions improve in user interface, operation, and efficiency, I’m seeing less and less dependencies on the old Microsoft build.

 The dual boot system works fine for those who insist on having their OS have direct control to the hardware and network. The problem lies in the fact that some OS are more prone to infection and virus than other systems and if one of the two gets in deep enough trouble, it could render the entire machine useless and require a complete scrub and new install. By installing a second OS through means of a virtual machine such as Oracle’s VirtualBox, there is only one log in screen and when the need to use a secondary OS is required, a user just starts up the virtual instance just as if it were another program. If the secondary OS becomes unstable or infected in some way there is no complete loss, just scrub the virtual machine and install it again. Running two operating systems in this manner is far safer than trying to run side by side.

 Getting past a simple why and into the how-to section, obviously the first thing anyone is going to want to do is to visit the Oracle VirtualBox download page and find the correct version for their particular openSUSE distribution. I strongly suggest taking the time to read the documentation on this page and not just surf for the matching download to their particular system. It does make a difference as to whether or not a 32 or 64 bit will be the host OS. There are also a lot of hints, tips and tricks to installing VirtualBox on Linux so do your reading and save aspirin! While on the download page, make sure to also download the extensions pack that goes with the version of VirtualBox. The serial numbers should match on both.

 Once both the software and extension pack have been installed, don’t do anything with them just yet. As much as we would like, they are not ready to go right off the bat. There are a couple of things that need to be done prior to installing the first “guest” OS. Considering how popular the use of VirtualBox has become to Linux users over the last couple of years, I would hope that in future releases of openSUSE the programming engineers could make the installation a bit simpler, for now though it is what it is and that’s why I’m writing this how-to.

The next thing to do is go to YaST and in the search box on the upper left corner type in “DKMS”. Select the checkbox and install it. DKMS is an acronym for “Dynamic Kernel Module Support”. These packages are required for VirtualBox to generate Linux kernel modules for itself when updates are made and for driver support. No, I don’t know a whole lot about it except for the fact that the installation of VirtualBox will give an error when trying to initialize without it.


 After DKMS is installed then we can go ahead and get VirtualBox in. This should have been downloaded from Oracle as an RPM package. These are the best and easiest packages to deal with in openSUSE. They operate just like the old EXE files for Windows programs. Just click on the file and openSUSE will take care of the rest. Don’t get overly excited just yet however, there are still a number of steps we have to go through before we can actually get our guest OS up and running so just be patient and follow along. Once the loader is done doing its thing, go to the application launcher in the lower left corner and navigate to  Applications -> System -> Emulator and there should be the installation of VirtualBox. At this particular point I would actually suggest doing a right click and adding it to favorites since it will probably get used quite a bit in the beginning.


Once this is done there is another thing we need to do in YaST, so start this up and go to System -> System Services (Runlevel). For whatever reason there are dependencies for VirtualBox that do not initialize automatically so we are going to have to tell them to start with our system by default.



Once inside the runlevels interface up at the top, click on the radio button that says “Expert Mode”. Don’t worry about this too much, it’s not as intimidating as it sounds. Once the interface has changed scroll down to almost the bottom and look for the service called “vboxdrv” and click on it so that it is highlighted green or selected. For whatever reason, this is always “no” by default and it needs to be turned on for our program to work. Once selected, click on the button below that is labeled “Start/Stop/Refresh” and in that dropdown select “Start Now”. Next to the service the running indication should switch from no to yes. Once this is done make sure to click on the green button in the lower right corner labeled Ok and the setting will get saved. Now, every time the computer is started, this service will begin running automatically.


Once these steps are complete, we need to give ourselves permission to use our virtual application. This may seem odd, but this is the way it gets set up. So again go to YaST and navigate over to Security and Users -> User and Group Management. In the top tabs of this



screen select “Groups” and there should be a group called “vboxusers”. Highlight this group and at the bottom of the screen select “Edit”. In the next screen, in the column on the right look for your user name and check the box next to it then click “Ok”. You have now set permissions for yourself as being authorized to use VirtualBox.


The next hurdle to have to jump through is adding in some RPM groups associated with keeping all the kernel information cool with our virtual environment. These are loaded directly through the terminal so open one up of choice and log in as root. Now type in the following string and just select “y” every time it asks.

zypper in gcc make kernel-devel

Finally we have reached the point where we can re-boot the system so everything we changed gets set into place and start using our virtual environment.

I know this seems like a lot of work to set up a virtual machine, but once all is said and done, the payoff is totally worth it. I have actually had 4 different operating systems installed into one of these before for various levels of testing and trial purposes. One of the nice things is that a virtual machine can also be used for testing the same OS as the host before modifying the host itself. There are a number of good reasons for taking the time to install virtual machines besides being able to run Linux and Windows at one station. So I urge people to give it a try.

I also want to thank my friends over at openSUSE for helping me when I get stuck and motivating me to continue writing about my experiences and explorations with what I consider to be one of the most user friendly free OS available today. If for any reason these instructions aren’t working for anyone, please feel free to review the source I used to create them.
















Thursday, July 5, 2012

Set Up Google AdWords

1.   Go to Google AdWords and sign in with a Google Account



2.   Set time zone and currency type



3.   Be sure to select time zone carefully, it can not be changed once set!


4.   Create first ad campaign


5.   In the upper right hand corner is the customer number. Write this down and keep it in a  
safe place for future reference.



6.   Follow the step by step instructions on the left side.


7.   Select target advertising location (typically by zip code) and select “add”


8.   Select a daily budget for advertising. Typical start ranges are from $1 to $5 per day.



9.   It’s a good idea to have your business phone number (at a minimum) show up with your
      add.


10.  Determine the type of ad to be created and follow the instructions. For text only ads, fill in
      the required fields.


11.   An example of the ad will be created on the right as the fields are filled in. Make sure
       everything is exactly as you would want to see it on the internet.


12.   Select keywords that will trigger ad production when people search for things relevant to
       your business. Google states that most businesses find only 5-20 keyword phrases
       bring results to their business. However, it is possible to have up to 50,000 keywords
       associated with an ad campaign.


13.   Once all settings are complete for the AdWords campaign, complete the billing
information section.


Important things to remember. An advertising campaign can run anywhere from $30 to thousands per month, all depending on the company budget. The campaign settings in AdWords can always be changed or modified at any time; There is no “set in stone” configuration. The company is only charged when the ads are clicked on so it is good to be methodical about the advertising and the settings to target their selective service area and relevant words to the services the company provides.