Weitere KVM Tools: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Zeile 84: Zeile 84:
 
  dns-nameservers 8.8.8.8
 
  dns-nameservers 8.8.8.8
 
</pre>
 
</pre>
=virt-tar-out=
+
==virt-tar-out==
 +
===Kompletter Inhalte packen===
 +
*virt-tar-out -a orion.img / orion.tar
 +
===Kompletter Inhalte packen inklusive zippen===
 +
*virt-tar-out -a orion.img / - | gzip >  orion.tgz

Version vom 6. Oktober 2017, 09:30 Uhr

virt-top

Install

  • apt-get install virt-top

Use

  • virt-top
virt-top 10:06:59 - x86_64 8/8CPU 1721MHz 31869MB
19 domains, 7 active, 7 running, 0 sleeping, 0 paused, 12 inactive D:0 O:0 X:0
CPU: 0.0%  Mem: 20384 MB (20384 MB by guests)

   ID S RDRQ WRRQ RXBY TXBY %CPU %MEM    TIME   NAME                                                                                                                                                                                           
   20 R                      0.0  0.0 484:12.57 gustavo.xinux.lan
   33 R                      0.0  0.0  35:51.73 nagus
   34 R                      0.0  0.0  13:18.95 nurmi
    1 R                      0.0  0.0  80:29:28 porkpie
   23 R                      0.0  0.0  12:58:35 tereknor
   24 R                      0.0  0.0 107:54.86 tiazel.xinux.lan
    2 R                      0.0  0.0  60:25:49 wormhole
    -                                           (casey)
    -                                           (chuck)
    -                                           (fonsi)
    -                                           (harley.xinux.lan)
    -                                           (howard)
    -                                           (ipfire)
    -                                           (kekistan)
    -                                           (loren)libguestfs-tools
    -                                           (nelson)
    -                                           (nextcloud)
    -                                           (piamia.xinux.lan)
    -                                           (zee)

libguestfs-tools

Install

  • apt-get install libguestfs-tools

virt-df

  • virt-df
Filesystem                           1K-blocks       Used  Available  Use%
orion:/dev/sda1                        8914984    1388808    7050272   16%

virt-filesystems

  • virt-filesystems -a /mnt/local/kvm/orion.img --all --long --uuid
Name      Type       VFS     Label MBR Size        Parent   UUID
/dev/sda1 filesystem ext4    -     -   9410969600  -        15fc6185-e3be-4c2b-96f3-19f8a6960827
/dev/sda2 filesystem unknown -     -   1024        -        -
/dev/sda5 filesystem swap    -     -   1071644672  -        46867ea0-7d5c-43d4-8fda-2ae8cd5c6cc5
/dev/sda1 partition  -       -     83  9410969600  /dev/sda -
/dev/sda2 partition  -       -     05  1024        /dev/sda -
/dev/sda5 partition  -       -     82  1071644672  /dev/sda -
/dev/sda  device     -       -     -   10485760000 -        

virt-inspector

  • virt-inspector /mnt/local/kvm/orion.img > orion-disk.xml

virt-cat

  • virt-cat -d orion /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens3
iface ens3 inet dhcp

virt-edit

  • virsh shutdown orion

Maschine muss ausgeschaltet sein.

  • virt-edit -d orion /etc/network/interfaces
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto ens3
iface ens3 inet static
 address 10.81.1.133
 netmask 255.255.0.0
 gateway 10.81.0.1
 dns-nameservers 8.8.8.8

virt-tar-out

Kompletter Inhalte packen

  • virt-tar-out -a orion.img / orion.tar

Kompletter Inhalte packen inklusive zippen

  • virt-tar-out -a orion.img / - | gzip > orion.tgz