Re: simple virt-manager setup
On Thu, 15 Feb 2024 10:31:30 +0100 Felix Natter wrote: > Looks like I write my own script, since I don't need snapshots or > incremental backups or even multiple disks :) Take a look at rsnapshot. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
Re: simple virt-manager setup
Me writes: > On 2024-02-14 09:40, Felix Natter wrote: >> Dear Michael, >> many thanks for the detailed answer, I will keep all of this for >> reference as I learn about libvirt! >> Am I right that it is not possible to backup/restore VMs >> using virt-manager GUI (on Debian12)? ChatGPT suggested this >> is possible, but confused this with Hyper-V I think ;-) >> So my best bet for backup/restore of data+config of a VM is to script >> libvirt or use an existing bash script [1]? (Can you recommend one?) hello HdV, > Might this fit your needs? > > https://github.com/abbbi/virtnbdbackup Thank you very much for the suggestion. However, I will write my own script since I only need full backups, no thin-provisining, not even multiple disks. Also, I will need to learn about snapshots, checkpoints etc. before making use of this. Cheers and Best Regards, Felix -- Felix Natter debian/rules!
Re: simple virt-manager setup
hello Michael, Michael Kjörling <2695bd53d...@ewoof.net> writes: > On 14 Feb 2024 09:40 +0100, from fnat...@gmx.net (Felix Natter): >> Am I right that it is not possible to backup/restore VMs >> using virt-manager GUI (on Debian12)? ChatGPT suggested this >> is possible, but confused this with Hyper-V I think ;-) > > ChatGPT is _not_ a reliable source of information. Do not treat it as > a source of truthful statements. That is why my sentence ended with ";-)". > If there is a way to back up VMs through virt-manager, I haven't found > it in my usage. Admittedly, I use ZFS snapshots for when I need to > roll back a VM disk image, which has happened rarely. It seems there is none. And zfs is way too complicated for me right now. >> So my best bet for backup/restore of data+config of a VM is to script >> libvirt or use an existing bash script [1]? (Can you recommend one?) >> Or is there a ProxMox vzdump equivalent for Debian? > > I haven't looked at the page you link to, but yes, a disk image backup > of some kind plus a XML dump of the virtual machine ("domain" in > libvirt/KVM parlace) will allow you to recreate the VM to that point > in time. You can also clone VMs. Looks like I write my own script, since I don't need snapshots or incremental backups or even multiple disks :) Thank you again. Cheers and Best Regards, Felix -- Felix Natter debian/rules!
Re: simple virt-manager setup
On 2024-02-14 09:40, Felix Natter wrote: Dear Michael, many thanks for the detailed answer, I will keep all of this for reference as I learn about libvirt! Am I right that it is not possible to backup/restore VMs using virt-manager GUI (on Debian12)? ChatGPT suggested this is possible, but confused this with Hyper-V I think ;-) So my best bet for backup/restore of data+config of a VM is to script libvirt or use an existing bash script [1]? (Can you recommend one?) Might this fit your needs? https://github.com/abbbi/virtnbdbackup Grx HdV
Re: simple virt-manager setup
On 14 Feb 2024 09:40 +0100, from fnat...@gmx.net (Felix Natter): > Am I right that it is not possible to backup/restore VMs > using virt-manager GUI (on Debian12)? ChatGPT suggested this > is possible, but confused this with Hyper-V I think ;-) ChatGPT is _not_ a reliable source of information. Do not treat it as a source of truthful statements. If there is a way to back up VMs through virt-manager, I haven't found it in my usage. Admittedly, I use ZFS snapshots for when I need to roll back a VM disk image, which has happened rarely. > So my best bet for backup/restore of data+config of a VM is to script > libvirt or use an existing bash script [1]? (Can you recommend one?) > Or is there a ProxMox vzdump equivalent for Debian? I haven't looked at the page you link to, but yes, a disk image backup of some kind plus a XML dump of the virtual machine ("domain" in libvirt/KVM parlace) will allow you to recreate the VM to that point in time. You can also clone VMs. -- Michael Kjörling https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”
Re: simple virt-manager setup
Dear Michael, many thanks for the detailed answer, I will keep all of this for reference as I learn about libvirt! Am I right that it is not possible to backup/restore VMs using virt-manager GUI (on Debian12)? ChatGPT suggested this is possible, but confused this with Hyper-V I think ;-) So my best bet for backup/restore of data+config of a VM is to script libvirt or use an existing bash script [1]? (Can you recommend one?) Or is there a ProxMox vzdump equivalent for Debian? [1] https://ostechnix.com/export-import-kvm-virtual-machines-linux/ Further answers inline. Michael Kjörling <2695bd53d...@ewoof.net> writes: > On 13 Feb 2024 18:10 +0100, from fnat...@gmx.net (Felix Natter): >> regarding virt-manager (qemu/kvm): >> >> Can I safely choose the "NAT" network type for a new VM >> in virt-manager (Debian12): > > Yes. Doing so should create a new network interface named virbr[0-9] > and assign an IPv4 address range to it which will be used for VM > purposes. > >> Can I safely say yes to >> "Do you want to bring it up?"? (is it undoable?) > > Yes, it is undoable. You can either use virt-manager -> connection > details -> virtual networks (select the network and then click the > stop button below the list) or you can use > > $ sudo virsh net-list --all > > $ sudo virsh net-destroy network-name > > Despite the scary action name, virsh net-destroy only stops the > network; it doesn't actually deconfigure it. (For that, you use virsh > net-undefine. There is also virsh net-autostart.) See the virsh(1) man > page. > > If you want to be extra certain, you can dump your firewall rules just > before you bring up the KVM network so that you can restore them > without a reboot. > > >> If I choose NAT, can multiple VMs connect to each other >> and with the host? > > I know that VMs can talk to the host through a KVM NAT interface. I > haven't tested whether they can talk to each other, but I would expect > so. In my previous installation I used WLAN as well, so my understanding is that I could not have used type=bridge, and I did communicate between vms (mounting nfs shares), so I think this _should_ work. > If you are using nftables on the host, you might find my blog post at > https://michael.kjorling.se/blog/2022/linux-kvm-host-nftables-guest-networking/ > helpful if VMs can't talk to the network. I have received some > feedback that there are easier solutions, but try as I did at the time > I couldn't find them, and what I wrote up there Works For Me (tm). I did not change anything in the firewall. >> (I would like to avoid making many changes that I don't understand >> to a productive server) > > Very understandable, and prudent. *thumbup* > You may want to consider subscribing to > https://lists.libvirt.org/archives/list/us...@lists.libvirt.org/; > subscription is mailto:users-j...@lists.libvirt.org. Good suggestion! I will do this. Many Thanks and Best Regards, Felix -- Felix Natter
Re: simple virt-manager setup
On 13 Feb 2024 18:10 +0100, from fnat...@gmx.net (Felix Natter): > regarding virt-manager (qemu/kvm): > > Can I safely choose the "NAT" network type for a new VM > in virt-manager (Debian12): Yes. Doing so should create a new network interface named virbr[0-9] and assign an IPv4 address range to it which will be used for VM purposes. > Can I safely say yes to > "Do you want to bring it up?"? (is it undoable?) Yes, it is undoable. You can either use virt-manager -> connection details -> virtual networks (select the network and then click the stop button below the list) or you can use $ sudo virsh net-list --all $ sudo virsh net-destroy network-name Despite the scary action name, virsh net-destroy only stops the network; it doesn't actually deconfigure it. (For that, you use virsh net-undefine. There is also virsh net-autostart.) See the virsh(1) man page. If you want to be extra certain, you can dump your firewall rules just before you bring up the KVM network so that you can restore them without a reboot. > If I choose NAT, can multiple VMs connect to each other > and with the host? I know that VMs can talk to the host through a KVM NAT interface. I haven't tested whether they can talk to each other, but I would expect so. If you are using nftables on the host, you might find my blog post at https://michael.kjorling.se/blog/2022/linux-kvm-host-nftables-guest-networking/ helpful if VMs can't talk to the network. I have received some feedback that there are easier solutions, but try as I did at the time I couldn't find them, and what I wrote up there Works For Me (tm). > (I would like to avoid making many changes that I don't understand > to a productive server) Very understandable, and prudent. You may want to consider subscribing to https://lists.libvirt.org/archives/list/us...@lists.libvirt.org/; subscription is mailto:users-j...@lists.libvirt.org. -- Michael Kjörling https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”
simple virt-manager setup
Dear debian users, regarding virt-manager (qemu/kvm): Can I safely choose the "NAT" network type for a new VM in virt-manager (Debian12): Can I safely say yes to "Do you want to bring it up?"? (is it undoable?) If I choose NAT, can multiple VMs connect to each other and with the host? If not, can you suggest a tutorial for creating the necessary bridge device for type=bridge? (I would like to avoid making many changes that I don't understand to a productive server) Many Thanks and Best Regards, Felix -- Felix Natter