# HG changeset patch # User AnaTofuZ # Date 1606092894 -32400 # Node ID 833d55f0b5bd9e2b85174805558c946bbe14aea9 # Parent ab3350def09ba547e9ad119a8edb6b84ca41a473 add README.md diff -r ab3350def09b -r 833d55f0b5bd README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Mon Nov 23 09:54:54 2020 +0900 @@ -0,0 +1,73 @@ +# ie-virsh + +- `virsh`のwrapperコマンド + + +# help + +```shell +$ie-virsh +ie-virsh 1.0 +AnaTofuZ + +USAGE: + ie-virsh + +FLAGS: + -h, --help Prints help information + -V, --version Prints version information + +SUBCOMMANDS: + console connect to the guest console + define define (but don't start) a domain from an template XML file + define-gdb define the domain in which the gdb port is opened from the template XML file + destroy destroy (stop) a domain + domiflist list all domain virtual interfaces + dominfo domain information + dumpxml domain information in XML + help Prints this message or the help of the given subcommand(s) + list list domains + shutdown gracefully shutdown a domain + start start a (previously defined) inactive domain + ttyconsole tty console + undefine undefine a domain + vncdisplay vncdisplay +``` + + +# list + +- 自分が作ったVMの状況が確認可能 + +# define + +## 通常の方法 + +- テンプレートxmlをもとにvmをdefineする + - 名前はなんでも良いが、prefixにlogin user nameが入る + - 例えば e155730 が `ie-virsh define anatofuz` とすると `e155730-anatofuz`というVMが作られる + +## 差分生成 + +- qcow2もテンプレートから生成することが可能 +- `$ie-virsh templates`でテンプレート一覧を確認する +- `$ie-virsh define ubuntu20 -t Ubuntu-20`の様に `-t`オプションの後ろにtemplateの名前を指定すると生成される + - `/ie-ryukyu/kvm/images/rental`にqcow2が生成される + + +# start, dumpxmlなど +- vm名を指定する必要があるが、wrapperなので全部打つ必要がないようにしている + - `e155730-anatofuz` の場合は `ie-virsh start anatofuz` でいい +- vm名をフルで打っても問題ない +- 起動しているvmに対しての操作はidを指定しても問題ないようになっている + + +# 2020年以前のバージョン + +- [virsh-wrapper](http://www.cr.ie.u-ryukyu.ac.jp/hg/Applications/virsh-wrapper/) + + +# bug +- `define-gdb`が動かない + +