ผมคิดว่าคุณจะพบบทความนี้ extremely unusual (แปลกมาก) และ yet fun (แต่มันสนุก) ก่อนอื่น ผมเคยเขียนเกี่ยวกับ Citrix XenServer ในอดีต คือวิธี install และ configure ทั้งหมด operation เป็น no-brainer (ง่ายมาก/ไม่ต้องคิด) โดยเฉพาะเพราะ XenServer เป็น basis (พื้นฐาน) สำหรับ free XCP ซึ่งมาพร้อม similar capabilities อย่างไรก็ตาม ผมไม่ได้ linger (คอย/อยู่) มากเกินไปนอกเหนือจาก initial setup
วันนี้ ผมจะแสดงวิธี install XenServer อีกครั้ง บน laptop ไม่เคย (no less) โดย fully aware (ยินดี/รับรู้เต็มที่) ว่า laptops ไม่ได้ meant to be (มีเจตนาเป็น) typical hardware สำหรับ bare-metal hypervisors อีกทั้ง ผมจะแสดงวิธี manage server จาก command line ด้วย SSH และ XenCenter GUI ที่คล้าย VMware vSphere ผมจะแสดงวิธี manage ISO repositories และเราจะเพิ่ม CIFS share ด้วย ทั้งหมดนี้บน box ที่มี SSD, VT และแม้แต่ VT-d ดังนั้นมันจะ really awesome (เก่งมาก/เยี่ยมมาก) อีกทั้งยังมี tutorial ต่อมา coming soon ใส่ใจติดตาม ติดตามมา
Test box (เครื่องทดสอบ)
Victim (เหยื่อ) สำหรับ installation คือ T400 laptop ใหม่ๆของผม ซึ่งมาพร้อม handsome array of goodies (ชุดอุปกรณ์ที่ดูดี) ใน desktop world มันเป็น respectable machine (เครื่องที่น่าประทับใจ) แต่เป็น joke (ตลก/เล็กเกิน) สำหรับ anything serious (อะไรที่จริงจัง) โดยไม่มีอย่างน้อย 8 physical cores และ 72GB RAM เราไม่ควรพูดเลย อย่างไรก็ตาม มันมี muscle (กำลัง/ความสามารถ) บางอย่าง รวมถึง SSD สำหรับ local storage และ full array ของ virtualization extensions ก่อนใช้ machine สำหรับ distro testing ผมตัดสินใจให้มัน spin (ทดสอบ/เล่น) กับ XenServer
Installation (การติดตั้ง)
Installation identical (เหมือนกันทุกประการ) กับ previous attempt ดังนั้นผมจะไม่ bore (ทำให้เบื่อ) คุณด้วย useless details ไม่มี screenshots เพราะผมไม่ bother (ไม่พยายาม/ไม่กังวล) redo installation cycle ใน virtualization product อื่นเพื่อ demonstrate steps ต่างๆ All in all (โดยรวม) quick และ painless procedure (ขั้นตอนที่ไม่เจ็บปวด)
Interesting bits รวมถึง XenServer/laptop interaction ก่อนอื่น XenServer มาพร้อม RedHat 5.1 ดังนั้นเป็น relatively old release แต่ just as capable (เหมือนกันในความสามารถ) มันไม่มีปัญหา detecting SSD อีกทั้ง เมื่อรันใน battery mode มันจะ automatically dim display และ function buttons ทั้งหมดทำงาน แตไม่มี Wireless connectivity และไม่ควรมี เพราะ no one sane (ไม่มีใครปกติ) จะ manage virtualization products โดยไม่มี wired network connection
จัดการ XenServer (Manage XenServer)
ตอนนี้ เพื่อ manage XenServer คุณลอง all kinds of things ได้ ก่อนอื่น physical console บน box เอง จะแสดงใน blue ncurses menu คุณยัง drop to local shell (เข้าสู่ shell ท้องถิ่น) และ run things ได้ที่นั่น คุณสามารถ SSH เข้า box จากเครื่องอื่น และทำงานบน command line หรือแม้แต่ fire (เปิด) red-colored ncurses menu

