linux:kvm_info
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
linux:kvm_info [2022/08/12 11:22] – [KVMのインストール] kimi | linux:kvm_info [2022/08/23 12:17] – [仮想マシンの操作] kimi | ||
---|---|---|---|
行 5: | 行 5: | ||
* https:// | * https:// | ||
- | - 仮想化機能の有無の確認 | + | - [[linux: |
- | - パッケージのインストール | + | $ sudo kvm-ok</ |
- | - ブリッジの作成 | + | - [[linux: |
+ | - [[linux: | ||
- | - [[linux: | ||
- | - [[linux: | ||
===== 仮想マシンの操作 ===== | ===== 仮想マシンの操作 ===== | ||
- | * | + | * [[linux: |
- | ===== 仮想マシンの削除 ===== | + | $ qemu-img create |
- | <code sh> | + | $ virt-install |
- | $ virsh list --all | + | * [[仮想マシンのクローン化]]< |
- | | + | * [[linux: |
- | --------------------------- | + | * [[linux: |
- | 5 ssp0 | + | |
- | | + | |
- | $ virsh undefine template | ||
- | Domain template has been undefined | ||
- | $ virsh list --all | ||
- | | ||
- | ---------------------- | ||
- | | ||
- | |||
- | $ | ||
- | </ | ||
- | |||
- | ===== 仮想マシンの設定変更 ===== | ||
- | |||
- | |||
- | <code sh> | ||
- | $ virsh list --all | ||
- | | ||
- | ----------------------- | ||
- | | ||
- | |||
- | $ virsh edit ssp0 | ||
- | . | ||
- | . | ||
- | . | ||
- | Domain ssp0 XML configuration edited. | ||
- | |||
- | $ virsh start ssp0 | ||
- | Domain ssp0 started | ||
- | |||
- | </ | ||
- | ===== 仮想マシンのクローン化 ===== | ||
- | <code sh> | ||
- | $ virt-clone --original template --name sstxp --file images/ | ||
- | </ | ||
- | <code sh> | ||
- | ubuntu@template: | ||
- | | ||
- | Icon name: computer-vm | ||
- | | ||
- | Machine ID: d7a1d3b5bea6410bae792841027c0735 | ||
- | Boot ID: ee7f7c9a95f84c6393387267791fffaf | ||
- | Virtualization: | ||
- | Operating System: Ubuntu 20.04.2 LTS | ||
- | Kernel: Linux 5.4.0-66-generic | ||
- | Architecture: | ||
- | ubuntu@template: | ||
- | ==== AUTHENTICATING FOR org.freedesktop.hostname1.set-static-hostname === | ||
- | Authentication is required to set the statically configured local host name, as well as the pretty host name. | ||
- | Authenticating as: Ubuntu (ubuntu) | ||
- | Password: | ||
- | ==== AUTHENTICATION COMPLETE === | ||
- | ubuntu@template: | ||
- | | ||
- | Icon name: computer-vm | ||
- | | ||
- | Machine ID: d7a1d3b5bea6410bae792841027c0735 | ||
- | Boot ID: ee7f7c9a95f84c6393387267791fffaf | ||
- | Virtualization: | ||
- | Operating System: Ubuntu 20.04.2 LTS | ||
- | Kernel: Linux 5.4.0-66-generic | ||
- | Architecture: | ||
- | ubuntu@template: | ||
- | </ | ||
- | <code sh> | ||
- | $ sudo mv / | ||
- | </ | ||
- | <file txt / | ||
- | network: | ||
- | ethernets: | ||
- | enp1s0: | ||
- | addresses: [192.168.10.204/ | ||
- | gateway4: 192.168.10.254 | ||
- | nameservers: | ||
- | addresses: [192.168.10.1] | ||
- | search: [ee.ous.ac.jp] | ||
- | version: 2 | ||
- | |||
- | |||
- | </ | ||
- | <code sh> | ||
- | $ sudo hostnamectl set-hostname ((hostname)) | ||
- | $ sudo cat > 01-fix-ipv4-config.yaml << EOF | ||
- | network: | ||
- | ethernets: | ||
- | enp1s0: | ||
- | addresses: [192.168.10.((ip address))/ | ||
- | gateway4: 192.168.10.254 | ||
- | nameservers: | ||
- | addresses: [192.168.10.1] | ||
- | search: [ee.ous.ac.jp] | ||
- | version: 2 | ||
- | EOF | ||
- | $ sudo cp 01-fix-ipv4-config.yaml / | ||
- | $ sudo mv / | ||
- | |||
- | </ | ||
linux/kvm_info.txt · 最終更新: 2022/08/23 13:34 by 127.0.0.1