view README.md @ 55:833d55f0b5bd

add README.md
author AnaTofuZ <anatofuz@gmail.com>
date Mon, 23 Nov 2020 09:54:54 +0900
parents
children b4d2ef1897f9
line wrap: on
line source

# ie-virsh

- `virsh`のwrapperコマンド


# help

```shell
$ie-virsh
ie-virsh 1.0
AnaTofuZ <anatofuz@cr.ie.u-ryukyu.ac.jp>

USAGE:
    ie-virsh <SUBCOMMAND>

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`が動かない