[CentOS-virt] KVM: where are the directions?

Kenni Lund kenni at kelu.dk
Sat Nov 13 05:05:06 EST 2010

2010/11/13 MargoAndTodd <margoandtodd at gmail.com>:
> On 11/11/2010 01:50 PM, Kenni Lund wrote:
>> You'll never need to run it from the command line, use the available
>> management tools (libvirt+virsh from the command line,
>> libvirt+virt-manager from X11), it makes your life much much easier.
>> I've been running qemu-kvm from the command line for several years,
>> and while it's fine to know how the system works, then you definitely
>> don't want to manage your enterprise virtual machines that way. For
>> example, if you start qemu-kvm twice in parallel, with the same HDD
>> image, you'll damage or destroy your HDD image. Libvirt takes care of
>> such banalities and many others.
> Thank you!
> These are small business servers.  The CentOS server is the only server
> on the network.  I start my VM's in rc.local and shut them down in
> rd.shutdown (I wrote my own).  So, I am stuck with the command line.
> Thank you for the heads up on running them twice!
> But, on my new office machine, I will be running them headed, so I
> will be using your instructions there.

Running from the command line doesn't mean you can't use the management tools:

Quick'n'dirty overview:

Install new guests:

Start guest:
virsh start $guestname

List running guests:
virsh list
virsh list --all

Shutdown guest (sends an ACPI signal to the guest, telling it to
shutdown correctly - same a clicking on the power button for 1 sec on
most computers):
virsh shutdown $guestname

Shutdown guest immediately (like pulling the power cable from a computer):
virsh destroy $guestname

Edit a guest:
virsh edit $guestname

etc. etc...run virsh --help and virt-install --help for more options.

Best regards

More information about the CentOS-virt mailing list