I'm interested in qemu, specifically the kvm feature in Linux which is operated through the command line. I see there are a ton of features available for gnome-boxes and libvirt specifically.

My specific goal is to manage these through a command line on a BASE distribution without X. Including adding/changing USB devices on the fly. I know about Arch wiki and a few other sources. But with the loss of the editors for TLDP and no real HOWTOs, along with obscure documentation it's very difficult without turning this into a discussion a discussion.

So my questions:

  1. Is there another project that interacts with the kvm that I should be using from the command line?
  2. Is there a way to get the KVM to save its state to ram when the system shuts down?
  3. Mount and unmount USB devices, and CD devices from command line? monitor mode does not seem to work.
  4. Any tips and pointers from the pros would be appreciated.

Here's my command line I've been working with to start the kvm on boot

screen -dmS kvm-winxp kvm \
    -cpu host \
    -smp 2 \
    -m 768 \
    -drive cache=none,file=$HOME/qemu/posready2009 \
    -vga std -nographic \
    -vnc,lossy \
    -net nic,model=pcnet -net user \
    -smb $HOME \
    -redir tcp:5555::22 \
    -redir tcp:5556::80 \
    -usbdevice tablet \
    -usbdevice host:058f:6387

1 Answer 1

  1. libvirt is great on the command line. virsh is the main interface. See https://libvirt.org/apps.html#command for the rest.
  2. What do you want to save to RAM when which system shuts down?

virsh autostart vmName sets a vm to autostart.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .