VMware Cloud Community
BillStreet00
Enthusiast
Enthusiast
Jump to solution

Add additional disks to a deployment

We want the requestor to be able to go to the storage page and create an additional disk to add to their VM.

I added VRMGuestAgent to my template and ran "winservice -i -h Manager_Service_Hostname_fdqn:portnumber -p ssl". I updated the command line to point to my IaaS box which has the manager service running.  I verified that after building a new VM that the Guest Agent service is running on the VM. I added the custom property I did add the VirtualMachine.Admin.UseGuestAgent custom property and set it to true.


I created a new request with a second disk requested.  I can see the disk on the new VM and it is active but there is no partition on it.

0 Kudos
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

Yes, that's correct functionality. The guest agent does not bring any new disks online and format them because this is a matter of great personal preference based on how the disk will be used. You'll need to provide your own script that specifies how you wish to format any new disks. It can easily be done with some Powershell. Here's some sample code I produced for a similar project.

Update-HostStorageCache

$disknum = (Get-Disk | Where partitionstyle -eq 'raw').Number

Foreach ($stuff in $disknum){

Initialize-Disk -Number $stuff -PartitionStyle MBR -PassThru |

New-Partition -AssignDriveLetter -UseMaximumSize |

Format-Volume -FileSystem NTFS -Confirm:$false

}

View solution in original post

0 Kudos
2 Replies
daphnissov
Immortal
Immortal
Jump to solution

Yes, that's correct functionality. The guest agent does not bring any new disks online and format them because this is a matter of great personal preference based on how the disk will be used. You'll need to provide your own script that specifies how you wish to format any new disks. It can easily be done with some Powershell. Here's some sample code I produced for a similar project.

Update-HostStorageCache

$disknum = (Get-Disk | Where partitionstyle -eq 'raw').Number

Foreach ($stuff in $disknum){

Initialize-Disk -Number $stuff -PartitionStyle MBR -PassThru |

New-Partition -AssignDriveLetter -UseMaximumSize |

Format-Volume -FileSystem NTFS -Confirm:$false

}

0 Kudos
BillStreet00
Enthusiast
Enthusiast
Jump to solution

Thanks!  I thought the additional scripting would be the answer but I was just hoping it wouldn't be needed.

0 Kudos