XenCenter
หรือคุณลอง XenCenter Download สำหรับ utility นี้ available หากคุณ access XenServer ผ่าน HTTP ใน browser น่าเสียดาย installer 只有 (only available for) Windows แต่ stand to logic (สมเหตุสมผล) เพราะคุณคาดหวัง Windows users จะ more oriented toward GUI work
Installation fairly trivial (ค่อนข้างตुच्छ/ง่าย) และ soon (เร็วๆนี้) คุณจะ run simple GUI ที่ quite self-evident และ explanatory (อธิบายได้ด้วยตัวมันเอง) ในสิ่งที่มันทำได้ หากคุณเคย work with other solutions คุณจะ know your way around (รู้จักทาง/คุ้นเคย) defining storage pools, VMs ฯลฯ
First step คือ add server และ connect ด้วย name หรือ IP address
ตอนนี้ มา install machine กัน
ติดตั้งและตั้งค่า Virtual Machine
Well ผมอยากดูว่า GUI manager นี้ flexible และ useful และ intuitive (เข้าใจง่าย/直覺) แค่ไหน ดังนั้นตัดสินใจ create VM นี่ยังหมายถึง adding some sort of ISO repository เพราะผมไม่อยาก boot จาก physical DVD media XenServer รองรับ multiple types ของ storage repositories (SR) แต่ not local ones (ไม่ใช่ local) นี่ stand to logic (สมเหตุสมผล) แต่เราจะพูดคุยแยกต่างหาก คือวิธี configure local storage repositories บน server
ตั้งค่า Storage Repository
ผมไปกับ CIFS share หมายถึง Windows box มัน work smoothly และ without any problems ผมแค่ต้อง provide server name และ share และ connect ด้วย correct user และ password
สร้าง VM
ต่อมา ผมลอง create VM อีกครั้ง ไม่เป็น brainer (ไม่งอกขี้ขืน/ง่ายมาก) Click, click, next, next utterly simple (ง่ายอย่างสิ้นเชิง) คุณยังใช้ templates ได้ แม้ XenCenter จะ offer those สำหรับ somewhat older releases ของ OSs ตัวอย่าง Lucid อยู่ แต่ไม่มี Pangolin ซึ่ง stand to logic เพราะ businesses slower to adopt new things
ผมลองใช้ Lucid template ก่อน แต่แล้วมันไม่ให้ใช้ 12.04 image ดังนั้นต้อง redo step นี้และเลือก custom template
จากนั้นมี storage configuration โปรดระวัง เพราะคุณอาจ find this step a little confusing (รู้สึกสับสนนิดหน่อย) มันจะถามก่อนว่าคุณอยากใช้ server ไหน และจะแสดง hypervisor ของคุณเอง แต่คุณอาจพบ free space figure ที่แสดง somewhat alarming (ค่อนข้างน่ากลัว) เหตุผลคือ free space นั้น reserved สำหรับ server's logging functionality และอย่างคล้ายๆกัน ซึ่ง most of the disk capacity ถูก taken by LVM ซึ่ง not shown there (ไม่แสดงที่นั่น) นี่ only becomes apparent (ชัดเจน) หลังจากคุณได้ไปที่ Storage step ซึ่งคุณ define virtual disks สำหรับ machine มันจะ stored locally แม้คุณสามารถใช้ other storage repositories ได้ somewhat tricky overall (ค่อนข้าง tricky โดยรวม)
คุณสามารถ tweak (ปรับแต่ง) configuration เล็กน้อย แต่ essentially (ในแง่พื้นฐาน) นั่นคือ all หลัง step นี้ complete VM จะ auto-started คุณสามารถ switch ไป console view และ check progress
ขณะที่คุณใช้ VM คุณสามารถทำ all the usual things ที่คุณคุ้นเคยจาก virtualization products ทุกตัว - snapshots และ screenshots, dock/undock console window, send signals, check client state และ resource usage และทั้งหมดนั้น และคุณยังสามารถ install XenServer Tools เพื่อ improve client performance
สิ่งน่าสนใจอื่นๆ (Other interesting things)
XenServer มาพร้อม rather useful options ก่อนอื่น มันจะ display system alerts บน critical issues เช่น software updates มันจะ warn (เตือน) คุณเกี่ยวกับ server certificate changing โดยเฉพาะหลัง upgrade หรือ reinstall
XenServer ยัง allow (อนุญาต) การใช้ plugins ซึ่งสามารถ enhance (เพิ่มประสิทธิภาพ) functionality ของ machine ของคุณ และยังมีมากกว่านี้ ในความจริง XenCenter GUI extremely rich (อุดมสมบูรณ์มาก) และสามารถ somewhat daunting (ค่อนข้างน่ากลัว) บน first use คุณจะต้อง go carefully through (ผ่านอย่างระมัดระวัง) all available options จนกว่าจะ figure out hidden gems และ secrets และหา things ที่คุณอาจต้องการสำหรับ operational deployment
For more reading โปรดดูด้านล่าง:
https://community.citrix.com/display/xs/XenCenter+Plugins
สรุป
Second encounter (การเจอครั้งที่สอง) ของผมกับ XenServer much more pleasant และ successful กว่า first one แม้ first one ก็ work just as fine XenServer ดูเหมือน very potent product (ผลิตภัณฑ์ที่มีศักยภาพสูง) ปัญหาเดียวคือ price และ support มัน justify (อ้างว่าเหมาะสม) ทุกสิ่งที่มัน offer ใน return สำหรับ money investment ขณะที่คุณ fully well know (รู้ดีมาก) ว่า all of the functionality available จาก raw Xen command line แค่ต้องการ practice และ skill?
ผม cannot answer that (ไม่สามารถตอบได้) เพราะ XenServer designed สำหรับ businesses ไม่ใช่ home users All in all (โดยรวม) มันดู professional และ capable และ XenCenter adds enterprise flair (บรรยากาศองค์กร) ที่ทำให้ admins ที่คุ้นเคยกับ GUI only warm up to the charms (อบอุ่น/ชอบ) ของ Xen ผม lament (นิยาม/เศร้า) Windows only functionality อย่างไรก็ตามด้วย full และ unrestricted SSH all is well (ทุกอย่างโอเค)
That would be all (นั่นคือทั้งหมด) Next time เราจะทำ local storage repo hacks
ขอแสดงความนับถือ