{"id":584,"date":"2012-02-10T10:08:17","date_gmt":"2012-02-10T18:08:17","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/?p=584"},"modified":"2012-02-12T16:21:11","modified_gmt":"2012-02-13T00:21:11","slug":"kvm-and-product_uuid","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2012\/02\/10\/kvm-and-product_uuid\/","title":{"rendered":"kvm and product_uuid"},"content":{"rendered":"<p>While looking for something to use as a system-unique fall-back when a TPM is not available, I looked at <code>\/sys\/devices\/virtual\/dmi\/id\/product_uuid<\/code> (same as <code>dmidecode<\/code>&#8216;s &#8220;System Information \/ UUID&#8221;), but was disappointed when, under KVM, the file was missing (and running <code>dmidecode<\/code> crashes KVM *cough*). However, after a quick check, I noticed that KVM supports the &#8220;<code>-uuid<\/code>&#8221; option to set the value of <code>\/sys\/devices\/virtual\/dmi\/id\/product_uuid<\/code>. Looks like libvirt <a href=\"http:\/\/libvirt.org\/guide\/html\/Application_Development_Guide-Connections-Capability_Info.html\">supports this<\/a> under <code>capabilities \/ host \/ uuid<\/code> in the XML, too.<\/p>\n<pre class=\"brush:shell\">\r\nhost# kvm -uuid 12345678-ABCD-1234-ABCD-1234567890AB ...\r\nhost# ssh localhost ...\r\n...\r\nguest# cat \/sys\/devices\/virtual\/dmi\/id\/product_uuid \r\n12345678-ABCD-1234-ABCD-1234567890AB\r\n<\/pre>\n<p style='text-align:left'>&copy; 2012, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>While looking for something to use as a system-unique fall-back when a TPM is not available, I looked at \/sys\/devices\/virtual\/dmi\/id\/product_uuid (same as dmidecode&#8216;s &#8220;System Information \/ UUID&#8221;), but was disappointed when, under KVM, the file was missing (and running dmidecode crashes KVM *cough*). However, after a quick check, I noticed that KVM supports the &#8220;-uuid&#8221; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,18,14,19],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/584"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=584"}],"version-history":[{"count":6,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/584\/revisions"}],"predecessor-version":[{"id":590,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/584\/revisions\/590"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}