Hüseyin Göksin Blog

Bilgi paylaştıkça çoğalır….

2008 standart serveri entr. upgrade

To determine the installed edition, run:
DISM /online /Get-CurrentEdition

To check the possible target editions, run:
DISM /online /Get-TargetEditions

Finally, to initiate an upgrade, run:
DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

For example, to upgrade to Enterprise from a downlevel version, run:
DISM /online /Set-Edition:ServerEnterprise /ProductKey:489J6-VHDMP-X63PK-3K798-CPX3Y

Reklamlar

Filed under: Server2008

RDP Bloke sorunu (how-to-logoff-remote-desktop-sessions-via-command-line-tools)

This trick I learned from my one of ex-college.  In Windows servers, only two remote desktop sessions allowed with administrative access. There are situations, you can’t connect to the server via remote desktop because of two sessions already active.  You may have seen this dialog box. (“Remote Desktop Disconnected”, “This computer can’t connect to the remote computer”)

Usually Windows Administrators, open “Terminal Services Manager” (in Administrative tools), connect to the problematic server and log off the unwanted sessions.  There are easy ways if you love command line based tools.

Query the Remote Server for Current Terminal Sessions

To query and list the sessions on the remote session, you could use QUser.exe or QWinsta

1. QUser

QUser command comes with all the latest Windows clients and servers. This will list the sessions of the remote server (or local machine).

NOTE: if you are using Windows XP, you need to add this location into your System path: C:WindowsSystem32DLLCache. To do this, in command prompt, type the following.

SET PATH = %PATH%;C:WindowsSystem32DLLCache;

QUser help shows,

C:Anand>QUser /?
Display information about users logged on to the system.

QUERY USER [username | sessionname | sessionid] [/SERVER:servername]

  username            Identifies the username.
sessionname         Identifies the session named sessionname.
sessionid           Identifies the session with ID sessionid.
/SERVER:servername  The server to be queried (default is current).

E.g.,

C:>quser /server:MyCitrixSVR
USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
johndoe               ica-tcp#966        10  Active          7  7/31/2008 3:04 PM
averagejoe            ica-tcp#969         1  Active          9  7/31/2008 3:30 PM
familyman             ica-tcp#984         5  Active       1:06  7/31/2008 4:33 PM
normaldude            ica-tcp#987         2  Active          4  7/31/2008 6:20 PM

2. QWinsta

QWinsta is little different and better. It has more features and options. It comes with all flavors of Windows.  QWinsta command line help displays as,

C:>qwinsta /?
Display information about Terminal Sessions.

QUERY SESSION [sessionname | username | sessionid]
[/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]

  sessionname         Identifies the session named sessionname.
username            Identifies the session with user username.
sessionid           Identifies the session with ID sessionid.
/SERVER:servername  The server to be queried (default is current).
/MODE               Display current line settings.
/FLOW               Display current flow control settings.
/CONNECT            Display current connect settings.
/COUNTER            Display current Terminal Services counters information.

 

E.g.,

C:>qwinsta /server:citrixserver
SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
0  Disc    rdpwd
ica-tcp                                 65536  Listen  wdica
rdp-tcp                                 65537  Listen  rdpwd
console                                    16  Conn    wdcon
ica-tcp#966       johndoe                  10  Active  wdica
ica-tcp#969       apple                     1  Active  wdica
ica-tcp#984       averagejoe                5  Active  wdica
ica-tcp#987       familyman                 2  Active  wdica
ica-tcp#989       whoisme                   3  Active  wdica

You are welcome to try the other options QWinsta provides.

Logoff the Remote Sessions

To Log off the terminal session of the remote server, you can use any one of two command line tools. One of LOGOFF and another one is RWINSTA. Before you log off the remote session, you should know the “Session ID” which you get it from “QUSER” OR “QWINSTA” commands as above stated.

1. Logoff

Logoff command kicks off (logging off) the specified remote session. Log off help shows,

C:>logoff /?
Terminates a session.

LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

  sessionname         The name of the session.
sessionid           The ID of the session.
/SERVER:servername  Specifies the Terminal server containing the user
session to log off (default is current).
/V                  Displays information about the actions performed.

E.g.,

C:>logoff /server:infra-apps 1 /v
Logging off session ID 1

2. RWinsta

