vmware

Failed to connect virtual device ethernet0

Posted by robd on May 04, 2017
vmware, vSphere / 2 Comments

Today I noticed a NIC was down on a VM, had a look and noticed it was disconnected:

 

 So I ticked the box and clicked ok and got the follow error:

Weird, so I thought I’d check the port ID for that virtual switch:

Looks like something else is on that port id:

Scroll down the list to find a free port ID and then go back to the VM and change the port ID and boom you should be able to connect.

Tags: , ,

VMware – Increase disk past 2TB

Posted by robd on February 16, 2017
vmware, vSphere / 1 Comment

Tried to increase a disk past 2TB today on a VM on a ESXi 6.0.0 (via vSphere) host but kept getting this:

Well it was driving me nuts until I turned the VM off and tried again…..it worked.

Tags: , ,

VDI Images with VMware Tools SVGA driver – Warning!

Posted by robd on April 16, 2016
Citrix, vmware / No Comments

If you are building a Client/Server that is going to be used in a VDI environment don’t install the VMware SVGA WDDM driver as part of the VMware tools install.

 

It can cause issues like Black screens, Users not connecting etc and the first step Citrix get you to perform is to remove them, with XenDesktop this is fairly easy but time consuming with VDI-in-a-Box you can’t…

 

For XenDesktop, If you have installed them you can us the follow these steps to remove the driver:

  • Remove VDA agent(s)
  • Reboot
  • Remove VMware Tools
  • Reboot
  • Install VMware tools (Custom install without SVGA driver)
  • Reboot
  • Install VDA agent(s)
  • Reboot
  • Update the Catalogue

 

For VDI-in-a-Box, If you have installed them you can us the follow these steps to remove the driver:

  • Start again with new image.

 

Notes:

If you already have it installed and it’s not causing any issues you can leave it as is.

If you don’t remove the VDA agent before Uninstall/reinstall VMware tools, the guest will break.

VDI-in-a-Box installs the VDA agents when you import the image, you can’t get them any other way. (confirmed by Citrix Support)

 

Both these links mention VMware 4.1 U1 but Citrix have confirmed it is still affects later versions.

http://support.citrix.com/article/CTX123952

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1011709

Tags: , ,

VMware vCenter Server 5.5 Database is Full

Posted by robd on May 27, 2015
SQL, vmware, vSphere / 9 Comments

So today a vCenter Server Service wouldnt start Java was going mental and we kept seeing event IDs 1105 and 1827.  So what this means is our SQL Express instance reached the limits the size of databases i.e. 10GB on SQL Express 2008 R2.

Error_event1

Error_event

You can confirm this by looking at the size of the VIM_VCDB.MDF file in c:\program files\Microsoft SQL Server\MSSQL10_50.VIM_SQLEXP\MSSQL\Data, if its 10GB then your in trouble.

So the first thing to do is fire up Microsoft SQL Server Management studio and run a standard report against the VIM_VCDB by right clicking the DB > Reports > Standard Reports > Disk Usage by Top Tables:

Error1

From here you can see which tables are causing the problems, in my case its dbo.VPX_EVENT_ARG which is massive.

So from here you need to purge the above table:

  1. From Microsoft SQL Server Management studio
  2. Click databases to expand and select VIM_VCDB > Tables.
  3. Right-click the dbo.VPX_PARAMETER table and select Open.Note

    : If you are using SQL Server 2008, right-click the dbo.VPX_PARAMETER table and click Edit Top 200 Rows.
    Error3

  4. Modify event.maxAge to 30, and modify the event.maxAgeEnabled value to true.
  5. Modify task.maxAge to 30, and modify the task.maxAgeEnabled value to true.

Error5.5

Error5

  1. Next run a built-in stored procedure to shink the logs:
  2. Go to VIM_VCDB > Programmability > Stored Procedures.

Error6

3. Right-click dbo.cleanup_events_tasks_proc and select Execute Stored Procedure. This purges the data from the vpx_event, vpx_event_arg, and vpx_task tables based on the date specified for maxAge.

Now the records have been purged you need to shrink the DB:

  1. As before connect using SQL Server Management Studio.

ExecuteScript

2. Right click on the VIM_VCDB database and New Query, when the white SQLQuery box opens type the below and click ! Execute

3. It’ll start running and when its finished you should see:

