VirtualBox on Ubuntu

จากเจ้าไปแต่ใจยังอาวรณ์
ลง Ubuntu เสร็จก็มิวายคิดถึง Windows XP เลยต้องหาทางเอามาใช้ ที่พึ่งก็คือ VirtualBox นี่เอง

1.อันดับแรกก็เข้าไปที่ Aoolications > Add/Remove...
VirtualBox จะอยู่ในส่วนของ System ดังรูป


2.พอติดตั้งเสร็จก็จะมีโปรแกรม VirtualBox OSE อยู่ใน Applications > System Tools เวลาเรียกใช้ก็จะมีหน้าตา ดังรูป

3.ที่นี้ก็กด New เพื่อสร้าง Virtual Machine ของเรา สำหรับติดตั้ง Windows XP
ตั้งชื่อให้มัน แล้วก็เลือกชนิดเป็น Windows XP ดังรูป


4.จากนั้นก็เลือกขนาดของ Memory ที่จะให้ใช้ เลือก 192 MB ตามที่โปรแกรมแนะนำมาก็ได้ แล้วก็ต่อด้วยการกำหนดขนาดของ Hard disk ซึ่งเลือกตามที่โปรแกรมแนะนำก็จะเป็น 10 GB


5.ทำต่อจนเสร็จก็จะได้หน้าตา ดังรูป

ที่นี้เราจะติดตั้งก็ต้องมีแผ่นติดตั้ง Windows XP ให้คลิกตรง CD/DVD-ROM เพื่อเลือกว่าจะใช้จาก Drive จริง หรือ ISO Image file


6.แต่พอเราจะเริ่มใช้งาน โดยคลิกที่ Start จะพบว่าใช้งานไม่ได้ โดยจะฟ้องว่า

VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Please install the virtualbox-ose-modules package for your kernel, e.g. virtualbox-ose-modules-generic..
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).

เป็นเพราะเรายังไม่ได้ลง driver นี่เอง ซึ่งต้องลงให้ตรงกับ kernel ของเราด้วย
วิธีการก็คือ เปิด terminal แล้วพิมพ์คำสั่ง uname -r จะได้รุ่นของ kernel ดังรูป


7.พอรู้รุ่นของ kernel แล้วก็ทำการ download และติดตั้ง ด้วยคำสั่ง
sudo apt-get install virtualbox-ose-modules-2.6.24-21-generic

แล้วก็รอจนติดตั้งเสร็จ
จากนั้นก็สั่งให้ driver ทำงาน ด้วยคำสั่ง

sudo /etc/init.d/vboxdrv start


คราวนี้พอกลับไป Start ก็จะเจอ Error อันใหม่ คือ

The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).


ให้เข้าไปที่ System > Administration > Users and Groups
คลิก Manage Groups แล้วเลือก vboxusers คลิก Properties

จากนั้นก็ทำเครื่องหมายที่ user ของเราเพื่อให้อยู่ใน group นี้
พอทำเสร็จก็ให้ logout แล้วกลับเข้ามาใหม่ เท่านี้ก็เป็นอันเรียบร้อยโรงเรียน Ububtu

Comments

Popular posts from this blog

Artillery Hornet + OctoPrint + Klipper

ย้ายบ้าน

ใต้ร่มกาสาวพัตร