{"id":2409,"date":"2016-01-01T02:20:06","date_gmt":"2015-12-31T17:20:06","guid":{"rendered":"http:\/\/tech.akat.info\/?p=2409"},"modified":"2016-01-01T02:21:32","modified_gmt":"2015-12-31T17:21:32","slug":"hyper-v-debian8-udev","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=2409","title":{"rendered":"Hyper-V + debian8 + udev"},"content":{"rendered":"<p>Hyper-V\u3067<a href=\"http:\/\/tech.akat.info\/?p=2342\">udev<\/a>\u304c\u5229\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5468\u308a\u306b\u3064\u3044\u3066\u8abf\u67fb\u3057\u305f<br \/>\n\u307e\u3060\u89e3\u6c7a\u3057\u3066\u3044\u306a\u3044<\/p>\n<p>\u7d50\u8ad6(\u3068\u3044\u3046\u304b\u3053\u308c\u304b\u3089\u8abf\u3079\u308b\uff06\u8a66\u3059\u3053\u3068)\u3068\u3057\u3066<br \/>\n\u30fbudev\u306budevadm\u306e\u60c5\u5831\u3092\u5229\u7528\u3059\u308b(udevadm test\u3067\u30c1\u30a7\u30c3\u30af)<br \/>\n\u30fbudev\u306e\u52d5\u304d\u3092\u8abf\u3079\u308b(bus-info\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\uff1f\u8d77\u52d5\u5f8c\u306b\u30c1\u30a7\u30c3\u30af\u3055\u305b\u308b\uff1f)<br \/>\n\u30fb\u30ec\u30ac\u30b7\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3092\u5229\u7528(\u300cDEC DC21140A\u300d\u3092\u30a8\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3059\u308b\uff1f)<br \/>\n\u30fbdebian7\u306eudev\u8a2d\u5b9a\u306a\u3069\u78ba\u8a8d<\/p>\n<h1>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c9\u30e9\u30a4\u30d0\u306fhv_netvsc<\/h1>\n<p>bus-info\u304c\u3068\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u304c\u308f\u304b\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@debian9:\/home\/shimizu# ethtool -i eth0\r\ndriver: hv_netvsc\r\nversion:\r\nfirmware-version: N\/A\r\nexpansion-rom-version:\r\nbus-info:\r\nsupports-statistics: no\r\nsupports-test: no\r\nsupports-eeprom-access: no\r\nsupports-register-dump: no\r\nsupports-priv-flags: no\r\n\r\nroot@debian9:\/home\/shimizu# udevadm info -a --path=\/sys\/class\/net\/eth0\r\n\r\nUdevadm info starts with the device specified by the devpath and then\r\nwalks up the chain of parent devices. It prints for every device\r\nfound, all possible attributes in the udev rules key format.\r\nA rule to match, can be composed by the attributes of the device\r\nand the attributes from one single parent device.\r\n\r\n  looking at device '\/devices\/LNXSYSTM:00\/LNXSYBUS:00\/PNP0A03:00\/device:07\/VMBUS:01\/vmbus_16\/net\/eth0':\r\n    KERNEL==&quot;eth0&quot;\r\n    SUBSYSTEM==&quot;net&quot;\r\n    DRIVER==&quot;&quot;\r\n    ATTR{addr_assign_type}==&quot;0&quot;\r\n    ATTR{addr_len}==&quot;6&quot;\r\n    ATTR{address}==&quot;00:0d:3a:50:39:a9&quot;\r\n    ATTR{broadcast}==&quot;ff:ff:ff:ff:ff:ff&quot;\r\n    ATTR{carrier}==&quot;1&quot;\r\n    ATTR{carrier_changes}==&quot;3&quot;\r\n    ATTR{dev_id}==&quot;0x0&quot;\r\n    ATTR{dev_port}==&quot;0&quot;\r\n    ATTR{dormant}==&quot;0&quot;\r\n    ATTR{flags}==&quot;0x1003&quot;\r\n    ATTR{gro_flush_timeout}==&quot;0&quot;\r\n    ATTR{ifalias}==&quot;&quot;\r\n    ATTR{ifindex}==&quot;2&quot;\r\n    ATTR{iflink}==&quot;2&quot;\r\n    ATTR{link_mode}==&quot;0&quot;\r\n    ATTR{mtu}==&quot;1500&quot;\r\n    ATTR{netdev_group}==&quot;0&quot;\r\n    ATTR{operstate}==&quot;up&quot;\r\n    ATTR{tx_queue_len}==&quot;1000&quot;\r\n    ATTR{type}==&quot;1&quot;\r\n\r\n  looking at parent device '\/devices\/LNXSYSTM:00\/LNXSYBUS:00\/PNP0A03:00\/device:07\/VMBUS:01\/vmbus_16':\r\n    KERNELS==&quot;vmbus_16&quot;\r\n    SUBSYSTEMS==&quot;vmbus&quot;\r\n    DRIVERS==&quot;hv_netvsc&quot;\r\n    ATTRS{class_id}==&quot;{f8615163-df3e-46c5-913f-f2d2f965ed0e}&quot;\r\n    ATTRS{client_monitor_conn_id}==&quot;65552&quot;\r\n    ATTRS{client_monitor_latency}==&quot;1000&quot;\r\n    ATTRS{client_monitor_pending}==&quot;0&quot;\r\n    ATTRS{device_id}==&quot;{000d3a50-39a9-000d-3a50-39a9000d3a50}&quot;\r\n    ATTRS{id}==&quot;16&quot;\r\n    ATTRS{in_intr_mask}==&quot;0&quot;\r\n    ATTRS{in_read_bytes_avail}==&quot;0&quot;\r\n    ATTRS{in_read_index}==&quot;262528&quot;\r\n    ATTRS{in_write_bytes_avail}==&quot;520192&quot;\r\n    ATTRS{in_write_index}==&quot;262528&quot;\r\n    ATTRS{monitor_id}==&quot;4&quot;\r\n    ATTRS{out_intr_mask}==&quot;0&quot;\r\n    ATTRS{out_read_bytes_avail}==&quot;0&quot;\r\n    ATTRS{out_read_index}==&quot;428120&quot;\r\n    ATTRS{out_write_bytes_avail}==&quot;520192&quot;\r\n    ATTRS{out_write_index}==&quot;428120&quot;\r\n    ATTRS{server_monitor_conn_id}==&quot;9&quot;\r\n    ATTRS{server_monitor_latency}==&quot;1000&quot;\r\n    ATTRS{server_monitor_pending}==&quot;0&quot;\r\n    ATTRS{state}==&quot;3&quot;\r\n\r\n  looking at parent device '\/devices\/LNXSYSTM:00\/LNXSYBUS:00\/PNP0A03:00\/device:07\/VMBUS:01':\r\n    KERNELS==&quot;VMBUS:01&quot;\r\n    SUBSYSTEMS==&quot;acpi&quot;\r\n    DRIVERS==&quot;&quot;\r\n    ATTRS{hid}==&quot;VMBUS&quot;\r\n    ATTRS{path}==&quot;\\_SB_.PCI0.SBRG.VMB8&quot;\r\n    ATTRS{power_state}==&quot;D0&quot;\r\n    ATTRS{status}==&quot;15&quot;\r\n    ATTRS{uid}==&quot;0&quot;\r\n\r\n  looking at parent device '\/devices\/LNXSYSTM:00\/LNXSYBUS:00\/PNP0A03:00\/device:07':\r\n    KERNELS==&quot;device:07&quot;\r\n    SUBSYSTEMS==&quot;acpi&quot;\r\n    DRIVERS==&quot;&quot;\r\n    ATTRS{adr}==&quot;0x00070000&quot;\r\n    ATTRS{path}==&quot;\\_SB_.PCI0.SBRG&quot;\r\n\r\n  looking at parent device '\/devices\/LNXSYSTM:00\/LNXSYBUS:00\/PNP0A03:00':\r\n    KERNELS==&quot;PNP0A03:00&quot;\r\n    SUBSYSTEMS==&quot;acpi&quot;\r\n    DRIVERS==&quot;&quot;\r\n    ATTRS{adr}==&quot;0x00000000&quot;\r\n    ATTRS{hid}==&quot;PNP0A03&quot;\r\n    ATTRS{path}==&quot;\\_SB_.PCI0&quot;\r\n    ATTRS{uid}==&quot;0&quot;\r\n\r\n  looking at parent device '\/devices\/LNXSYSTM:00\/LNXSYBUS:00':\r\n    KERNELS==&quot;LNXSYBUS:00&quot;\r\n    SUBSYSTEMS==&quot;acpi&quot;\r\n    DRIVERS==&quot;&quot;\r\n    ATTRS{hid}==&quot;LNXSYBUS&quot;\r\n    ATTRS{path}==&quot;\\_SB_&quot;\r\n\r\n  looking at parent device '\/devices\/LNXSYSTM:00':\r\n    KERNELS==&quot;LNXSYSTM:00&quot;\r\n    SUBSYSTEMS==&quot;acpi&quot;\r\n    DRIVERS==&quot;&quot;\r\n    ATTRS{hid}==&quot;LNXSYSTM&quot;\r\n    ATTRS{path}==&quot;\\&quot;\r\n\r\nroot@debian9:\/home\/shimizu# cat \/lib\/systemd\/network\/99-default.link\r\n&#x5B;Link]\r\nNamePolicy=kernel database onboard slot path\r\nMACAddressPolicy=persistent\r\n\r\n<\/pre>\n<h1>hv_netvsc<\/h1>\n<p>hv_vmbus\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@debian9:\/home\/shimizu# lsmod | grep hv\r\n### \u5de6\u304b\u3089\u30e2\u30b8\u30e5\u30fc\u30eb\u540d\u3001\u30b5\u30a4\u30ba\u3001\u53c2\u7167\u56de\u6570\u3001\u305d\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u540d ###\r\nhv_utils               20480  0\r\nhv_netvsc              36864  0\r\nhv_storvsc             20480  2\r\nscsi_mod              200704  4 sg,libata,sd_mod,hv_storvsc\r\nhv_vmbus               73728  6 hyperv_keyboard,hv_netvsc,hid_hyperv,hv_utils,hyperv_fb,hv_storvsc\r\n\r\nroot@debian9:\/home\/shimizu# modinfo hv_netvsc\r\nfilename:       \/lib\/modules\/4.1.0-2-amd64\/kernel\/drivers\/net\/hyperv\/hv_netvsc.ko\r\ndescription:    Microsoft Hyper-V network driver\r\nlicense:        GPL\r\nalias:          vmbus:635161f83edfc546913ff2d2f965ed0e\r\ndepends:        hv_vmbus\r\nintree:         Y\r\nvermagic:       4.1.0-2-amd64 SMP mod_unload modversions\r\nparm:           ring_size:Ring buffer size (# of pages) (int)\r\nparm:           debug:Debug level (0=none,...,16=all) (int)\r\n<\/pre>\n<h1>\u8d77\u52d5\u6642\u306e\u52d5\u304d<\/h1>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@debian9:\/home\/shimizu# dmesg | grep &quot;hv_netvsc&quot;\r\n&#x5B;    1.303988] hv_vmbus: registering driver hv_netvsc\r\n&#x5B;    1.334760] hv_netvsc: hv_netvsc channel opened successfully\r\n&#x5B;    1.478279] hv_netvsc vmbus_16: Send section size: 6144, Section count:2560\r\n&#x5B;    1.482204] hv_netvsc vmbus_16: Device MAC 00:0d:3a:xx:xx:xx link state up\r\n<\/pre>\n<h1>udev\u52d5\u4f5c<\/h1>\n<p><a href=\"http:\/\/blog.keshi.org\/hogememo\/2014\/12\/28\/debian-vs-ubuntu-network-interface-names\">Debian vs Ubuntu: \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306e\u540d\u524d<\/a>\u3088\u308a<br \/>\n\u30fb\u30ab\u30fc\u30cd\u30eb\u304c\u30c7\u30d0\u30a4\u30b9\u3092\u691c\u51fa\u3059\u308b\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u30e9\u30f3\u30c9\u306e udevd \u306f \/lib\/udev\/rules.d\/ \u304a\u3088\u3073 \/etc\/udev\/rules.d\/ \u306b\u683c\u7d0d\u3055\u308c\u305f<br \/>\n\u3000rules \u30b9\u30af\u30ea\u30d7\u30c8\u3092 \u540d\u524d\u306e\u8f9e\u66f8\u9806\u3067\u9806\u6b21\u5b9f\u884c\u3057\u3066\u3044\u304f<br \/>\n\u30fb\u3069\u306e\u5b9f\u88c5\u3082\u81ea\u5206\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u3088\u308a\u5148\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u306e\u540d\u524d\u304c\u6c7a\u5b9a\u3057\u3066\u3044\u305f\u5834\u5408\u306b\u306f\u305d\u308c\u3092\u4e0a\u66f8\u304d\u3057\u306a\u3044<br \/>\n\u30fbDebian8\u306b\u3064\u3044\u3066systemd\/udev \u306e\u4e88\u6e2c\u53ef\u80fd\u306a\u540d\u524d\u306e\u6a5f\u80fd\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u7121\u52b9\u306b\u3057\u3066\u304a\u308a\u3001\u72ec\u81ea\u3067eth*\u3068\u540d\u4ed8\u3051\u308b\u3088\u3046\u306budev\u3092\u5909\u66f4\u3057\u3066\u3044\u308b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nroot@debian9:\/home\/shimizu# systemctl status systemd-udevd.service\r\n\u25cf systemd-udevd.service - udev Kernel Device Manager\r\n   Loaded: loaded (\/lib\/systemd\/system\/systemd-udevd.service; static; vendor preset: enabled)\r\n   Active: active (running) since \u6c34 2015-12-23 21:26:54 JST; 1 weeks 1 days ago\r\n     Docs: man:systemd-udevd.service(8)\r\n           man:udev(7)\r\n Main PID: 161 (systemd-udevd)\r\n   Status: &quot;Processing...&quot;\r\n   CGroup: \/system.slice\/systemd-udevd.service\r\n           \u2514\u2500161 \/lib\/systemd\/systemd-udevd\r\n\r\n12\u6708 23 21:26:54 debian9 systemd&#x5B;1]: Starting udev Kernel Device Manager...\r\n12\u6708 23 21:26:54 debian9 systemd&#x5B;1]: Started udev Kernel Device Manager.\r\n\r\nroot@debian9:\/home\/shimizu# cat \/lib\/udev\/rules.d\/80-net-setup-link.rules\r\n# do not edit this file, it will be overwritten on update\r\n\r\nSUBSYSTEM!=&quot;net&quot;, GOTO=&quot;net_setup_link_end&quot;\r\n\r\nIMPORT{builtin}=&quot;path_id&quot;\r\n\r\nACTION!=&quot;add&quot;, GOTO=&quot;net_setup_link_end&quot;\r\n\r\nIMPORT{builtin}=&quot;net_setup_link&quot;\r\n\r\nNAME==&quot;&quot;, ENV{ID_NET_NAME}!=&quot;&quot;, NAME=&quot;$env{ID_NET_NAME}&quot;\r\n\r\nLABEL=&quot;net_setup_link_end&quot;\r\n\r\n\r\n<\/pre>\n<h1>\u53c2\u8003URL<\/h1>\n<p><a href=\"http:\/\/d.hatena.ne.jp\/rx7\/20140121\/p1\">Linux\u3067\u4f7f\u3063\u3066\u3044\u308bNIC\u306e\u30c9\u30e9\u30a4\u30d0\u3084\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8abf\u3079\u308b\u65b9\u6cd5\u3044\u308d\u3044\u308d<\/a><br \/>\n<a href=\"http:\/\/network.station.ez-net.jp\/server\/linux\/storage\/fix-scsi.asp\">udev \u3067 SCSI \u30c7\u30d0\u30a4\u30b9\u540d\u3092\u56fa\u5b9a\u3059\u308b<\/a><br \/>\n<a href=\"http:\/\/d.hatena.ne.jp\/qpSHiNqp\/20110214\/1297651801\">udev\u306b\u3088\u308b\u30c7\u30d0\u30a4\u30b9\u306e\u547d\u540d\u306e\u56fa\u5b9a\u5316<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hyper-V\u3067udev\u304c\u5229\u7528\u3067\u304d\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u5468\u308a\u306b\u3064\u3044\u3066\u8abf\u67fb\u3057\u305f \u307e\u3060\u89e3\u6c7a\u3057\u3066\u3044\u306a\u3044 \u7d50\u8ad6(\u3068\u3044\u3046\u304b\u3053\u308c\u304b\u3089\u8abf\u3079\u308b\uff06\u8a66\u3059\u3053\u3068)\u3068\u3057\u3066 \u30fbudev\u306budevadm\u306e\u60c5\u5831\u3092\u5229\u7528\u3059\u308b(udevadm test\u3067 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[68],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2409"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2409"}],"version-history":[{"count":2,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2409\/revisions"}],"predecessor-version":[{"id":2412,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/2409\/revisions\/2412"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}