Problem:
@View Administrator this error will appear: Error During provisioning: View Composer Fault: Virtual Machine with input specification already exists.
You’ll also see this from the Desktop Pool:
After several tests with View Administrator (creating and deleting pools and VMs) and attempting to create a new Desktop Pool, the previous error will indicate that some of the machines already exists, this might happen when a delete operation is not completed by View Administrator and you wish to create new ones with the same name.
If you go and check the ADAM database to try to remove the VMs, you will find out the VMs are not present. Check my previous Post.
Environment
- Windows Server 2012R2
- Horizon View 6
Solution:
TO REMOVE A SINGLE VM:
@View Composer Server
1. Open Command Prompt.
2. Locate SviConfig at:
- 32-bit servers: Install_drive\Program Files\VMware\VMware View Composer
- 64-bit servers: Install_drive\Program Files (x86)\VMware\VMware View Composer
3. Remove the machine with the following command:
SviConfig -operation=RemoveSviClone -VmName=VMname -AdminUser=TheLocalAdminUser -AdminPassword=TheLocalAdminPassword -ServerUrl=TheViewComposerServerURL
Where:
- VMname is the name of the virtual machine to remove.
- TheLocalAdminUser is the name of the user who is part of the local administrator group. The default value is Administrator.
- TheLocalAdminPassword is the password of the administrator used to connect to the View Composer server.
- TheViewComposerServerUrl is the View Composer server URL. The default value is https://localhost:18443/SviService/v2_0.
- For VMware View Manager 5.1 and later, TheViewComposerServerUrl is the View Composer server URL. The default value is https://localhost:18443/SviService/v3_0.
- For VMware View Manager 6.0, TheViewComposerServerUrl is the View Composer server URL. The default value is https://localhost:18443/SviService/v3_5.
For Example:
C:\Program Files (x86)\VMware\VMware View Composer>SviConfig -operation=RemoveSviClone -VmName=VM002 -AdminUser=Administrator -AdminPassword=123456 -ServerUrl=https://localhost:18443/SviService/v3_5
In the previous example I wanted to delete the virtual machine named VM002, user/password are Administrator/123456 and VMware View Manager 6.0 is used.
TO REMOVE A VM’s BATCH:
This will be the ideal scenario; several machines will get stuck with old given names.
1. Create two files using notepad
2. Copy all the virtual machines names to a "desktops.txt" file, you can use Excel to generate the names and then copy them to the txt file to easily complete this task.
3. In other txt file copy this line, then save it as a .bat.
FOR /F %%A in (desktops.txt) DO sviconfig -operation=removesviclone -vmname=%%A -adminuser=administrator -adminpassword=!123456 -ServerUrl=https://localhost:18443/SviService/v3_5
Note: Those two files (.txt and .bat) must be allocated inside the VMware View Composer folder, with SviConfig file.
4. Then execute the .bat file by double-clicking on it and wait until it finishes. All the VMs from the .txt file will be deleted.