unix:virtualization:virtlib:quickreference
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
unix:virtualization:virtlib:quickreference [2021/04/21 23:13] – rodolico | unix:virtualization:virtlib:quickreference [2021/04/21 23:26] – rodolico | ||
---|---|---|---|
Line 97: | Line 97: | ||
===== Shutdown and restart of Windows guests ===== | ===== Shutdown and restart of Windows guests ===== | ||
+ | ==== Problems shutting down with //virsh// ==== | ||
After installing the win-virtio package, you can use qemu-guest-agent to manage shutdown and reboot. This is much more reliable than using ACPI. | After installing the win-virtio package, you can use qemu-guest-agent to manage shutdown and reboot. This is much more reliable than using ACPI. | ||
Line 113: | Line 114: | ||
</ | </ | ||
- | Now, when you start the virtual, you can begin to use // | + | You will need to restart |
+ | <code bash> | ||
+ | virsh shutdown DOMAIN | ||
+ | virsh reboot DOMAIN | ||
+ | </ | ||
+ | |||
+ | ==== Windows servers will not restart ==== | ||
+ | |||
+ | I'm having a problem with Windows virtuals not rebooting. When you issue the restart command, they shut off and don't come back up. As a band aid, I have a script running on the hypervisor with a cron job, every 5 minutes. | ||
+ | |||
+ | This script has been tested on our machines, but I'm sure there are some issues with it. Just do a | ||
+ | <code bash> | ||
+ | virsh list --all | ||
+ | </ | ||
+ | and select the domains you want to ensure are running all the time. Place them in the array that has DOMAIN1 and DOMAIN2 (ie, replace DOMAIN1 with your first choice, etc...). | ||
+ | |||
+ | When called, checkVirtuals will look for each of the domains and see if they are running (using | ||
+ | |||
+ | I call this every 5 minutes from cron, thus, the max downtime will be 10 minutes, with an average of 5. | ||
+ | |||
+ | <code perl checkVirtuals> | ||
+ | #! / | ||
+ | |||
+ | use strict; | ||
+ | use warnings; | ||
+ | |||
+ | my @servers = ( | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | my $virsh = '/ | ||
+ | |||
+ | my $output = `virsh list`; | ||
+ | |||
+ | foreach my $server ( @servers ) { | ||
+ | if ( $output =~ m/$server/ ) { | ||
+ | unlink "/ | ||
+ | } else { | ||
+ | if ( -e "/ | ||
+ | print " | ||
+ | | ||
+ | | ||
+ | } else { | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | 1; | ||
+ | |||
+ | </code> | ||
===== Replacing Network Interfaces ===== | ===== Replacing Network Interfaces ===== |
unix/virtualization/virtlib/quickreference.txt · Last modified: 2023/02/26 17:12 by rodolico