зеркало из
https://github.com/iharh/notes.git
synced 2025-11-02 14:46:08 +02:00
73 строки
2.0 KiB
Plaintext
73 строки
2.0 KiB
Plaintext
https://libvirt.org/formatdomain.html
|
|
|
|
virsh
|
|
--help [domain|...]
|
|
help
|
|
<no-options>
|
|
enter interactive mode
|
|
quit
|
|
exit
|
|
|
|
domain ...
|
|
list --all|--inactive|--state-running|--state-shutoff
|
|
list domains
|
|
https://kifarunix.com/list-running-and-stopped-vms-on-kvm/
|
|
dumpxml
|
|
--domain <domainname>
|
|
start
|
|
...
|
|
destroy
|
|
...
|
|
undefine
|
|
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-virsh-delete
|
|
https://www.cyberciti.biz/faq/howto-linux-delete-a-running-vm-guest-on-kvm/
|
|
!!! avoid --remove-all-storage flag because it will erase dist as well
|
|
console
|
|
connect to the guest console
|
|
https://libvirt.org/formatdomain.html#consoles-serial-parallel-channel-devices
|
|
https://ostechnix.com/how-to-enable-virsh-console-access-for-kvm-guests/
|
|
https://habr.com/ru/post/700196/
|
|
enter
|
|
sudo systemctl enable --now serial-getty@ttyS0
|
|
|
|
https://mattwidmann.net/notes/running-nixos-in-a-vm/
|
|
https://www.technicalsourcery.net/posts/nixos-in-libvirt/
|
|
!!!
|
|
https://nixos.wiki/wiki/Libvirt
|
|
https://github.com/NixOS/nixpkgs/issues/84105
|
|
|
|
# start tty0 on serial console
|
|
systemd.services."serial-getty@ttyS0" = {
|
|
enable = true;
|
|
wantedBy = [ "getty.target" ]; # to start at boot
|
|
serviceConfig.Restart = "always"; # restart when session is closed
|
|
};
|
|
|
|
{
|
|
boot.kernelParams = [
|
|
"console=tty1"
|
|
"console=ttyS0,115200"
|
|
];
|
|
}
|
|
|
|
|
|
ttyconsole --domain <domainname>
|
|
/dev/pts/1
|
|
desc
|
|
|
|
net-list
|
|
--all
|
|
net-dumpxml
|
|
|
|
iface-list
|
|
iface-dumpxml
|
|
|
|
pool-list
|
|
pool-dumpxml
|
|
|
|
vol-list
|
|
vol-dumpxml
|
|
|
|
remote-viewer
|
|
https://myme.no/posts/2021-11-25-nixos-home-assistant.html
|