| 29 | == Xen Operation == |
| 30 | === Install Guest (DomU) === |
| 31 | * Install Guest OS |
| 32 | {{{ |
| 33 | $ sudo mkdir /home/xen_img |
| 34 | $ sudo dd if=/dev/zero of=/home/xen_img/etch.img bs=1G count=5 |
| 35 | $ sudo dd if=/dev/zero of=/home/xen_img/etch.swap bs=514MB count=1 |
| 36 | $ sudo /home/xen_img/mkfs.ext3 etch.img |
| 37 | $ sudo /home/xen_img/mkswap etch.swap |
| 38 | $ sudo mount -o loop etch.img /mnt |
| 39 | $ sudo debootstrap --arch i386 etch /mnt/ http://free.nchc.org.tw/debian |
| 40 | }}} |
| 41 | [[BR]] |
| 42 | * Config Guest OS |
| 43 | {{{ |
| 44 | $ sudo vim /etc/fstab |
| 45 | /etc/fstab |
| 46 | /dev/hda1 / ext3 defaults 0 1 |
| 47 | /dev/hda2 swap swap defaults 0 0 |
| 48 | proc /proc proc defaults 0 0 |
| 49 | |
| 50 | $ sudo vim /etc/hostname |
| 51 | etch |
| 52 | |
| 53 | $ sudo vim /etc/hosts |
| 54 | $ sudo vim /etc/network/interfaces |
| 55 | $ sudo cp /etc/apt/sources.list /mnt/etc/apt/ |
| 56 | }}} |
| 57 | |