Changes between Version 4 and Version 5 of restart-failed-server


Ignore:
Timestamp:
May 11, 2013, 2:05:33 PM (6 years ago)
Author:
Ross
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • restart-failed-server

    v4 v5  
    3333== kvm ==
    3434
     35From `root@HOST.mayfirst.org`, run:
     36
    3537 * unplug the server:
    3638{{{
     
    4042{{{
    4143sv up <server-name>
     44}}}
     45
     46In some situations, the above commands will fail.  If they do, you can try this:
     47
     48 * remove the guest
     49{{{
     50update-service --remove /etc/sv/kvm/GUESTNAME
     51}}}
     52 * re-add the guest
     53{{{
     54update-service --add /etc/sv/kvm/GUESTNAME
     55}}}
     56
     57Should 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{{{
     60ps -eFH | grep GUESTNAME
     61}}}
     62
     63ps 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{{{
     66marx       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{{{
     71kill PID
     72}}}
     73
     74Where PID is the first number of the output (in the example above it is 614).
     75
     76 * Next restart the server with:
     77{{{
     78sv up GUESTNAME
     79}}}
     80
     81 * If this fails, you may need to add the server with.
     82{{{
     83update-service --add /etc/sv/kvm/GUESTNAME
    4284}}}
    4385