Changes between Version 16 and Version 17 of decommission_kvm
- Timestamp:
- Jun 3, 2016, 2:52:11 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
decommission_kvm
v16 v17 103 103 This command will shutdown the virtual machine. We need the machine to be out of service so that we can wipe any sensitive data from the disks. 104 104 105 == Removing the guest directory ==106 107 To ensure that the guest will not come back online, ever, you should remove the guest kvm directory with the following command as `root@HOSTNAME.mayfirst.org`:108 109 {{{110 # rm -rf /etc/sv/kvm/GUESTNAME111 }}}112 113 105 == Ensure all sensitive data is overwritten == 114 106 … … 128 120 Once this command finishes running, you can return the logical volume to the volume group. 129 121 130 == Removing a Logical Volume == 131 132 From `root@HOSTNAME.mayfirst.org` check the volume group with: 122 == Remove all aspects of the guest == 133 123 134 124 {{{ 135 # vgs 125 kvm-creator destroy GUESTNAME 136 126 }}} 137 127 138 Th is should give output that looks like this:128 That command should remove all traces of the guest in /etc/sv/kvm/GUEST, remove the user and delete the logical volume. 139 129 140 {{{ 141 0 ken:/dev# vgs 142 VG #PV #LV #SN Attr VSize VFree 143 vg_ken0 1 15 0 wz--n- 1.82t 1.10t 144 0 ken:/dev# 145 }}} 146 147 Now you can remove the logical volume with the following command: 148 149 {{{ 150 # lvremove VOLUMEGROUPNAME/LOGICALVOLUMENAME 151 }}} 152 153 Real world example: 154 155 {{{ 156 0 ken:/dev# lvremove vg_ken0/bataille 157 Do you really want to remove active logical volume bataille? [y/n]: y 158 Logical volume "bataille" successfully removed 159 0 ken:/dev# 160 }}} 161 162 Now run 'vgs' again and make sure the new disk space has been added back to the volume group. You should see an increase in the 'VFree' column of the output of the 'vgs' command. 163 164 == Removing the guest user == 165 166 {{{ 167 # deluser --remove-home GUESTNAME 168 }}} 130 Check to make sure /home/GUEST is also removed and remove by hand if necessary. 169 131 170 132 == Clean up on helper servers == … … 196 158 }}} 197 159 198 * Delete node from http://servers.mayfirst.org/199 160 * Remove the dns entry from https://members.mayfirst.org/cp 200 * Delete the server from https://support.mayfirst.org/wiki/ip_allocation201 161 202 162 == Other system cleanup == … … 204 164 On the host, you might also want to: 205 165 206 * remove the guest user account207 166 * remove the associated `/etc/udev/rules.d/92-kvm_creator-GUEST.rules` 208 167