Translate

quinta-feira, 20 de fevereiro de 2025

My DEV Virtual Machine

Here is how I create "MY" DEV VM for the D365F&O. 

There are a lot of different tutorials, tips, and tricks on how to improve the performance of the VM. This one works a lot for me. I hope it helps you, too!


LCS Cloud Hosted Environment Creation.

Go to your LCS Cloud Hosted Environment pages and click the + icon to add a new CHE.

 

Select the version you need and click Next.


Choose the  “DEVTEST” type and click Next.

Now choose the “Develop” type and click Next.


Select your Azure subscription and click Next.


Please type the name of your CHE and choose its size. I suggest you use the DS12v2. It is a good size, and with some changes, you will have excellent performance at a reasonable price. After that, click on the “Advanced Settings” button.


In the Advanced Settings, go to the “Disk space configuration” and change the number of disks to 2, which is the minimum. Change the size to 127GB. Don´t worry about it now because the D365F&O database will be moved to a different disk in the following steps.


In the “Customize virtual machine names,” type the name of your CHE again. This way, the name on the LCS CHE page will match the name of the VM in the Azure portal.


After that, mark the checkbox and hit Next. The LCS will start creating the VM in the Azure Virtual Machines area.


Azure Virtual Machines Changes

Open the Azure Portal, go to the Virtual Machines, and open the VM configurations created. Go to Settings > Disks and click “Create and attach a new disk.”



Type the disk's name and choose the size according to the size of the D365F&O database in your production environment. At the first moment, thinking about the first restore of a .bacpac file, I suggest you choose the SSD disk type. You can always change it whenever you need to. Click on the Apply button to save the changes.


With the VM deallocated, click on the “OSDISK”:


Now go to the OSDISK Settings, click the Size + Performance option, and change the “Storage type” from HDD to Standard SSD. This will significantly improve the performance of the Windows Server and, especially, Visual Studio!


Save the changes and start the Virtual Machine!

 

 

Virtual Machine internal changes.

After connecting to the VM through RDP, the first step is to stop all the FO services. With all the services stopped, open the Computer Management and click the Disk Management option. You will see a message related to the new disk we created. Click OK to initialize the disk.


Right-click over the new Disk 5 and choose “New Simple Volume.”



 Follow the wizard, choose the size, the letter for use in the new disk, and the disk's label. This is the result:


The new SSD disk will receive all the database files. Create folders inside this new disk according to your preference. In the next step, we will move the database files from the G, H, and J disks to the new SSD disk, which in this tutorial is disk S:

With all the D365F&O services stopped, open your SSMS and, detach all the databases, repeat the Dettach process to all the available databases:


With the SSMS empty, let's move the files:



Open the folders and copy\cut the MDF and LDF files from the “old disks” to the newly created disk:


While copying the files between the folders, open the SQL Server's “Properties” and change the database files' default folder. I am using a “SQL Backup” folder inside the K disk. In the next step, you will understand why. But you can choose any other disk that suits your preference!


After to copy all the files, let´s attach the databases:


 


Repeat the attach process to all the databases; we will see the following screen at the end. Click ok and wait for it to finish.



Now we have all the databases online again:


Restart your Virtual Machine. When you connect again, all the services will be running. Validate the FO, open Visual Studio, and run your tests. If there is no issue, let's move to the last step.

The last step is to adjust the disk size. Here is what we have now:


You can see that the K: drive does not have enough space. Open the “Computer Management” and “DELETE” the G, H, and J drives that are now totally empty:



Here is what we have after deleting the partitions:



Now we just need to extend the K partition, right-click on it, click extend, and follow the wizard:


    Here is the final result:



Now, the Virtual Machine is ready to be used with much disk space. The C: drive is an SSD type, giving S.O. and Visual Studio good performance. The database disk is SSD, also. Remember that you can change the disk type to HDD at any time to decrease the cost of the VM!

sábado, 15 de fevereiro de 2025

D365FO - Virtual Machine 10.0.41

 Boas pessoas,

Aos que utilizam maquina virtual localmente, em seus laptops, PCs ou servidor próprio, está disponível no LCS o VHD na versão 10.0.41!


Acessem a Shared Asset Library para fazer o download!

Vamos estudar e trabalhar pessoal!

O café ta caro!


segunda-feira, 30 de dezembro de 2024

domingo, 3 de novembro de 2024

AX 2012 EP - 'The referenced file '/_layouts/ep/EPSecurityControlascx' is not allowed on this page'

 Este erro no EP do AX2012 apesar de antigo e amplamente documentado nos blogs ainda causa problemas... Resolvi deixar este post aqui pra facilitar minha vida!

O erro é este abaixo ao acessar qualquer pagina do EP após aplicar atualizações do Sharepoint no Windows:

A solução vem da própria Microsoft: Microsoft - Erro EP AX 2012

A depender de como o Sharepoint foi instalado, você pode ter dificuldades para localizar o arquivo "web.config" correto. Neste caso basta fazer como no print abaixo:


Faça uma cópia do seu arquivo web.config por segurança:



Busque no arquivo web.config por <PageParserPaths> e adicione o seguinte:

<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" AllowUnsafeControls="true" IncludeSubFolders="true"></PageParserPath>

Após adicionar a linha acima o arquivo ficará como no print abaixo:

Salve e tente acessar o EP novamente!