(Vmware-Virtualbox-MS Hyper-V)
With Sun Virtual Desktop Infrastructure software, we can deploy a number of virtual desktop operating systems and access these operating systems from a variety of client devices .
Administrating Virtual Desktops by Using VDA-Tools
When we talking about the cloning process we suppose that a virtual machine is already imported before cloning template. Cloning is the fastest and most efficient way to populate a pool.
Before starting we need to put some definitions:
user = Users and groups from the user directory
group = Local groups of users that are not in the user directory
directory = Active Directory or LDAP information is stored
token = Smart cards identifiers for users in a Sun Ray environment
pool = Collection of desktops
desktop = Desktops managed by Sun VDI
provider = Desktop providers that encapsulate the details of the underlying virtualization technology
job = Action executed in the background
settings = Global settings that apply to the Sun VDI system
And some general actions that:
list = Lists all the objects
show = Shows the detailed properties/status of an object
setprops = Sets the properties of an object
getprops = Gets the properties of an object
add = Adds an object
create = Creates an object
remove = Removes an object
delete = Deletes an object
And some example of sub-commands:
user-show = Shows the desktops available for a user
group create = Creates a new local group with specified properties
token-setprops = Edits the properties of the token
pool-list = Lists all pools
desktop-delete = Deletes the desktops
provider-disable-host = Disables the hosts for the Virtual- Box desktop provider. Disabled hosts are not used for automated cloning.
Creating Desktop Providers and Pools
Creating VMware vCenter Desktop provider:
sarge@David:~$vda provider-vc-create -p name="VC-provider",host=wwwhost,username=Admin
Creating Virtualbox Desktop provider with 2 host and 1 storage:
sarge@David:~$vda provider-add-host -p name=”VB provider”
sarge@David:~$vda provider-add-host -p host=1st.vb.com,port=443,username=root "VB provider"
sarge@David:~$vda provider-add-host -p host=2nd.vb.com,port=443,username=root "VB provider"
sarge@David:~$vda provider-add-storage -p host=zfs.com,username=root,zfspool=vda_zfspool "VB provider"
Creating Pool for storing Virtualbox templates:
sarge@David:~$vda pool-create -p name="Templates",provider="VB provider",assignment-
type=personal
sarge@David:~$pool-vb-import -p vdi- image=template.vdi,xml-configuration=golden-master.xml Templates
Creating a pool for cloning 30 desktops from VMware vCenter. First list the templates from the
vCenter, and select one of them:
sarge@David:~$vda provider-list-templates "VC provider"
NAME ID PATH
XP-Template vm-134 [Datacenters, ADatacenter, vm]
XPClone vm-629 [Datacenters, ADatacenter, vm]
sarge@David:~$vda pool-create -p name="VC pool",provider="VC provider",template=vm-134, preferred-size=30,free-size=5,max-size=35,power-state=on,assignment- type=flexible,recycle-policy=reuse,idle-timeout=2
sarge@David:~$vda pool-start "VC pool"
Configuring the User Directory - configures a LDAP directory using simple authentication, the default 389 port, a fallback LDAP server, and no restriction on the base DN:
sarge@David:~$directory-add -p auth- type=simple,hosts=my.ldap.com;secondary.ldap.com,username='"cn=Admin,ou=people,dc=my,dc=company,dc=com"'
Configuring an Active Directory using Kerberos authentication:
sarge@David:~$vda directory-add -p auth- type=kerberos,addomain=my.company.com, username=Admin
Assigning Pool and Desktop to Users: We are going to assign the user “Stefan Uygur” to the pool “VC-pool”. Once complete, Stefan Uygur will be dynamically assigned a desktop from the VC-pool each time he logs in:
sarge@David:~$vda user-assign -p "VC pool""cn=Stefan Uygur,ou=people"
Lists the desktops in the pool “Static pool” and permanently assign one of them to the user “Stefan Uygur”. Each time Stefan Uygur logs in, he will get the same desktop:
sarge@David:~$vda pool-desktops "Static pool"
NAME ID MACHINE STATE STATUS DN
WinXP0001 11 Running Used cn=Stefan Uygur,ou=people
WinXP0002 12 Powered Off Available -
sarge@David:~$vda user-assign -d stefanuygur
Listing the Desktops and Pools Assigned to a User:
sarge@David:~$vda user-show stefanuygur
VDA Sub-Commands:
sarge@David:~$vda –help or -?
Sun Virtual Desktop Infrastructure Administration
Usage: vda
-?, --help: Print this help list
-V, --version: Display the version
User Subcommands:
user-search: Search for users/groups in the user directory that match the specified search criteria
user-show: Show the desktops available for the user
user-desktops: Show the desktops assigned to the user
user-assign: Assign users to pools or desktops
user-unassign: Unassign users from pools or desktops. If no pool or desktop is specified, all
assignments are removed from the users
user-defaultdesktop: Make the desktop the default desktop for the user
user-personaldesktop: Make the desktop a personal desktop for the user
Custom Groups Subcommands:
group-list: List all custom groups
group-create: Create a new local group with the specified properties
group-delete: Delete the custom group
group-getprops: List the properties of the custom group
group-setprops: Edit the properties of the custom group
group-show: Show the pools assigned to the custom group
group-assign: Assign custom groups to pools
group-unassign: Unassign custom groups from pools. If no pool is specified, all assignments are
removed from the custom groups
Token Subcommands:
token-search: Search for tokens that match the search criteria
token-create: Create a new token (smart card id)
token-remove: Remove the specified tokens from the system
token-getprops: List the properties of the token
token-setprops: Edit the properties of the token
token-unsetprops: Remove the properties of the token
token-show: Show the desktops available for the token
token-desktops: Show the desktops assigned to the token
token-assign: Assign tokens to pools or desktops
token-unassign: Unassign tokens from pools or desktops. If no pool or desktop is specified, all
assignments are removed from the tokens
Pool Subcommands:
pool-list: List all pools
pool-create: Create a new pool with the specified properties
pool-delete: Delete the pools and their desktops
pool-getprops: List the properties of the pool
pool-setprops: Edit the properties of the pool
pool-resetprops: Reset the properties of the pool to their default value
pool-unsetprops: Unset the properties of the pool
pool-show: Show detailed information about the pool
pool-desktops: List all desktops from the pool
pool-templates: List all templates from the pool
pool-vb-import: Import VirtualBox desktops into the pool
pool-vb-import-unmanaged: Import unmanaged VirtualBox desktops into the pool
pool-vc-import: Import VMware vCenter desktops into the pool
pool-hv-import: Import Microsoft Hyper-V desktops into the pool
pool-start: Start automatic cloning of desktops for the pools
pool-stop: Stop automatic cloning of desktops for the pools
pool-enable: Enable users to connect to flexible desktops from the pools
pool-disable: Disable users from connecting to flexible desktops from the pools
pool-create-sysprep: Create a Sysprep file for the pool. Valid only for VirtualBox pools
Desktop Subcommands:
desktop-delete: Delete the desktops
desktop-show: Show detailed properties of the desktop
desktop-getprops: List the properties of the desktop
desktop-setprops: Edit the properties of the desktop
desktop-template: Convert the desktops to templates. Valid for VirtualBox and Hyper-V desktops
desktop-duplicate: Duplicate the desktop. Valid for VirtualBox and Hyper-V desktops only
desktop-start: Start the desktops
desktop-stop: Shutdown the desktops allowing the OS to save all information first
desktop-restart: Restart the desktops
desktop-suspend: Suspend the desktops
desktop-logoff: Logoff user sessions. Valid for Microsoft Remote Desktop Services desktops only
desktop-disconnect: Disconnects user sessions. Valid for Microsoft RDS desktops only
desktop-mount-iso: Mount an ISO image on the virtual machine.
desktop-unmount-iso: Unmount an ISO image from the virtual machine.
desktop-activate: Activates a defective desktop.
desktop-export: Exports a desktop.
Template Subcommands:
template-show: Show detailed properties of the template
template-revisions: List all revisions from the template
template-start: Start the templates
template-suspend: Suspend the templates
template-stop: Shutdown the templates allowing the OS to save all information first
template-restart: Restart the templates
template-delete: Delete the template with all its revisions
template-desktop: Copy the template to a new desktop
template-revert: Revert the template to the most recent revision.
template-export: Exports a template to disk
template-create: Copy the revision to a new template.
template-getprops: List the properties of the template
template-setprops: Edit the properties of the template
template-mount-iso: Mount an ISO image on the virtual machine.
template-unmount-iso: Unmount an ISO image from the virtual machine.
Revision Subcommands:
revision-show: Show detailed properties of the revision
revision-create: Create a new revision of a template.
revision-delete: Create a new revision of a template.
revision-getprops: List the properties of the revision
revision-setprops: Edit the properties of the revision
revision-clone: Create a cloned desktop from a revision in the revision's pool.
revision-desktop: Copy the revision to a new desktop
revision-sysprep: Execute System Preparation for a revision.
revision-export: Exports a revision to disk
Desktop Provider Subcommands:
provider-list: List all desktop providers
provider-vb-create: Create a new VirtualBox desktop provider
provider-vc-create: Create a new VMware vCenter desktop provider
provider-hv-create: Create a new Microsoft Hyper-V desktop provider
provider-ts-create: Create a new Microsoft Remote Desktop desktop provider
provider-delete: Delete the desktop providers
provider-vb-getprops: List the properties of the VirtualBox desktop provider
provider-vb-setprops: Edit the properties of the VirtualBox desktop provider
provider-hv-getprops: List the properties of the Microsot Hyper-V desktop provider
provider-hv-setprops: Edit the properties of the Microsot Hyper-V desktop provider
provider-ts-getprops: List the properties of the Microsot Remote Desktop desktop provider
provider-ts-setprops: Edit the properties of the Microsot Remote Desktop desktop provider
provider-vc-getprops: List the properties of the VMware vCenter desktop provider
provider-vc-setprops: Edit the properties of the VMware vCenter desktop provider
provider-show: Show detailed information about the desktop provider
provider-list-hosts: List all hosts for the VirtualBox, Microsoft Hyper-V or Microsoft Remote
Desktop desktop provider
provider-add-host: Add a host to the VirtualBox, Microsoft Hyper-V or Microsoft Remote
Desktop desktop provider
provider-remove-host: Remove the hosts from the VirtualBox, Microsoft Hyper-V or Microsoft
Remote Desktop provider
provider-enable-host: Enable the hosts for the VirtualBox or Hyper-V desktop provider. Enabled
hosts are used for automated cloning
provider-disable-host: Disable the hosts for the VirtualBox or Hyper-V desktop provider. Disabled
hosts are not used for automated cloning
provider-migrate-host: Migrates desktops off the specified host. Valid only for the VirtualBox
provider-host-getprops: Lists the properties of the specified Host of a Desktop Provider. Valid for
VirtualBox and Hyper-V
provider-host-setprops: Update the properties of the specified Host of a Desktop Provider. Valid for
VirtualBox and Hyper-V
provider-list-storage: List all storages for the desktop provider
provider-add-storage: Add a storage to a VirtualBox or Hyper-V desktop provider
provider-remove-storage: Remove the storage from a VirtualBox or Hyper-V desktop provider
provider-enable-storage: Enables the specified storage. Valid only for a VirtualBox or Hyper-V
desktop provider
provider-disable-storage: Disables the specified storage. Valid only for a VirtualBox or Hyper-V
desktop provider
provider-suspend-storage: Suspends the specified storage. Valid only for a VirtualBox or Hyper-V
desktop provider
provider-replace-storage: Replace a storage. Valid only for a VirtualBox or Hyper-V desktop
provider
provider-storage-getprops: Lists the properties of the specified storage of a Desktop Provider. Valid
for VirtualBox and Hyper-V
provider-storage-setprops: Update the properties of the specified Storage of a Desktop Provider.
Valid for VirtualBox and Hyper-V
provider-list-templates: List the templates for the desktop provider
provider-list-unmanaged: List the desktops from the VMware vCenter that are not managed by any
desktop provider
provider-list-networks: List all networks for the desktop provider
provider-rename-network: Renames a network for the desktop provider
User Directory Subcommands:
directory-add: Add the user directory configuration to the system
directory-remove: Remove the user directory configuration from the system
directory-getprops: List the properties of the user directory
directory-setprops: Edit the properties of the user directory
directory-show: Show the configuration details for the user directory
Global Settings Subcommands:
settings-getprops: List global settings
settings-setprops: Edit global settings
settings-resetprops: Reset global settings to their default value
Job Subcommands:
job-list: List the existing jobs
job-show: Show the job details
job-cancel: Cancels the specified running jobs
job-wait: Wait until the job ends
Each subcommand has its specific options and arguments. Specify --help after the subcommand name to display its usage.
Sun Virtual Desktop Infrastructure Administration webadmin command:
vda-webadmin start (start the service)
vda-webadmin stop (stop the service)
vda-webadmin restart (restart service)
vda-webadmin status (query and print the service status)
vda-webadmin enable (enable the service to start at system boot)
vda-webadmin disable (disable service to start at system boot)
vda-webadmin -h (print a usage message)
Sun Virtual Desktop Infrastructure Administration vda-db-status:
vda-db-status -i -x -s -h (current db, no header, short db, usage)
Sun Virtual Desktop Infrastructure Administration vda-service:
vda-service start
vda-service stop
vda-service restart
vda-service status
vda-service -h
Sun Virtual Desktop Infrastructure vda-client
vda-client [-i] [-p port] [-m [-t token] [-u user] [-P pool] [-D desktop]
Some Examples of Commands:
Start automatic cloning in a pool, 000=pool number:
sarge@David:~$ vda pool-start POOL000
Assign a new token to a user:
sarge@David:~$ vda token-create -p token-id=TokenID, user=UserID
Assigning an existing token to user “sarge”:
sarge@David:~$ vda token-setprops -p t user=sarge
Assigning token to existing desktops listed:
sarge@David:~$ vda token-assign –desktop=DesktopID TokenID
sarge@David:~$ vda pool-desktops “Ondemand – Oracle” (here we will get the desktop Id=33 for ex)
sarge@David:~$ vda token-assign –desktop=33 TokenID
Assigning an existing token to to a pool:
sarge@David:~$ vda token-assign –pool=”Ondemand - Oracle” TokenID