Changes between Version 4 and Version 5 of restart-failed-server
- Timestamp:
- May 11, 2013, 2:05:33 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
restart-failed-server
v4 v5 33 33 == kvm == 34 34 35 From `root@HOST.mayfirst.org`, run: 36 35 37 * unplug the server: 36 38 {{{ … … 40 42 {{{ 41 43 sv up <server-name> 44 }}} 45 46 In some situations, the above commands will fail. If they do, you can try this: 47 48 * remove the guest 49 {{{ 50 update-service --remove /etc/sv/kvm/GUESTNAME 51 }}} 52 * re-add the guest 53 {{{ 54 update-service --add /etc/sv/kvm/GUESTNAME 55 }}} 56 57 Should these commands fail as well, you can take a more drastic step and kill the kvm process itself (be careful). Here's how: 58 59 {{{ 60 ps -eFH | grep GUESTNAME 61 }}} 62 63 ps will give you output that lists the kvm process in question. You want to find a line like this (marx is used in this example): 64 65 {{{ 66 marx 614 531 99 1118262 4130180 2 2012 ? 106751-23:47:16 /usr/bin/kvm -drive file=/dev/mapper/vg_bolivar0-marx,if=virtio,id=hda,boot=on,format=raw -M pc -enable-kvm -nodefaults -nographic -name marx -m 4G -boot c -chardev socket,id=monitor,path=/home/marx/vms/marx/monitor.socket,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -usb -device virtio-balloon-pci,id=balloon0,bus=pci.0 -chardev socket,id=serial0,path=/home/marx/vms/marx/console.socket,server -device isa-serial,chardev=serial0 -smp 1,maxcpus=8 -device virtio-net-pci,vlan=0,id=net0,mac=02:00:00:00:00:0b,bus=pci.0 -net tap,ifname=tap10,script=no,downscript=no,vlan=0,name=hostnet0 67 }}} 68 69 * Then kill the process: 70 {{{ 71 kill PID 72 }}} 73 74 Where PID is the first number of the output (in the example above it is 614). 75 76 * Next restart the server with: 77 {{{ 78 sv up GUESTNAME 79 }}} 80 81 * If this fails, you may need to add the server with. 82 {{{ 83 update-service --add /etc/sv/kvm/GUESTNAME 42 84 }}} 43 85