RWinsta has same parameters and does same thing as log off command. It simply means Reset WINdowsSTAtion. The help goes as,

C:>RWinsta /?
Reset the session subsytem hardware and software to known initial values.

RESET SESSION {sessionname | sessionid} [/SERVER:servername] [/V]

  sessionname         Identifies the session with name sessionname.
sessionid           Identifies the session with ID sessionid.
/SERVER:servername  The server containing the session (default is current).
/V                  Display additional information.

E.g.,

C:>RWinsta /Server:MyWinServer 1

Filed under: Server2008

Recreating a missing virtual machine disk (VMDK) descriptor file

Sanal sunucumuzun bulunduğu ESXi sunucumuza ssh ile bağlanmamız gerekecek. Bunun için Vcenter bağlantısı yapıp ESXi sunucumuzu SSH servisini etkinleştiriyoruz.

1

Ardından SSH ile ESXi sunucumuza bağlanıp sanal makinemizin bulunduğu dizine geçiyoruz.

1
~ # cd /vmfs/volumes/CloudDataStore001/FATIHSSO

Mevcut vmdk dosyalarını listemek için aşağıdaki komutu çalıştırıyoruz.

1
2
3
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# ls -ltr *.vmdk
-rw-------    1 root     root     28270762000 Jun  4 11:11 FATIHSSO-flat.vmdk
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO#

Descriptor file için gerekli olan bilgileri almak için aşağıdaki komutları çalıştırıyoruz. İlk komut ile sanal sunucuya ait kofigürasyon dosyasında disk tipine bakıyoruz. İkincisi ile diskin boyutunu byte olarak öğreniyoruz.

1
2
3
4
5
6
7
8
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# less *.vmx | grep -i virtualdev
 
scsi0.virtualDev  = "lsilogic"
 
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# ls -l *-flat.vmdk
 
-rw-------    1 root     root     19338682368 Jun  4 11:30 FATIHSSO-flat.vmdk
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO#

Şimdi geçici dosyamızı oluşturabiliriz.

1
2
3
4
5
6
7
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# vmkfstools -c 19338682368 -a lsilogic -d thin temp.vmdk
 
Create: 100% done.
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# ls -ltr *.vmdk
-rw-------    1 root     root     19338682368 Jun  4 11:11 FATIHSSO-flat.vmdk
-rw-------    1 root     root           491 Jun  4 11:37 temp.vmdk
-rw-------    1 root     root     19338682368 Jun  4 11:37 temp-flat.vmdk

Geçici olarak oluşturduğumuz temp.vmdk dosyasının adını kayıp yada bozuk olan FATIHSSO.vmdk olarak değiştiriyoruz

1
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# mv temp.vmdk FATIHSSO.vmdk

temp.vmdk descriptor file olarak temp-flat.vmdk dosyasını göstermekte bunun için burada değişiklik yapacağız. # Extent description kısmında doğru flat dosyasının adını yazıyoruz.  dd.thinProvisioned = “1″ kısmını ise siliyoruz.

1
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO# vi FATIHSSO.vmdk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Disk DescriptorFile
version=1
CID=4d0d9dee
parentCID=ffffffff
isNativeSnapshot="no"
createType="vmfs"
 
# Extent description
RW 19338682368 VMFS "temp-flat.vmdk"
 
# The Disk Data Base
#DDB
 
ddb.longContentID = "df8d170ab490cae4cf2a24674d0d9dee"
ddb.encoding = "UTF-8"
ddb.virtualHWVersion = "4"
ddb.uuid = "60 00 C2 9b 23 9d 1e 1b-0a 47 30 60 c9 cb f7 2b"
ddb.geometry.cylinders = "4179"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"
ddb.toolsVersion = "8300"
dd.thinProvisioned = "1"

Tüm işlemler tamamlandıktan sonra temp-flat.vmdk dosyasını silebiliriz.

1
/vmfs/volumes/511518f4-8dc29ca1-47c7-a4badb4f2ae1/FATIHSSO#rm temp-flat.vmdk

Artık sunucumuzu başlatabilriz 🙂

 

“Bu link alıntıdır

http://www.fatihbayram.com/recreating-a-missing-virtual-machine-disk-vmdk-descriptor-file/&#8221;

 

Filed under: Esx Ailesi