There is a common issue on Windows to have a disk blocked from Windows recovery partition. In that way, if you extend the physical disk (virtual environments) you cannot extend from Operating system side.
Windows Recovery partition blocking C:\ to be extended
A recovery partition is a partition on the disk that helps to restore the factory settings of the OS (operating system) if there is some kind of system failure. This partition has no drive letter, and you can use only Help in Disk Management. In my case I did not need this partition and I was able to delete it with the below steps:
select disk 0
select volume 3 (3 was the id of my recovery partition)
select recovery partition in order to delete from diskpart
1
delete volume ovveride
After those steps you will be able to extend your disk.
Ansible is a very powerful automation tool that is developed from RedHat. Many large organizations rely on Ansible to automate tasks and procedures. In this article I will explain how one can use ansible to manage windows clients and servers.
In order to manage windows hosts ansible winrm plugin should be used to communicate with the client/server machine.
The first step is to verify that ansible is installed.
Alongside with ansible, on the control node the pywinrm module should be also installed. By default this one is not installed and one should do it manually.
The managed Windows client/server machines should be configured to allow remote connections. A very useful power shell script is already developed from other users and it needs only to be executed on the managed host.
If your execution policy is prohibiting this script to be executed, you should set-execution policy to RemoteSigned as shown below and then execute the powershell.
Control node should have network connectivity with the managed hosts.
Some environmental variables should be used, so that ansible knows how the connection will be performed (winrm). I included those variables in my inventory file as I created this lab just for demonstration. My inventory file looks like below:
1
2
3
4
5
6
7
8
9
10
11
12
[test_servers_group]
192.168.12.130
[all]
localhost
192.168.12.130
[all:vars]
ansible_winrm_server_cert_validation=ignore
ansible_connection=winrm
ansible_user=ansible
ansible_password=
Lastly make sure that the user that is used for the connection has administrative rights on the managed windows hosts. Otherwise some error codes will be returned.
Lastly confirm ansible on managed host is working by using win_ping module.
When the described in the title error appears for a windows server that belongs to a domain the issue could be the domain name that is registered to the domain controller as well as the netbios name that will be registered.
For example two computers with slightly different name are registered to the domain controller.
SRV-SOMESERVERAPPL01
SRV-SOMESERVERAPPL02
Their netbios name should be the same for those computers because the max characters allowed are 15, so the below message will appear when adding the second one to the domain.
adding computer name to the servers
Those two servers although they will have a different domain name registered on the domain controller, their netbios will be the same and on one of the two nodes you will get the below error when trying to login
trying to login using a domain account
In order to resolve this just shorten the name to something less than 15 characters and rejoin the computers to the domain.