Changes between Version 16 and Version 17 of decommission_kvm


Ignore:
Timestamp:
Jun 3, 2016, 10:52:11 AM (3 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • decommission_kvm

    v16 v17  
    103103This 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.
    104104
    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/GUESTNAME
    111 }}}
    112 
    113105== Ensure all sensitive data is overwritten ==
    114106
     
    128120Once this command finishes running, you can return the logical volume to the volume group.
    129121
    130 == Removing a Logical Volume ==
    131 
    132 From `root@HOSTNAME.mayfirst.org` check the volume group with:
     122== Remove all aspects of the guest ==
    133123
    134124{{{
    135 # vgs
     125kvm-creator destroy GUESTNAME
    136126}}}
    137127
    138 This should give output that looks like this:
     128That command should remove all traces of the guest in /etc/sv/kvm/GUEST, remove the user and delete the logical volume.
    139129
    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 }}}
     130Check to make sure /home/GUEST is also removed and remove by hand if necessary.
    169131
    170132== Clean up on helper servers ==
     
    196158}}}
    197159
    198  * Delete node from http://servers.mayfirst.org/
    199160 * Remove the dns entry from https://members.mayfirst.org/cp
    200  * Delete the server from https://support.mayfirst.org/wiki/ip_allocation
    201161
    202162== Other system cleanup ==
     
    204164On the host, you might also want to:
    205165
    206  * remove the guest user account
    207166 * remove the associated `/etc/udev/rules.d/92-kvm_creator-GUEST.rules`
    208167