{"id":237,"date":"2009-05-11T12:27:37","date_gmt":"2009-05-11T10:27:37","guid":{"rendered":"http:\/\/raftaman.net\/?p=237"},"modified":"2021-05-15T11:46:42","modified_gmt":"2021-05-15T09:46:42","slug":"shutting-down-xen-domus-without-saving-them","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=237","title":{"rendered":"Shutting down xen domUs without saving them"},"content":{"rendered":"<p>Per default, CentOS 5.3 saves a domU&#8217;s state when the hypervisor is shut down. In principle this a nice behaviour: The domU will restore its state automagically when the hypervisor comes up again and just continue working. But there are some services (e.g. mldonkey) that don&#8217;t like to be restored and refuse to work (i.e. keep in a blocked state forever).<\/p>\n<p>The easiest way of fixing this, is to shut down the domUs gracefully with the hypervisor. In CentOS (as in probably most other distros as well) you can change xen&#8217;s shutdown behaviour in <code>\/etc\/sysconfig\/xendomains<\/code><\/p>\n<pre class=\"brush: plain; highlight: [11,12]; light: true; title: ; notranslate\" title=\"\">\r\n&#x5B;...]\r\n## Type: string\r\n## Default: \/var\/lib\/xen\/save\r\n#\r\n# Directory to save running domains to when the system (dom0) is\r\n# shut down. Will also be used to restore domains from if # XENDOMAINS_RESTORE\r\n# is set (see below). Leave empty to disable domain saving on shutdown \r\n# (e.g. because you rather shut domains down).\r\n# If domain saving does succeed, SHUTDOWN will not be executed.\r\n#\r\n#XENDOMAINS_SAVE=\/var\/lib\/xen\/save\r\nXENDOMAINS_SAVE=\r\n&#x5B;...]\r\n<\/pre>\n<p>All we have to do is empty the value of the <code>XENDOMAINS_SAVE<\/code> variable, so <code>SHUTDOWN<\/code> will be executed instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per default, CentOS 5.3 saves a domU&#8217;s state when the hypervisor is shut down. In principle this a nice behaviour: The domU will restore its state automagically when the hypervisor comes up again and just continue working. But there are some services (e.g. mldonkey) that don&#8217;t like to be restored and refuse to work (i.e. keep in a blocked state&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=237\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13,7,16],"class_list":["post-237","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-centos","tag-fedora","tag-xen"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=237"}],"version-history":[{"count":5,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":242,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/237\/revisions\/242"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}