ExecuteScript2

Check the size of the file again and you should be able to start the services.

 

Tags: , , , ,

How to add a vlan on VMWare (in my case to use with Citrix):

Posted by robd on December 19, 2014
Citrix, vmware / No Comments

My current Citrix XenDesktop environment has out grown its original IP scope and I wanted to move it to a new dedicated VLAN with scope to grow even more. Below is brief guide in the steps taken.
Stage 1 – Creating the DHCP Scope
•    Logged onto your DC and open DHCP, drill down on IPv4, right click and select New Scope.
1
•    Give the Scope a name “Citrix Guest VM’s” and description.
2
•    Enter the IP range you would like addresses DHCP to give out (it always a could idea to leave some spare at the end for static IPs)
3
•    Add any exclusions you wish
•    Lease duration I left default of 8 days
•    Proceed to “Yes, I want to configure these options now”
•    Default Gateway is the IP address you will assign your Core Switch / Router in your network when creating the VLAN in the next stage. 192.168.25.254
4
•    Next select/enter your DNS servers
•    WINS Server if any
•    Active Scope – Select “Yes, I want to activate this scope now”
•    Finish

Stage 2 – Creating a new VLAN
In my environment we use HP Procurve Switches, so the following config are HP cmds.
•    Log on to your Core Switch / Router and use the follow config.

Config Break down
1 Enter configuration mode
2. Created VLAN 3025
3. Naming the VLAN
4. Creating the default gateway ip address for the VLAN
5 & 6. DHCP Servers
7. Tagging – You need to tagged any ports you would like to traffic to run through, see below.
8. Exit VLAN config
9. Save
Tagging
You need to proceed to create the VLAN and tagged the ports through your network you intend the traffic to run through. In my situation I stated by creating the VLAN on both core switches and had to tagged ports through to my server rack switches and then uplinks to my ESXi Hosts.
5
Testing
Once all the tagging was done I wanted to do some testing before I moved onto VMware VCentre.
From my core switch I untagged a port on VLAN 3025 (untagged assigns an the device connected to that port the IP in that specified VLAN). Plugged in my laptop and check the address assigned. It was a success I received a address from the 192.168.25.0/24 range, I could double check this by looking at the address leased on the DHCP server.
If you was not successful at this point please go back and review as the stage will not work

Stage 3 – VMware VCentre
•    Adding the Virtual Machine Port Group  (VLAN) onto a vSwitch (virtual switch) in VMware
Open up VMware Client, navigate to the your Cluster
– Select your host (if you have mulitple you will need to do this to all of them)- Select the Configuration tab
– Select Networking from the left side menu
– Click ” Add Networking at the top”
6
Add Virtual Machine, click next
7
Select the vSwitch you are currently using, for exmaple mine is “vSwitch0″
8
Give the Port Group a name, i suggest using the same as the VLAN on the physical switches.
Enter the VLAN ID – 3025
9
View Summery and Click Finish.

You have now added a new VLAN (port Group) into VMware ESXi and can now been given to VMs, in our case our VDI solution.
To check this, edit any VM which is sitting on any of the host you have just configured, select the NIC and you should be able to drop now the menu to select “Citrix Guest VMs” network.

10

Now this is great, you are able to change the VM to a new network…… but I have 200 VMs!
It is not feasible to sit there and manually reconfigure and 200 machines and reboot them, plus you would be taking down your environment for a long time.
Stage 4 – VMware vSphere PowerCLI
How to automate the NIC change for multiple VMs
1. Download VMware vSphere PowerCLI

2. Install and connect to you Vcentre Server

11
Once Successfully connected you can start issuing powershell commands. Use get-vicommand to see a list of all PowerCLI commands.
To complete this task we just need:
– The list of machines from the XenDesktop machine catalog.
Commands used:

Scenario:
– Machine Catalog Name: “Admin Desktop”
– Machine names: “monvdiad##”
-Current Network: “Server Network”
-New Network: “Citrix Guest VMs”
** Make sure the account you are using have elevated rights in vSphere
PowerCLI Commands to change VLAN
To obtain a list of all XenDekstop VMs in that catalog issue following command use the wildcard display all machines that start with “MONVDIAD*”

If the above query returns the list of the correct VM’s then proceed to change the NIC with the code below.

Press “A” to accept the changes and watch the magic begin.
Once complete I personally would give the affected VM’s a reboot with the following cmd

Again press “A” to accept
You can check your work by manually check a VM or issue the following cmd which will query and display any VM using “Citrix Guest VMs” Port Group as a selected network.

Jobs a good un!

Tags: , , , , ,

Sound from a VM on ESXi

Posted by robd on March 05, 2014
vmware, vSphere, Windows 7 / 3 Comments

So I have a ESXi 5.1 set-up at home where I have a few Windows 7 machines running.  After connecting to a win7 VM the other day via RDP I noticed no sound was being passed.  Sound was enabled via RDP which left the VM itself, after some digging I found I had to edit the VMX file of the VM to add sound.  So after turning the VM off and browsing to the datastore I downloaded the VMX file and added these entries:

sound.present = “TRUE”

sound.virtualDev = “es1371”

sound.fileName = “-1”

sound.autodetect = “TRUE”

sound.startConnected = “TRUE”

Once I re-uploaded the VMX, Boom (literally), sound!!

Tags: , , , , ,

Technical Interview Questions

Posted by robd on September 11, 2013
Active Directory Sites and Services, exchange, vmware / No Comments

Recently put together some technical questions for a interview, thought I’d share some of them with you:

 

VMWare
Explain about your production environment? How many cluster’s, ESX, Data Centres, H/w etc ?
How does VMotion works? What’s the port number used for it?
How does HA works? Port number? How many host failure allowed and why?
How do DRS works? Which technology used? What are the priority counts to migrate the

VM’s?
How do snap shot’s works?
What are the common issues with snapshots?
What’s the difference between ESX and ESXi?
Storage team provided the new LUN ID to you? How will you configure the LUN in VC?
What would be the block size (say for 500 GB volume size)?
What are notable files that represent a VM?
What is a template in VMware

Network
What is a MAC Address?
What are the main advantages and disadvantages of Fibre-Optic-based networks?
What are the OSI Layers
What is the difference between TCP and UDP?
What is a TCP Session?
What is ICMP?
What is the (default) class type of 195.152.12.1?
How does a TCP connection establish a connection
What is ARP?
Name 5 common Ports?
Explain how the HTTPS hand shake works
What is a VLAN ?
What is VLAN Tagging? Why?

AD & DNS
What are the FSMO roles
What is a Global catalogue server
How do you manually create SRV records in DNS
How would you fix a broken DC that reps between site
What’s a conditional forwarder
How do I clear the DNS cache on the DNS server?
What is WINS and when do we use it?
Where is the AD database held?
Trying to look at the Schema, how can I do that?
What are GPOs?

Exchange
What roles does Exchange 2010 use?
What is a DAG
What does this line of Power Shell mean: get-mailbox  | ft Name

SQL
What is a full and basic backup
How would you restore a SQL server to another environment
How would you backup a SQL server

 

Tags: ,

ESXi 5.0 – The free one

Posted by robd on June 14, 2012
ESXi 5.0, vmware / 6 Comments

So I tried to install ESXi 5.0 (the free edition) on a Dell OptiPlex 790 yesterday when I ran into a few issues with the Integrated Intel® 82579LM Ethernet LAN 10/100/1000 network card!!

Basically I kept getting this message:

So after some annoyance I found out I could inject the drivers for the network card into a ISO and obviously from there create a CD and install ESXi!!

So here how I did it:

  1. Download ESXi-Customizer (by Andreas Peetz) from here: http://v-front.blogspot.co.uk/p/esxi-customizer.html
  2. Download the drivers that have been adjusted for ESXi from here: http://dl.dropbox.com/u/27246203/E1001E.tgz
  3. Start ESXi-Customizer, browse to the ESXi ISO, browse to the above drivers, browse to where you want the new ISO going! Click RUN!
  4. Bun the ISO and jam it in your 790!!

Job Done!

Tags: ,

Reset VMware ESX 4.1 Trial License Period

Posted by robd on January 15, 2012
vmware / No Comments

To reset the VMware ESXi 4.1 trial license period without re-installing your host, do the following:

  • Press Alt-F1 to get to the login prompt
  • Login as root
  • cd /etc/vmware
  • rm -r vmware.lic
  • rm -r license.cfg
  • Reboot
Copy Protected by Chetan's WP-Copyprotect.