New Linux tool helps manage guest virtual machines
- 10 June, 2009 15:05
- Comments
With the increasing prevalence of virtualization comes the greater need for management of “guest” operating systems that run as virtual machines on the hypervisor, and the tool called libguestfs is set to provide that on Linux.
Libguestfs is a library for accessing and modifying guest vms and can be used for making batch configuration changes to guests, viewing and editing files inside guests, getting disk statistics, migrating between virtualization systems, performing partial guest backups and clones, cloning guests and changing system information of Linux and Windows guests among other things.
Developed by Red Hat emerging technologies software engineer Richard Jones, libguestfs overcomes the “constant problem” with virtualization management of how to “see inside” the guest virtual machine.
“You can measure things like how much CPU it’s using or how much network traffic it generates, but people often ask how much disk space a guest is using (not allocated, but actually using)?” Jones said.
“Did the guest boot up correctly? Can you install virtio drivers in that guest? Can you add a disk to a guest and change its /etc/fstab at the same time? Can you migrate a guest from Xen to KVM, uninstall the Xen PV kernel and add the right KVM drivers?”
Libguestfs uses Linux kernel and qemu code, and can access any type of guest file system that Linux and qemu can, including ext2/3/4, btrfs, FAT and NTFS, LVM, different disk partition schemes, qcow, qcow2, and vmdk.
“What we need to use is the Linux kernel code directly,” he said. “The whole thing runs inside a qemu container, and we talk from a small library to the userspace inside qemu, giving it instructions like 'edit this file', 'run this program', 'install this device driver'.”
The library can be linked with C and C++ management programs and has bindings for OCaml, Perl, Python, Ruby, Java and Haskell. It can also be used from shell scripts or the command line with the guestfish utility.
“The beauty of this is that Linux already has the drivers to handle numerous different file systems, LVM, partition types and so on,” Jones said, adding all the complexity is “hidden” inside the libguestfs library.
“The qemu process can decode qcow2 and a variety of other containers. We can even run an NFS server inside the guest and mount file systems on the host.”
- Bookmark this page
- Share this article
- Got more on this story? Email Computerworld
- Follow Computerworld on twitter
- Book 1 - The Practical Guide to Assuring Compliance
- OVUM TECHNOLOGY AUDIT: HP Application Lifecycle Management
- Book 3 - The Executive’s Guide to Managing Risks
- Fibre Channel over Ethernet in the Data Center: An Introduction
- Cloud printing in the enterprise: liberating the mobile print experience from cables, operating systems, and physical boundaries
- iPhone 5 rumour rollup for the week ending February 10
- 3D mapping revives underwater city
- Academic challenges Turnbull over NBN satellite criticism
- What are you saying: Telstra’s customer service slowly improving, SA minister urging Facebook to overturn its photo ban
- In pictures: Capgemini opens new Canberra office
-
Maingear's six-core laptop has 1.8TB of SSD storage
-
After Megaupload shuts, BTJunkie follows
-
Windows Event Viewer phishing scam remains active
-
NeuroSky MindWave: Fun with Brainwaves
-
20 popular Ubuntu Linux apps you may want to try
-
MYOB Software for Dummies 6E Australian Edition
-
Computers for Seniors for Dummies, 2nd Edition
-
Teach Yourself Visually Windows 7
-
Windows 7 for Dummies® Dvd+book Bundle
-
Windows 7 for Seniors for Dummies®
-
Office 2007 All-In-One Desk Reference for Dummies
-
Microsoft Office
-
Windows 7 for Dummies®
-
Excel 2007 All-In-One Desk Reference for Dummies












Comments
Post new comment