-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUSAGE
35 lines (34 loc) · 1.38 KB
/
USAGE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Run make_vm_wheezy.sh to create a VM. It will prompt you for some things,
# or you can edit it to define those variables in advance. After it
# finishes running, you manage the vm with virsh.
#### Useful virsh commands:
## MOST USEFUL COMMAND OMG
virsh help
virsh help | grep <topic>
virsh help <command>
## VM basics
virsh start <domain>
virsh shutdown <domain>
virsh destroy <domain> # force shutdown
virsh reboot <domain>
virsh reset <domain> # force reboot
## VM info
virsh list # lists VMs
virsh dominfo <domain> # basic info
virsh desc <domain> --new-desc <description> # hey, you could use this
virsh desc <domain> # shows the useful description you just defined
## VM management
virsh domdisplay <domain> # show the VM display URI (usually VNC)
virsh console <domain> # get /bin/login, escape with Ctrl-]
## VM lifecycle
virt-install # the basic libvirt CLI vm creation tool
man virt-install # pretty nice man page, check out dem examples
virsh autostart <domain> # make a VM autostart
virsh undefine --remove-all-storage # run this to delete a stopped VM
## Misc
virsh # nice interactive shell
virsh -c <url> <command> # do CClub stuff from your own machine, cool!
wget http://tmz.fedorapeople.org/tmp/virsh.completion # SO AMAZING
# luckily that script is already sourced in root's .bashrc on the kvm
# machines, you're welcome!
virt-manager # of course, very handy, and also supports remote connections