Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@tsurun

DataCore Installation Manager vSphere(DIM-V)をやり直す時

More than 1 year has passed since last update.

DIM-Vを最初からやり直したいときの環境の最低限のクリーンナップ(ロールバック)。

うちの環境専用

Connect-VIServer
#データセンターのカスタム属性を消す
Get-CustomAttribute | where Name -match DATACORE | Remove-CustomAttribute
#データコアサーバーをシャットダウンして削除
Get-VM | where Name -match "HVSAN" | Stop-VMGuest | Remove-VM -DeletePermanently
#iSCSIの動的検出、静的検出を全部削除
Get-VMHostHba -Type IScsi |Get-IScsiHbaTarget|Remove-IScsiHbaTarget
#iSCSI用VMKを削除
##関係ない"10.10.107.31"がいるのでこの環境固有の演算が入っています。
Get-VMHost | where Name -notmatch "10.10.107.31" | Get-VMHostNetwork | ForEach-Object{$_.VirtualNic} | where Name -ne "vmk0" | Remove-VMHostNetworkAdapter
#iSCSI用vSwitchを削除
Get-VirtualSwitch | Where-Object { ($_.VMHost -notmatch "10.10.107.31")  -and ($_.Name -notmatch "0")}|Remove-VirtualSwitch
Disconnect-VIServer

一般的な新規環境用

Connect-VIServer
#データセンターのカスタム属性を消す
Get-CustomAttribute | where Name -match DATACORE | Remove-CustomAttribute
#データコアサーバーをシャットダウンして削除
Get-VM | where Name -match "HVSAN" | Stop-VMGuest | Remove-VM -DeletePermanently
#iSCSIの動的検出、静的検出を全部削除
Get-VMHostHba -Type IScsi |Get-IScsiHbaTarget|Remove-IScsiHbaTarget
#iSCSI用VMKを削除
Get-VMHost | Get-VMHostNetwork | ForEach-Object{$_.VirtualNic} | where Name -ne "vmk0" | Remove-VMHostNetworkAdapter
#iSCSI用vSwitchを削除
Get-VirtualSwitch | where Name -notmatch "vSwitch0" |Remove-VirtualSwitch
Disconnect-VIServer
0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?