Subscribe by Email

Your email:

Posts by Month

Follow Me

Current Articles | RSS Feed RSS Feed

VMware ESXi5 Lab Setup - Part 10 Standard vSwitch Part 3 VMnetwork

 

Salud...and welcome to my ongoing series of VMware Blogs. This is part 3 of the Standard vSwitch blog. In this part we will be creating a separate virtual switch for all of the ESXi Virtual Machine Traffic to travel over.

It is best practice to break up traffic types over several virtual switches. This is possible providing that you have enough physical nics to do this. As I have stated before even for a small 2 node cluster, I would recommend 8 NICs to take advantage of all of the networking options that VMware has to offer.

To start off go to Home/Inventory/Hosts and Clusters and click on the ESXi host that you want to work with.

Click on the Configuration tab in the left hand panel.

Click on the Networking Link. This will take you to the standard vSwitch layout.

Click on Add Networking...

 

vSphere Standard Switch 5 resized 600

This will open up the Add Network Wizard.

At the Connection Type screen, select Virtual Machine. We are selecting this one because we want to create a network for VM traffic.

Click on next.

 

Connection Type 5 resized 600

This will take you to the Network Access Screen. Here you will pick the NICs that you want to use for VM traffic.

You will need to take note of how your physical network is layed out. In the example we are going to use vmnic1 and vmnic5 because they are both on VLAN 104 with a subnet of 192.168.104.x.

Click on next.

 

Network Access

Next you will see the Connection Settings screen.

Keep the default Label of VM Network and the Default VLAN ID.

Click Next.

 

Virtual Machines Connection Settings resized 600

This will take you to the Summary screen.

Click on finished.

  Ready to Complete 6 resized 600

Once you click on Finished you will see a task for Updating Network Configs in the recent tasks screen.

When this is done you will see your new vSwitch in the VSphere Standard Switch Config.  Remember you should do this for each ESXi host you want to attach to this cluster.

 

VMware ESXi5 Lab Setup - Part 7a Preping your VM to install vCenter

 

Ciao.... welcome to part 7a of my ongoing series VMware ESXi5 Lab Setup. This post will be split up due to its length. The first part will be links to a lot of Windows administration that should be done prior to installing vCenter. Part b will be the actual install.

So far we have setup an ESXi host and we now have a virtual machine setup. The next part is to turn that virtual machine into something useful. We are going to install Virtual Center Server 5 on this machine.

The vCenter Server is the cornerstone of your virtual environment. This is a licensed product, so it takes you out from the realm of casual VMware tinker, into a paid customer. I have to say that it is worth the money. Just having the one place to manage your VM's from, and being able to clone your VM's makes a huge difference.

VMware has a best practices guide that is good to review, it is located here.

So as a prerequisite to this you will need to Create a physical or virtual server running windows server 2008 R2. I have gone over how to build a VM with this spec here, and how to install the OS here.

I have also create a side blog with how to logically add a hard disk to 2008 R2 Server here.

Now that we have the drive, we will need to rename the computer so that it follows some standard naming convention. Directions to do so can be found here.

You will find out that your life is easier if you have standards setup for your environment and you make sure everyone adheres to them. This can be difficult to start, but once you are in an outage and having to troubleshoot stuff, you will be glad that it was done.

Next we are going to give this a static IP address. This will be done in another side blog here. The nice thing with the side blogs are if you are familiar with the steps you can just do them and it speeds up the reading.

After this you will want to add the vCenter service account to the local admins group of the server. This was also done in a side blog here.

The other prerequisite is that you have the ISO file uploaded to storage that can be seen by the VM. This is covered in my blog about working with veeam FastSCP here.

You should be logged into the server a the vCenter-svc serivice account, or what-ever service account you would like to install vCenter under.

So we are going to start off by mounting the iso onto the virtual CD/DVD Rom Drive. You can click on the Icon CD/DVD drive / Connect to ISO image on a datastore...

 

Mount ISO resized 600

 

The Browse Datastores window will open up. Find the file that you want to load and click on ok.

Once the ISO is loaded depending upon your auto run configurations, you will either see a run autorun.exe pop up or you will have to go to the CD/DVD drive and run the auto run manually.

Once this is run you will get the VMware vCenter Installer main screen. In the left hand panel there are 3 headings. Under the top heading VMware Product Installers you will see the vCenter Server option highlighted.

In the right hand panel there is the details for the selection that you are on in the left panel, as well as an install button. Click on Install.

 

vCenter Server Installer

This will kick off the UAC to prompt you if you want the following program to make changes to the computer. Click on YES

You will then start the installation Wizard. At the InstallShield Wizard screen, click on OK.

 

InstallShield Wizard resized 600

If you do not have MS C++ installed you will see an installer for this flash by. No user interaction is required for this.

Once it is done unpacking stuff you will get the VMware vCenter Server Welcome Screen. Click Next.

vCenter Server Welcome resized 600

You will then see the End User Patent Agreement Read them all and look up each patent so you know exactly what VMware owns and then click next in 3 weeks.

The EULA screen, is next. Read through this and check the radio button if you agree to the terms and then Click Next.

At the Customer Information screen Fill out name and organization, if you have a License key put it in here, or this can be put in after the server is up and running. Click Next.

 

Customer Information resized 600

On the Database Options screen we are going to keep the default of Install MSSQL express instance. This is good for small scale installations up to 5 hosts and 50 VMs. The limit has to do with the 10Gb database limit of SQL 08 express.

You also have the option of pointing to an existing supported database. This must be a 64 bit DSN. Currently SQL08, SQL05, IBM DB2 and Oracle 10g and 11g are supported. There is a nice compatibility guide here. Always check with VMware when you are not sure.

 

Database Options resized 600

Continued in part b.

VMware ESXi 5 Lab Setup - Part 6 Adding a Virtual Hard Disk

 

Witajcie... to part 6 of my ongoing Blog of building an ESXi5 Lab.

This will be a quick blog in which we will go over how to add a virtual disk to an existing virtual machine. I am plugging this in as a separate blog because this will be something that you will have to do many times, and it will be easy to reference.

We are going to start off with a Windows Server 2008 R2 VM with one hard disk, with the operating system installed. You can see how to do the base config here and you can see how to do the OS installation here.

So from a powered down VM go to VM Edit Settings...

 

Edit Settings resized 600

This will open up the Virtual Machine Properties. Click on the Add... button.

Virtual Machine Properties resized 600

This will open up the Add Hardware Wizard. Select Hard Disk and click Next.

Add hardware resized 600

You will then see the Select a Disk Screen. Keep the radio button on the Default of Create a new virtual disk. Click Next.

Select a Disk resized 600

 

You will now see the Create a Disk Screen. In the Capacity section, fill out how large of a disk you would like to add.

In the Disk Provisioning section, we will select Thick Provision Lazy Zero. I picked this one because I did not want thin provisioning on this machine, but I also did not want to wait for VMware to Zero out the blank space on the disk.

In the location we will keep the default of storing with the Virtual Machine. Here you have the option of selecting where you would like to store the files that are created when making a virtual disk.

 

Create a Disk resized 600

Next we will see the Advanced Options section of the Wizard. In the Virtual Device Node section you can select where you want this disk to be in the hardware. Keep the default.

There is also a Mode Section that allows you to adjust how the disk behaves. We will not be enabling this. Again keep the default and click Next.

 

Advanced Options resized 600

Finally we get the Ready to complete screen. Review the settings and click Finished.

Ready to Complete resized 600

This will take us back to the Virtual Machine Properties. You can see that the new disk is highlighted. Click on OK to process the request.

Virtual Machine Properties1 resized 600

If you look at the vSphere client you can see the system adding the virtual disk.

vsphere resized 600

That is all there is to it. The next steps are to go into the operating system and logically add the disk. When you power on the virtual machine the OS will see the new "physical" hardware. We will go over this as a sub step in the next part.

Storing settings in C# Using Nini .NET Configuration Library

 

When developing a desktop application, there will be times when you want to store settings for your program. A database is one option, but on Windows, you might just wish to have your settings stored in an INI file. One way to work with an INI file in C# is with the Nini Library. This makes it quite easy to read from and write to an INI file.

Let’s get started.

After installing the library, we’ll need to set our namespace.

describe the image

What will our INI file look like? Something like this:

INI File

For my application, I decided to make a class devoted to the configuration file. So, let’s define that and a few other variables.

Define variables

Now that we have our variables declared, let’s create a couple of useful methods.

Creating methods

These two methods will update the INI file with new settings, should we change them in our program. Of course, if we make these changes, they need to be saved. Thankfully, we can declare something in our constructor (which we will write a little later) that will auto-save our changes as we make them.

set autosave

Now, let’s create a pair of methods to return the data. This will be useful in our program when we need to use these settings.

methods to return the data

With these methods, we now have a basic class for handling a configuration file. All that is left is our constructor.

But before we get to the constructor, there is something else I created. What if our INI file doesn’t exist? I decided that I would make a function to create a default INI file, should the old one not exist anymore. This is also useful if we want to distribute our program without an INI file.

create a default INI file

We can do a check when we initialize our class that will check to see whether or not this file exists. If not, we’ll create it so we can work with it.

That makes this our constructor:

making the constructor

Our whole class thus looks like this:

the whole class

That’s how simple it can be to work with your own INI files in C#.

Did you find this useful? Let me know in the comments!

 

 

 

All Posts