-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disk with Number 'X' is already initialized with MBR. #165
Comments
@cmptscpeacock Is it possible you could run the configuration manually on the target node so you can get the verbose output and submit it here? The verbose output will show more in detail what is going on. |
@johlju Is this enough for you? I've got debug mode on whilst running manually...
Is this a clue? Disk with Number '2' is initialized with 'MBR' partition style. GPT required. Thanks |
@cmptscpeacock Thanks for the verbose output, that will help I'm sure.
Not sure why it says that GPT is required, looks like the Test function always does this @PlagueHO This is out of my depth, can you provide any feedback here? |
Is anyone available to respond? |
Hi @cmptscpeacock - I'll take a look at this first thing tomorrow. Sorry taken so long - I've been traveling for work. |
Hi @cmptscpeacock - the Disk resource doesn't actually support disks with the MBR partition style. There is currently a request open to allow choosing of the Disk format: What I suspect is happening is the additional data disks that are being attached to the VM are already formatted with a partition style of MBR. Are you creating this data disk as Managed or Unmanaged? Also, are you able to drop the ARM template in here (if there is nothing sensitive in it) so that I can apply it to my Azure Account and see what the Disk looks like after being freshly provisioned? I'm running some tests at the moment to investigate this in my Azure account. This is probably going to accelerate the need for the #137 change - so I'll get this done today I think. |
I just provisioned an Azure VM (manually via the portal) and attached a managed data disk and it does appear to create this as RAW. So it should be correctly formatted with GPT the first time the DSC Config runs. Is it possible there is some other process that runs that prepares the partition table as MBR on this disk before the DSC can get to it? In the mean time I'll work on getting #137 through so that MBR partition formats are supported. |
If it helps, this is the ARM template that adds the data disk:
Nothing too involved. It really does come down to what the DSC script does in terms of formatting, and then what causes it to error the 2nd time it runs, with the same script. |
I just wanted to add that I am running into a similar issue but not an Azure based VM and also the error is repeatable from first attempt onward. I have made attempts to force Still working on fully testing this process but it would be nice to allow MBR thus bypassing these workarounds. Let me know if you need further screenshots/error logs or anything else. |
@mwtilton - there is a new feature going through review at the moment that adds MBR support (#170). Should be through soon (hopefully 😁) . |
Thanks for the update and progress. This will be very useful going forward. Many thanks |
This PR has gone through now so it should be released to the PS Gallery in the next Resource Kit release. Will close this once that has gone out and the problem has been confirmed to be resolved. |
I labeled it 'resolved in dev', and remove 'in progress' label. |
any update on this? is the new version ready for production? |
I think the next release of DSC Resource Kit will be somewhere before end of October, but not certain, I don’t know of an exact date. |
I start getting this error message as well. Seems to have worked fine and just started breaking on my hourly jobs that enforce config management. I believed we used the same module to partition these disks. I updated from 4.1.0.0 to 4.2.0.0 to see if that fixed it. So is GPT a requirement as opposed to MBR? I don't see an option to enforce GPT in this module when creating from raw disk. msg": "PowerShell DSC resource MSFTDSC_Disk failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Disk with Number '1' is already initialized with partition style '' but 'GPT' is required. Set AllowDestructive and ClearDisk to $true to allow disk to be reinitialized. ", |
I'm also getting this error when redeployed on an Azure Managed disk. Using 4.3.0.0 |
We added MBR support to the Disk resource in 4.3.0.0, but I couldn't get Azure to pre-format the disk with MBR. However the errors seemed to indicate that an empty value (instead of RAW) is being returned when detecting the disk format. I'll try some experimentation later on today to see if I can figure this out once and for all. |
Thank you for looking at this I'm specifically using Azure Automation DSC to apply the DSC. I must admin when I run locally I do not get the same issue. I will attempt to get further logs shortly |
I'm afraid I don't have details logs above, but I do have the errors. Job {*******} : Job {*******} : |
+1, having issues using xDisk when deploying via Azure State Configuration (DSC). I attached a new disk to a VM and modified my configuration to use the disk #. After deploying, it fails with the following: |
@Onibus , @martinjosephogorman - is it possible to paste some screenshots of the Azure State Configuration settings for the Storage Resource? Anything I can use to replicate this issue in Azure. |
@PlagueHO Here you are.
I uploaded the DSC config to my Automation Account and compiled it, which was successful. I then added the node to State Configuration. After the node picked up and applied the configuration, it failed with the following. From the Azure portal, xDisk > DiskADVol spat out the following JSON error
Pulling the DSC logs show the following
Poking around, I found the DSC logs in
|
Very awesome info @Onibus ! Thank you. That will allow me to have a go at replicating it. I'm travelling for work the next few days but will get onto this as soon as I can. |
+1 having same issue when I was trying to use DSC to deploy an Azure VM from an ARM template. Did you find the solution for this issue? @PlagueHO |
Hi @hasangural - I'm still catching up on issues so haven't managed to replicate this one yet. Sorry about that. However, I've just noticed that @Onibus was having this issue with the old xStorage resource instead of this newer StorageDsc module. @hasangural - were you getting this problem with the latest StorageDsc module? |
@plague I was having the issue on StroageDSc and xStroage |
@martinjosephogorman , Hi, If you are using Azure VM and DSC extension, please be aware of the diskId. I used to use like that; it is still working.
|
Thank you @hasangural will try it out. |
I still face the issue with preview0002 version. Could someone guide me how to fix it ? Error: Code="VMExtensionProvisioningError" Message="VM has reported a failure when processing extension 'dscScript'. Error message: "DSC Configuration 'DscConfig' completed with error(s). Following are the first few: PowerShell DSC resource DSC_Disk failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Disk with Number '2' is already initialized with partition style '' but 'GPT' is required. Set AllowDestructive and ClearDisk to $true to allow disk to be reinitialized. PowerShell DSC resource MSFT_xVirtualMemory failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Drive D:\ is not ready. Please ensure that the drive exists and is available. The system cannot find the path specified. The related file/directory is: F:\. The related ResourceID is [File]Ceridian."\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot " |
Hi @mayoness83 , Can you post your config in here? Are you also able to post the output from running Get-Disk | Fl * on the disk? |
@PlagueHO thank you for feedback. I will gather requested files tomorrow and add it here. What solve our issue was switching from VM SKU Standard_D16s_v5 to Standard_D16ds_v5 |
Hi,
I'm using this DSC to deploy an Azure VM from an ARM template:
Import-DscResource -ModuleName StorageDsc, xComputerManagement, xNetworking
The first time it deploys fine. If you redeploy over the top I get the following. Is it a bug? By design? I don't want to initialise the disks once they've been done so it should skip really:
"message": "VM has reported a failure when processing extension 'mfa'. Error message: "DSC Configuration 'XXX' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_Disk failed to execute Set-TargetResource functionality with error message: System.InvalidOperationException: Disk with Number '2' is already initialized with MBR. The SendConfigurationApply function did not succeed."."
The text was updated successfully, but these errors were encountered: