ãã¼ãPCã§Linuxã®ä»®æ³å
ãã¾ã¾ã§ã¯ãã¼ãPCã§ã¯Windowsã使ã£ã¦ãã. ãªãã ããã ã§ä½¿ãæ £ãã¦*1ããã, ãããã¯ãã¼ãã¦ã§ã¢æ©è½ããã«ã«æ´»ããããã«ã¯ä»ã«é¸æè¢ãç¡ãã£ãããã. ã§ãæè¿ã¯ãã³ã¿ãæè¼æ©ã§ãLinuxããµã¤ãã«åãããããã, Windowsã使ã£ã¦ãã¦ãã©ããä»®æ³OSã¨ãã¦Linuxãåããã¦ãã¦, Windowsä¸ã®Linuxãã¹ããã«ä½¿ãããã®ããããã¦ãã¦ãæºã¾ã£ã¦ãã¾ãã¤ã¤ãã£ãã®ã§, æãåã£ã¦Windowsã使ãã®ãããããã¨ã«ãã*2.
ãã¼ãPCã§ã«ã¸ã¥ã¢ã«ã«Linuxã使ããªã, ã§ããã ãæ°ããã½ããã¦ã§ã¢ãåãã¦ã»ãã. Debianãªãunstableãå ¥ããã. ã§ããªããã¢ãããã¼ããã¦æ¥ã«åããªããªã£ãããããå°ã. ããã§ä»®æ³åã§ãã! ãã , ãã¼ãPCã®ä»®æ³åã«ã¯ããããåé¡ç¹ãããã®ã§, æ´çãã¦è§£æ±ºçãã¾ã¨ãã¦ãã.
ä»®æ³OSã®éç¨æ¹æ³
ãã¼ãPCã§ä»®æ³åããã¨è¨ã£ã¦ã, ãµã¼ãã®ä»®æ³åã®ããã«ã²ã¹ãOSãããããç«ã¡ä¸ãã¦å½¹å²ãã¨ã«ä½ãããããã¨ãã§ã¯ãªã, åºæ¬çã«ã¯ã²ã¹ãOSã¯1ã¤ã ãã§, å®éã«ãµã ã使ãã®ããã®OS. ã²ã¹ãOSã«ä½ããã©ãã«ããã£ãã¨ãã®ããã«, ãã¹ãOSå´ã§ã¹ãããã·ã§ãããåããªã©, ã¡ã³ããã³ã¹ã®ããã ãã«ä»®æ³åããã. ã¨ãªãã¨, ãµã¤ãã®ãµã¼ãç¨ã®ä»®æ³åã®ãã¹ããã©ã¯ãã£ã¹ã¨ã¯ç°ãªã£ã¦ããã¨æã. éè¦ãªãã¤ã³ãã¯ä»¥ä¸ã®éã.
ãããã¯ã¼ã¯ã¯NATæ¥ç¶ã§
ããªãã¸æ¥ç¶ã«ãã¦ãã¾ãã¨ãã¼ãPCãã©ããã®ãããã¯ã¼ã¯ã«æ¥ç¶ããã¨ãã«, 2ã¤ã®ãã¹ãã«IPã¢ãã¬ã¹ãå²ãå½ãããã¨ã«ãªã£ã¦ãã¾ãè¡åããããªã. ãã¨è¨ã£ã¦, æ®æ®µã¯ã²ã¹ãOSã使ãã®ã§ãã¹ããªã³ãªã¼æ¥ç¶ã ã¨ä¸ä¾¿. ãªã®ã§äºå®ä¸NATæ¥ç¶ã«ãããããªã.
ãã¹ãOSã®ã·ã£ãããã¦ã³æã«ã²ã¹ãOSããµã¹ãã³ã
ããã¯å¿ é ã§ã¯ãªãããã©, å人çã«ã¯Emacsããã¼ã¢ã³åãã¦ãã£ã¨èµ·åãã¦ããããã®ã§, ã²ã¹ãOSã¯ãµã¹ãã³ãããéç¨ã«ããã.
PCãèµ·åãããã²ã¹ãOSã®ãã°ã¤ã³ç»é¢ã表示
PCãèµ·åãã¦ãã¹ãOSã«ãã°ã¤ã³å¾ã«ã²ã¹ãOSã®ç»é¢ãã¦ã£ã³ãã¦ã«éãã¦ä½¿ãã¨ããã®ã§ã¯, Windowsã使ã£ã¦ããã®ã¨å¤§å·®ãªãã®ã§, èµ·åå¾ã«ç´æ¥ã²ã¹ãOSã«ãã°ã¤ã³ããã. ãã¹ãOSã®åå¨ãæ®æ®µã¯æèããããªã.
KVMã使ã
ã²ã¹ãOSã®ãã°ã¤ã³ç»é¢ã表示ããããã«, XDMCPãç¨ãã¦ãã¹ãOSã®Xãµã¼ãã¨ã²ã¹ãOSã®Xã¯ã©ã¤ã¢ã³ããæ¥ç¶ãããã¨ã«ãã. ã¨ãããã¨ã¯ãã¹ãOSã«Xãµã¼ããå¿ è¦ã¨ãªã. ã ã£ãããã¹ãOSã¨ãã¦ããµã¤ãã«ã¤ã³ã¹ãã¼ã«ããLinuxã使ãã®ã楽. ä»åã¯Debian wheezyã使ããã¨ã«ãã.
Xenãªããã ã¨ãã£ã¨å ¨ãå¥ã®ã½ãªã¥ã¼ã·ã§ã³ãããã®ã ã¨æããã©, ãµã¤ãã®ç¥èã§ã§ããããªKVMã使ã£ã¦ãã.
ãã¼ãPCã§ä»®æ³åããä¸ã§ã®åé¡ç¹
å ·ä½çãªä»®æ³åè¨å®ã®åã«, ä¸è¨ã®éç¨ã§çºçããåé¡ç¹ã¨, ããããã®è§£æ±ºæ¹æ³ãæ¸ãã¦ãã.
é»æºç®¡ç
å®éã«ã¯PCãããããªåä½ãã¦ãã¦ã, ã²ã¹ãOSå´ããã¯é»æºã±ã¼ãã«ãæ¥ç¶ããã¦ããããã«è¦ãã¦ãã¾ã. ããã§ã¯ããããªæ®éãããããªãã¦å°ãã, ããããªãæ®ããããã«ãªã£ãã¨ãã«ã¢ã©ã¼ããã¦ããããªã. æã£åãæ©ã解決çã¨ãã¦ã¯, ãã¹ãOSå´ã®é»æºç®¡çã¢ããªãsshçµç±ã§èµ·åãã. X転éãæå¹ã«ãã¦ããã°ãã¹ãOSå´ã®é»æºã¢ã¤ã³ã³ããã¡ãã¨ã²ã¹ãOSå´ã®ãã¹ã¯ãããã«è¡¨ç¤ºããã.
ããä¸ã¤ã®åé¡ã¯ã·ã£ãããã¦ã³. ã²ã¹ãOSå´ã®ãã¹ã¯ãããç»é¢ã§ã¯ã©ãæä½ãã¦ãé»æºãåããªãã®ã§, æ¬ä½ã®é»æºãã¿ã³ãæ¼ãã®ãæ©ã(ACPIã«ããã«ã¯ããã£ã¦ããã). ãµã¹ãã³ããåæ§.
ãããã¯ã¼ã¯ç®¡ç
NATæ¥ç¶ã ã¨å®éã«å¤é¨ã®ãããã¯ã¼ã¯ã«æ¥ç¶ããã®ã¯ãã¹ãOSã§, ã²ã¹ãOSããã¯(å¤é¨ã®ãããã¯ã¼ã¯ã®æç¡ã«ããããã)æç·æ¥ç¶ã®LANãåå¨ããããã«ããè¦ããªã. ããã§ã¯ç¡ç·LANã®æ¥ç¶è¨å®ãã§ããªãã¦å°ã. ãã®å ´åãé»æºç®¡çã¨åæ§ã«, ãããã¯ã¼ã¯ç®¡çã®ã¢ããªãsshçµç±ã§èµ·åããã®ã楽. ãã ã, ç¡ç·LANã«æ¥ç¶ããå ´åã®ãã¹ã¯ã¼ãã®å ¥åæã«, D-Busã§èªè¨¼ããã¼ã¸ã£ãèµ·åã§ããªã*3ããã«å ¥åæ¬ã表示ãããªããããããªã. ãã®å ´åã®å¯¾å¦ã¯æå¾ã®ã»ã¯ã·ã§ã³ã§è§¦ãã.
é³é調ç¯
ã¾ããµã¤ãã«ã¤ã³ã¹ãã¼ã«ããã¨ããããã²ã¹ãOSã§ã¯é³ãé³´ããªã. ãã¡ãã¨è¨å®ãè¡ãªãå¿ è¦ããã.
é³ãåºãããã«ãªã£ã¦ã, Debian wheezyã®ãã¼ã¸ã§ã³ã®qemu-kvmã§ã¯ã²ã¹ãOSå´ã§é³é調ç¯ãã§ããªã. ãªã®ã§ãã¹ãOSå´ã®é³é調ç¯ã¢ããªãé éå®è¡ãããããããæããªã.
ã¡ãªã¿ã«, ã²ã¹ãOSããé³é調ç¯ãããããã¿èªä½ã¯åå¨ãã¦ãã¦, Debian wheezyã®ãã¼ã¸ã§ã³ã®qemu-kvmã§ã./configure
ã§--enable-mixemu
ãã¤ãã¦ã³ã³ãã¤ã«ããã°æå¹ã«ãªã. ããã«å¾ã®ãã¼ã¸ã§ã³ã§ã¯ããã©ã«ãã§æå¹åããããããªã®ã§, ä»ã ãã®åé¡.(追è¨: ãã確èªãã¦ã¿ãã¨ãã®ãããã ãåãè¾¼ã¾ãã¦ããªã.)
ãã®ä»ã®ãã¼ãã¦ã§ã¢è¨å®
ä»ã«ããã¼ãã¦ã§ã¢è¨å®ãªã©ãããããå ´åã¯ãã¹ãOSå´ã®è¨å®ã¢ããªãé éèµ·åããå¿ è¦ããã.
æå»ãããã
ã²ã¹ãOSããµã¹ãã³ããã¦, ãã°ããå¾ã«ã¬ã¸ã¥ã¼ã ããã¨, ãªãã¨ã²ã¹ãOSã®æå»ãããã. ãã¨ãã²ã¹ãOSã«NTPãè¨å®ãã¦ãã¦ãæå»ãè£æ£ãããã¾ã§ã«æéãããã£ã¦ãã¾ã(ã, ããå¹ ã大ããããã¨è£æ£ãããããã¦ãã¾ã). ãªã®ã§ã²ã¹ãOSã®ã¬ã¸ã¥ã¼ã æã«æå»ã調æ´ããå¿ è¦ããã.
ã¡ãªã¿ã«, ã²ã¹ãOSãã·ã£ãããã¦ã³ããå¾ã«ä¸ããèµ·åããå ´åã¯èªåçã«æå»ã調æ´ããã.
sshã§ç¹å®ã®ã³ãã³ãã®ã¿ãå®è¡
ãã¹ãOSä¸ã®ã¢ããªãã²ã¹ãOSããé éå®è¡ãããã¨ã§åé¡ã解決ãããã¨ãå¤ã, ãã®æ§è³ªä¸rootã§èµ·åãã¹ãã ã£ããããã¦, ããããã³ãã³ããç¡æ¡ä»¶ã«å®è¡ã§ããããã«ãã¦ãã¾ãã¨ãããã«ã¾ãã. ããã§, sshã®authorize_keysã使ã£ã¦1ã¤ã®ã³ãã³ãã ããå®è¡ã§ããéµãç»é²ãããã¨ã«ãã. å ·ä½çã«ã¯~/.ssh/authorized_keysã«
command="hoge foo bar",options ssh-rsa ABCD...
ã®ããã«æ¸ãã¨, ABCD...
ã®éµã«ããæ¥ç¶ã§ã¯ã³ãã³ãhoge foo bar
(foo
, bar
ã¯ã³ãã³ãå¼æ°)ããå®è¡ã§ããªãããã«ãªã, 対話çã«æ¥ç¶ãããã¨ãã¦ããã®ã³ãã³ããå®è¡ããã. ããã«options
ã®ã¨ããã«è¨å®ãæ¸ããã¨ã§ç«¯æ«ãç¡å¹ã«ãã, ãã¼ã転éãç¡å¹ã«ããã¨ãããããªãã¨ãã§ãã.
ãã®æã®è¨å®ããã¡ãã¡æã§æ¸ãã®ã¯é¢åãªã®ã§, é éã³ãã³ããè¨å®ããããã®ã¹ã¯ãªãããä½ã£ã: https://gist.github.com/4108520#file-auth-command-sh
使ãæ¹
ã²ã¹ãOSå´ã§
$ ./auth-command.sh add HOST SOME-NAME COMMAND ARG1 ARG2 ...
ã¨ããã¨, é常éãHOST
ã«æ¥ç¶ãããã®ã§, ãã¹ã¯ã¼ããæã¤ãªã©ãã¦ãã°ã¤ã³ããã¨, COMMAND ARG1 ARG2...
ãSOME-NAME
ã¨ããååã§ç»é²ããã. 以éã¯ã²ã¹ãOSã§
$ ./auth-command.sh run SOME-NAME
ã¨ããã¨, ç»é²ããããã¹ãã®ç»é²ãããã³ãã³ããå®è¡ããã.
ã¦ã¼ã¶åã®æå®ãX転éãªã©ãã®ä»ã®ãªãã·ã§ã³ã«ã¤ãã¦ã¯
$ ./auth-command.sh help
ãåç §.
qemuã®ããã¯
ãµã³ã¹ãã³ãããã®å¾©å¸°æã®æå»èª¿æ´ãããã«ã¯, ãµã¹ãã³ããã復帰ããç¬éã«ä½ããã®ã¹ã¯ãªãããå®è¡ããå¿
è¦ããã. libvirtã使ã£ã¦ããå ´åã¯ãã¹ãOSã«/etc/libvirt/hooks/qemuã¨ããã¹ã¯ãªãããç½®ãã¦ããã°, å種ã¤ãã³ãçºçæã«ãã®ã¹ã¯ãªãããå¼ã°ãã. ã²ã¹ãOSã®èµ·åæã«å¼ã°ããã¤ãã³ãstart
ã®ãã³ãã©ãæ¸ãã¦ããã°å¤§ä¸å¤«ãã(ããã¥ã¢ã«ãè¦ãã¨started
ã¨ãã, ã²ã¹ãOSã®èµ·åå¾ã«çºçããã¤ãã³ããããããã©, æ°ãç®ã®ãã¼ã¸ã§ã³ã§ãããµãã¼ãããã¦ããªãã®ã§æ³¨æ).
ãã ã, 注æã2ç¹.
start
ã¤ãã³ãã¯ã²ã¹ãOSã®èµ·åæã«çºçããã®ã§, ã¹ã¯ãªããå®è¡æã«ã¯ã¾ã å®å ¨ã«èµ·åããã£ã¦ããªã- å®éã®æå»èª¿æ´ã¯ã²ã¹ãOSä¸ã§ããå¿ è¦ãããã®ã§, ãã¹ãOSããã²ã¹ãOSã®ã³ãã³ããå¼ã¶å¿ è¦ããã
ãã®è¾ºããããã«ã¯ãããã¹ã¯ãªãããä¸ããä½ãã®ã¯é¢åãªã®ã§, start
ã¤ãã³ãæã«ã²ã¹ãOSã®èµ·åãå¾
ã£ã¦ããã³ãã³ããé éå®è¡ããããã«è¨å®ããã¹ã¯ãªãããä½ã£ã: https://gist.github.com/4169176#file-virt-start-hook-sh
使ãæ¹
ãã¹ãOSå´ã§
$ ./virt-start-hook.sh add GUEST GUEST-NAME/SOME-FEATURE COMMAND ARG1 ARG2 ...
ã¨ããã¨, start
ã¤ãã³ãæã«GUEST
ä¸ã§COMMAND ARG1 ARG2 ...
ãå®è¡ãããããã«ãªã. GUEST-NAME
ã¯ã²ã¹ãOSã®libvirtä¸ã®ç»é²åã§, SOME-FEATURE
ã¯ãã®ã¤ãã³ããã³ãã©ã«ã¤ããåå(è¤æ°ã®ãã³ãã©ãç»é²ããã¨ãã®åºå¥ã®ãã).
èªåè¨å®ã¹ã¯ãªãã
auth-command.sh
ãvirt-start-hook.sh
ããã£ã¦ãã¦ã, ãã®å¾ã®è¨å®ã¯ããããã. ãªã®ã§, auth-command.sh
ãvirt-start-hook.sh
ããã¦ã³ãã¼ããã¦ååé¡ã«å¯¾å¦ããããã®è¨å®ãèªåçã«è¡ãªãã¹ã¯ãªãããä½ã£ã: https://gist.github.com/4169765#file-virt-laptop-sh
ããã¯ã²ã¹ãOSå´ã§(é常ã®ã¦ã¼ã¶ã¨ãã¦)å®è¡ããã¹ã¯ãªããã§,
$ ./virt-laptop.sh HOST FEATURE
ã¨ããããã«ä½¿ã. HOST
ã¯ãã¹ãOS, FEATURE
ã¯ã¤ã³ã¹ãã¼ã«ããè¨å®ã§ä»¥ä¸ã®ãããã(çç¥æã¯ãã¹ã¦ã¤ã³ã¹ãã¼ã«).
- ntp
- ã²ã¹ãOSèµ·åæã®æå»ã®èªå調æ´
- audio
- ã²ã¹ãOSã§é³ãåºãããã«ããè¨å®, ããã³ãªã¼ãã£ãªãããµãã¡ãã¥ã¼ã«ç»é²
- gnome-control-center
- ãã¹ãOSã®
gnome-control-center
ãã¡ãã¥ã¼ã«ç»é² - network-manager
- ãã¹ãOSã®ãããã¯ã¼ã¯ç®¡çã¢ãã¬ããããã°ã¤ã³æã®èªåèµ·åã«ç»é²
- power-manager
- ãã¹ãOSã®é»æºç®¡çã¢ãã¬ããããã°ã¤ã³æã®èªåèµ·åã«ç»é²
å¿ è¦ãªããã±ã¼ã¸ãèªåã¤ã³ã¹ãã¼ã«ããé½åä¸Debianéå®. ã¡ãã¥ã¼ã®ç»é²ãã¿ã¹ã¯ãã¬ã¤ã®é½åä¸GNOMEéå®. ããã«, ã²ã¹ãOSã®ãã¹ãåã¯libvirtã®ç»é²åã¨ä¸è´ãã¦ããå¿ è¦ããã.
è¨å®æ¹æ³
ä¾ã¨ãã¦ãã¹ãOSã¨ã²ã¹ãOSã®ãã¹ãåãããããkoko
ã¨jonah
ã¨ãã.
ãã¹ãOSã®ã»ããã¢ãã
ã¾ãã¯ãã¹ãOSããµã¤ãã«ã¤ã³ã¹ãã¼ã«. ããã§ã¯Debian wheezyãã¤ã³ã¹ãã¼ã«ããã¨ä»®å®. ãã ã, å¿
è¦ãªãã®ã§Graphical desktop environment
ã¯é¸æããªã. Laptop
ã¨SSH server
ã¯å¿
ãé¸æãã.
ç¶ãã¦å¿ è¦ãªãã®ãã¤ã³ã¹ãã¼ã«.
koko# aptitude install network-manager alsa xserver-xorg ntp virtinst virt-top qemu-kvm libvirt-bin
ã²ã¹ãOSã®ãã¹ãåãè¨å®.
koko# vi /etc/hosts
+192.168.122.10 jonah
ã·ã£ãããã¦ã³æã«ã²ã¹ãOSããµã¹ãã³ãããããã«ãã.
koko# vi /etc/default/libvirt-guests
+ON_SHUTDOWN=suspend
ã²ã¹ãOSã®ã»ããã¢ãã
é常ã®ä»®æ³OSã®ã»ããã¢ããæé ã«å¾ã. ãã¨ãã°ä»¥ä¸ã®ããã«ãã. ã»ããã¢ããæã«ã¯ãã¹ã¯ãããç°å¢(GNOME)ãã¤ã³ã¹ãã¼ã«ãã. ã¾ãGRUBãã¤ã³ã¹ãã¼ã«ãããã®ã¨ãã.
koko# mkdir -p /var/vm/jonah koko# cd /var/vm/jonah koko# qemu-img create -f qcow2 jonah.img 20G koko# qemu-img create -f qcow2 jonah.swap.img 4G koko# virsh net-autostart default koko# virsh net-start default koko# virt-install --connect qemu:///system \ --name jonah --ram=3072 --vcpus=4 \ --disk path=./jonah.img,format=qcow2 \ --disk path=./jonah.swap.img,format=qcow2 \ --network network=default \ --os-type linux --os-variant debianwheezy \ --graphics none \ --autostart \ --location='http://d-i.debian.org/daily-images/amd64/' \ --extra-args='console=ttyS0,115200n8' koko# virsh destroy jonah # ã»ããã¢ããå¾, ä¸æ¦åæ¢
ã²ã¹ãOSã®IPã¢ãã¬ã¹ãåºå®ãã.
koko# virsh net-destroy default koko# virsh net-edit default
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
+ <host mac='52:54:**:**:**:**' ip='192.168.122.10'/>
</dhcp>
</ip>
koko# virsh net-start default
52:54:**:**:**:**
ã®é¨åã¯ã²ã¹ãOSã®MACã¢ãã¬ã¹ãæå®ãã(virsh edit jonah
ããã°devices/interface[@type='network']/mac
ã§ç¢ºèªã§ãã).
以ä¸, èµ·åå¾ã®ã²ã¹ãOSè¨å®.
koko# virsh start jonah
å¿ è¦ã«å¿ãã¦unstableã«ã¢ããã°ã¬ã¼ã.
jonah# sed -i 's/wheezy main/sid main non-free contrib/g' /etc/apt/sources.list jonah# aptitude update jonah# aptitude full-upgrade
GRUBã®ã¡ãã¥ã¼ã®è¡¨ç¤ºæéãçããã¦, èµ·åéä¸ã®ã¡ãã»ã¼ã¸ã表示ãããããã«ãã¦ãã.
jonah# vi /etc/default/grub
-GRUB_TIMEOUT=5 +GRUB_TIMEOUT=1 ... -GRUB_CMDLINE_LINUX="" +GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
jonah# update-grub
ãã¹ãOSã®ãã¹ãåãè¨å®ãã.
jonah# vi /etc/hosts
+192.168.122.1 koko
Xè¨å®(ãã¹ãOSå´)
ã²ã¹ãOSã®Xã¯ã©ã¤ã¢ã³ããXãµã¼ãã«æ¥ç¶ã§ããããã«ãã.
koko# vi /etc/X0.hosts
+192.168.122.10
ã°ã©ãã£ãã¯ãåå¨ããªãã¨GDMã®ããã»ã¹ããããã¯ãèµ·ãããããªã®ã§, 使ããªãã¦ãVNCã®è¨å®ããã¦ãã(ã²ã¹ãOSã®ãªã¹ã¿ã¼ããå¿ è¦).
koko# virsh edit jonah
<devices>
...
+ <graphics type='vnc' port='-1' autoport='yes' listen='192.168.122.1'/>
</devices>
èµ·åæã«ã²ã¹ãOSã®ãã°ã¤ã³ç»é¢ã表示ãã.
koko# vi /etc/inittab
id:2:initdefault:
...
+x:2:respawn:/usr/bin/X -once -query jonah
initdefault
ãããã©ã«ãã©ã³ã¬ãã«ãªã®ã§x
ã®ã©ã³ã¬ãã«ã¯ããã«åããã.
Xè¨å®(ã²ã¹ãOSå´)
XDMCPãæå¹ã«ãã.
jonah# vi /etc/gdm3/daemon.conf
[xdmcp]
+Enable=true
é»æºç®¡ç
ã²ã¹ãOSä¸ã§ä»¥ä¸ãå®è¡ããã ã.
jonah$ wget -O - http://raw.github.com/gist/4169765/virt-laptop.sh | sh -s install -v koko power-manager
-v
ã®ä»£ããã«-t
ã¨ããã¨è£å´ã§å®è¡ãããã³ãã³ãã表示ããã.
GNOME3ããã¯åä½ã®é»æºç®¡çã¢ãã¬ããããªããªã£ã¦ãã¾ã£ãã®ã§, Xfceã®é»æºç®¡çã¢ãã¬ããã使ãããã«è¨å®ããã. ãã¹ãOSã«xfce4-power-manager
ãã¤ã³ã¹ãã¼ã«ããã¦, ã²ã¹ãOSã®ç¾å¨ã®ã¦ã¼ã¶ã®ãã°ã¤ã³æã«ã¢ãã¬ãããèªåèµ·åããããã«è¨å®ããã.
ãããã¯ã¼ã¯ç®¡ç
ã²ã¹ãOSä¸ã§ä»¥ä¸ãå®è¡ããã ã.
jonah$ wget -O - http://raw.github.com/gist/4169765/virt-laptop.sh | sh -s install -v koko power-manager
GNOMEã®ãããã¯ã¼ã¯ç®¡çã¢ãã¬ããã使ãããã«è¨å®ããã. å
·ä½çã«ã¯, ãã¹ãOSã«network-manager-gnome
ãã¤ã³ã¹ãã¼ã«ããã¦, ã²ã¹ãOSã®ç¾å¨ã®ã¦ã¼ã¶ã®ãã°ã¤ã³æã«ãã¹ãOSä¸ã®nm-applet
ãèªåèµ·åããããã«è¨å®ããã.
é³é調ç¯
ã¾ã, ã²ã¹ãOSã®é³å£°ããã¤ã¹ãæå¹ã«ãã¦ãã(ã²ã¹ãOSã®ãªã¹ã¿ã¼ããå¿ è¦).
koko# virsh edit jonah
<devices>
...
+ <sound model='ac97'/>
</devices>
ãã¨ã¯ã²ã¹ãOSä¸ã§ä»¥ä¸ãå®è¡ããã ã.
jonah$ wget -O - http://raw.github.com/gist/4169765/virt-laptop.sh | sh -s install -v koko audio
ã¾ã, ãã¹ãOSã§ã®é³é調æ´ãå¯è½ã«ããããã«alsa-utils
ãã¤ã³ã¹ãã¼ã«ããã. ã¾ã, ãã®ã¾ã¾ã§ã¯ãã°ãã°ãã¥ã¼ãç¶æ
ã«ãªã£ã¦ããã®ã§, èªåçã«ãã¥ã¼ã解é¤ãè¡ãªã.
次ã«, qemuã®é³å£°ããã¤ã¹ãæå¹ã«ããè¨å®ãè¡ãªããã. å ·ä½çã«ã¯, /etc/libvirt/qemu.confã
# vnc_allow_host_audio = 0
+vnc_allow_host_audio = 1
ã¨æ¸ãæãããã¨ã¨, ã¦ã¼ã¶libvirt-qemu
ãaudio
ã°ã«ã¼ãã«è¿½å ãããã¨.
æå¾ã«, ã²ã¹ãOSã®ã¡ãã¥ã¼ã«, ãã¹ãOSä¸ã®alsa-mixer
ãèµ·åããããã®ã¢ã¤ãã ã追å ããã.
ãã®ä»ã®è¨å®
ã²ã¹ãOSä¸ã§ä»¥ä¸ãå®è¡ããã¨, ãã¹ãOSä¸ã®gnome-control-center
ãéãã¡ãã¥ã¼ã追å ããã.
jonah$ wget -O - http://raw.github.com/gist/4169765/virt-laptop.sh | sh -s install -v koko gnome-control-center
æå»èª¿æ´
ã²ã¹ãOSä¸ã§ä»¥ä¸ãå®è¡ããã ã.
jonah$ wget -O - http://raw.github.com/gist/4169765/virt-laptop.sh | sh -s install -v koko ntp
ã¾ã, ã²ã¹ãOSã«ntp
ãã¤ã³ã¹ãã¼ã«ããã¦, /etc/ntp.confã«
+tinker panic 0
ã®è¨å®ãããã(æå»ã«å¤§å¹ ãªããããã£ã¦ãä¿®æ£ãããããã«ãªã).
ããã«, qemuã®start
ã¤ãã³ãã§ã²ã¹ãOSã®/etc/init.d/ntp restart
ãå®è¡ãããããã«ãªã.
ãã®ä»ã®ç´°ããªåé¡
ãããã¯ã¼ã¯ç®¡çã¢ãã¬ããã®èªè¨¼
ç¡ç·LANã®ãã¹ã¯ã¼ããªã©ãè¦æ±ãããã¨ããã§å ¥åç»é¢ã表示ãããã«åºã¾ã£ã¦ãã¾ãã®ã§, ãããããæ¥ç¶è¨å®ãéãã¦ãã. ã¢ãã¬ããã®ãããããã¦ã³ã¡ãã¥ã¼ã§ã¢ã¯ã»ã¹ãã¤ã³ããé¸æããã¨ãã¯ã¤ã¤ã¬ã¹ãã®ã¿ãã«é ç®ã追å ãããã®ã§, è¨å®ãç·¨éãã¦ãã»ãã¥ãªãã£ãã®ã¿ãã§ãã¹ã¯ã¼ããå ¥åããã°, æ¥ç¶ããã.
ã¢ãã¬ããã®ãã¼ã
é éã§èµ·åãã¦ããã¢ããªã«ã¯ã²ã¹ãOSå´ã®ãã¼ãè¨å®ãé©ç¨ãããªã. ããããªãã¨ãããå ´åã¯, ãã¹ãOSå´ã®/etc/gtk-2.0/gtkrcãè¨å®ããããã¼ãã®ãã®ã«ãã. ãã¨ãã°
koko# aptitude install murrine-themes koko# cd /etc/gtk-2.0/ koko# ln -s /usr/share/themes/Albatross/gtk-2.0/gtkrc
ã¨ããã¨, é éèµ·åããã¢ããªã®ãã¼ãã¯Albatrossã«ãªãã®ã§, ã²ã¹ãOSå´ã®GTK2, GTK3ã®ãã¼ããAlbatrossã«ããã°ãã¼ããçµ±ä¸ã§ãã.
ãã°ã¤ã³ä¸ã®ã·ã£ãããã¦ã³
ãã¹ãOSãã·ã£ãããã¦ã³ããã¨ãã«ã²ã¹ãOSããµã¹ãã³ãããå ´åã¯, ãã°ã¤ã³ããã¾ã¾ã·ã£ãããã¦ã³ããã¨ããããããªããã¨ã«ãªã(ã¬ã¸ã¥ã¼ã å¾ã«åãã»ãã·ã§ã³ã«åæ¥ç¶ã§ããªã)ã®ã§, ãã¡ãã¨ãã°ã¢ã¦ãããæ¹ããã.
ã¡ãªã¿ã«ãã°ã¤ã³ä¸ã«ãã¹ãOSããµã¹ãã³ããã¦ã¿ãã¨ãã, ä½äºããªããã¾ããã£ã(ããã©ããã¨ãã¯èªå·±è²¬ä»»ã§).
GDMã®ã¨ã©ã¼
ããç¨ã«, ãã°ã¢ã¦ãããã¨ããPCã®èµ·åæ(GDMãç«ã¡ä¸ããã¨ã)ã«, "Oh no! Something has gone wrong."ã¨ããç»é¢(ããããé»ç»é¢)ãåºãã¨ãããã. ãã¨ãã°XDMCPã®ã¯ã¨ãªã§-once
ãã¤ããªãã¨ããé »çºããã®ã§, ããã»ã¹ãå¤éã«èµ·åãã¦ãã¾ã£ã¦ããã®ãåå ããã. /etc/gdm3/daemon.confã§DisplaysPerHost=2
ã¨ãããã¨å¤å°æ¹åããããç¥ããªã(æªç¢ºèª).
GNOME 3 Shell
GNOME 3 Shellã¯3Dãã¼ãã¦ã§ã¢ã¢ã¯ã»ã©ã¬ã¼ã·ã§ã³ãå¿ è¦ã¨ãã¦ãã¦, ä»®æ³åç°å¢ã¯ãµãã¼ãããã¦ããªã*4ã®ã§, ç¾ç¶ã§ã¯fallback modeã«ãªã£ã¦ãã¾ã. ãã ãé å¼µãã°å®ã¯ã½ããã¦ã§ã¢ã¬ã³ããªã³ã°ã§ãåãã¨ãã話ãããã, ããã«åºã¥ãã¦fallback modeã®æä¾ããããã¹ããã¨ããè°è«ãããã®ã§, ãã®ãã¡ãµã¤ãã«GNOME 3 Shellãåãããã«ãªãããç¥ããªã. (å人çã«ã¯fallback modeã®æ¹ã使ããããã®ã§åããªãã¦ããã®ã ãã©......)
USB
USBããã¤ã¹ãã²ã¹ãOSã«pass throughããã°ãã¾ããã, ããã«æãã®ã ãã©, ãªãããã¾ããããªãã£ã. ãã¾ãããæ¹ãæ±ã.
*1:æã Windowsã¢ããªãä½ã£ãããã¦ããã®ã§Win32 APIãªããã¯ã ãããããã£ã¦ãã¦, APIããè¦ãOSã®ã¢ã¼ããã¯ãã£ã«é¦´æã¿ããã
*2:ã¨è¨ã£ã¦ãæ®æ®µä½¿ãã®ãã¼ãPCã§Windowsã使ãã®ããããã ãã§Windowsæ©ãå®å ¨ã«ãªãããããã§ã¯ãªã
*3:D-Busã¯ãã¹ããã¾ããã§åä½ããããã«ã¯è¨è¨ããã¦ããã, D-Busã®æ¥ç¶ã転éãã¦ã¿ã¦ããã¾ããããªãã£ã