Virtualization - Cloud

Month: May 2016

Find master image used by machine catalog

To load Citrix snappins ,  you need to add the Citrix powershell snapins. To do so, type : Add-PSSnapin citrix*  or asnp citrix*

Get-ProvScheme is the powershell command provides the details of provisioning scheme & Master Image

Note: The above details can also be fetched by logging to SQL configuration database(Table: DesktopUpdateManagerSchema.ProvisioningScheme))

Syntax:
MasterImageVM : XDHyp:\HostingUnits\<Hosting Resource Connection Name>\<Master Image Name>.vm\Citrix_XD_<Catalogue Name>.snapshot

ProvScheme

Note:
  • Above POST created based on personal experience & knowledge for personal reuse.
  • In case, if you wish you to use the above article, use the above steps upon proper testing and reader will be responsible for any outcome.

Recovering VM’s from Failed Pool Member -XenServer

Few months back, I had an issue with one of the xen server, we had 2 servers (Server1 & Server2) in a pool. server1 is down and unable to bring it up due to hardware issue.

Troubleshooting’s:

  • Not able to connect SERVER2 with Xen center
  • Login to -> Putty to SERVER2 , issued the command to su –   To change shell to super user mode
  • Issue the command xe vm-list & xe host-list -> Check server is displaying VM’s or host , if not execute below commands
  • Issue the command xe-tool-stack-restart  -> To display the VM’s & host, by issuing this command VM’s & server will not have any impact
  • After issuing above command , all xen server commands are working and able to see host & VM list
  • Currently SERVER2 is a slave , issue the below command to force SERVER2 as a master
    • xe pool-emergency-transition-to-master
  • Now the SERVER2 is a master, issue the below command to know the which xen servers are false or live  and  to know UID’s

xe host-list params=uuid,name-label,host-metrics-live

Xen1

  • Collected the Xen Server UID from above screenshot and issue the below command to know which VM’s are running on the failed server

xe vm-list is-control-domain=false resident-on=fdd15cbc-42ce-4154-8731-9a469ce04976  (Format : xe vm-list is-control-domain=false resident-on=UUID_of_failed_server)

Xen2

  • It displayed all VM;’s which are running on failed server , collect the VM UID and issue the VM power reset  command as below

Format :  xe vm-reset-powerstate uuid=<UUID_of_the_VM_to_recover> –force

  • xe vm-reset-powerstate uuid= 26177b43-eb3e-5d49-ee09-a93bfdca1bbc–force
  • xe vm-reset-powerstate uuid= cb3f18ac-846c-ae46-1bbe-3c6e2ea6560a–force
  • By issuing above commands, VM’s registered in Xencenter and it is visible, powered on each VM.

Xen3

Note:
  • Above POST created based on personal experience & knowledge for personal reuse.
  • In case, if you wish you to use the above article, use the above steps upon proper testing and reader will be responsible for any outcome.

VHD/X Disk Compact/Shrink Difference between 2008 & 2012 Version’s

Difference between Compact & Shrink in Windows Server 2008 & 2012 versions is,  in Win2008( for VHD)  it  compact’s & shrink if you select Compact option whereas in 2012(for VHDX) we need to shrink if you want to reduce the VHDX size and compact will do only compacts.

Note:

  • You will get shrink option only for VHDX format files.
  • You can run Power shell command to shrink VHD files – This is Good for VHD format files as it compacts and shrinks from command prompt
    • Mount-VHD -Path “C:\ClusterStorage\Volume7\Test\test.vhd” -Readonly   –> This will mount the VHD (VM need to be turned off)
    • Optimize-VHD -Path “C:\ClusterStorage\Volume7\Test\test.vhd” -Mode Quick   –> This will do compacts & shrinks
    • Dismount-VHD “C:\ClusterStorage\Volume7\Test\test.vhd” –> This will dismount the VHD from Disk Management

Hyper-v PS1

Windows Server 2012 ->Edit Disk  Option for VHDX type of Files Hyper-v VHDX-Pic1 Windows Server 2008->Edit Disk  Option for VHD type of Files

Hyper-v VHD-Pic2

Note:

  • Above POST created based on personal experience & knowledge for personal reuse.
  • In case, if you wish you to use the above article, use the above steps upon proper testing and reader will be responsible for any outcome.

© 2024 Tech Blog

Theme by Anders NorenUp ↑