KARR, DAVID
2015-Jul-13 19:51 UTC
[libvirt-users] Can't figure out how to restart VM after making config changes in virt-manager
I finally figured out my VNC configuration, so I can now run virt-manager to inspect and manipulate my VM. I initially created the VM with "virt-install", but I haven't been able to see the console or do anything with it. When I ran virt-manager, I tried to configure the vcpus (1->4) and change the boot order (cdrom, then disk, as I created the VM with an ISO). When I made these changes, virt-manager said they would take effect on the next restart of the VM. So, then I tried to restart the VM from virt-manager. The "Run" button is disabled, so I assume that means it detects that the VM is running. I've tried clicking "Shut Down" and selecting "Reboot" from the dropdown, but neither of those seem to do anything. I've tried to view the console window, but I've only ever seen a black screen there. I believe some people mentioned that I should try sshing to the VM. I would do that if I could find an IP address or hostname that appears to correspond to this VM. The obvious, using the VM name, didn't work. I'm not sure what to do here.
Dominique Ramaekers
2015-Jul-15 07:43 UTC
Re: [libvirt-users] Can't figure out how to restart VM after making config changes in virt-manager
In virt-manager, the 'open' button opens the screen of your guest. If your screen is blank, press a button to wake-up your screen. If still nothing appears, maybe your guest doesn't boot correctly?? To use the shutdown function, acpi needs to be enabled. On some OS's this isn't the standard setting and you will have to enable it yourself. But if your guest doesn't boot correctly, the acpi deamon (or equivalent) isn't started yet... You can look for the ip with tools like tcpdump... But again, if your guest doesn't boot correctly, chances are that the network of your guest isn't up yet... Dominique. -----Oorspronkelijk bericht----- Van: libvirt-users-bounces@redhat.com [mailto:libvirt-users-bounces@redhat.com] Namens KARR, DAVID Verzonden: maandag 13 juli 2015 21:51 Aan: libvirt-users@redhat.com Onderwerp: [libvirt-users] Can't figure out how to restart VM after making config changes in virt-manager I finally figured out my VNC configuration, so I can now run virt-manager to inspect and manipulate my VM. I initially created the VM with "virt-install", but I haven't been able to see the console or do anything with it. When I ran virt-manager, I tried to configure the vcpus (1->4) and change the boot order (cdrom, then disk, as I created the VM with an ISO). When I made these changes, virt-manager said they would take effect on the next restart of the VM. So, then I tried to restart the VM from virt-manager. The "Run" button is disabled, so I assume that means it detects that the VM is running. I've tried clicking "Shut Down" and selecting "Reboot" from the dropdown, but neither of those seem to do anything. I've tried to view the console window, but I've only ever seen a black screen there. I believe some people mentioned that I should try sshing to the VM. I would do that if I could find an IP address or hostname that appears to correspond to this VM. The obvious, using the VM name, didn't work. I'm not sure what to do here. _______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
Michal Privoznik
2015-Jul-15 13:23 UTC
Re: [libvirt-users] Can't figure out how to restart VM after making config changes in virt-manager
On 13.07.2015 21:51, KARR, DAVID wrote:> I finally figured out my VNC configuration, so I can now run virt-manager to inspect and manipulate my VM. > > I initially created the VM with "virt-install", but I haven't been able to see the console or do anything with it. > > When I ran virt-manager, I tried to configure the vcpus (1->4) and change the boot order (cdrom, then disk, as I created the VM with an ISO). > > When I made these changes, virt-manager said they would take effect on the next restart of the VM. So, then I tried to restart the VM from virt-manager. The "Run" button is disabled, so I assume that means it detects that the VM is running. I've tried clicking "Shut Down" and selecting "Reboot" from the dropdown, but neither of those seem to do anything. I've tried to view the console window, but I've only ever seen a black screen there. > > I believe some people mentioned that I should try sshing to the VM. I would do that if I could find an IP address or hostname that appears to correspond to this VM. The obvious, using the VM name, didn't work. > > I'm not sure what to do here.Yeah, sometimes it's not clear when we are referring to a reboot of guest OS or reboot of whole VM (= process where libvirt is involved so the changes can finally take effect, e.g. in qemu world new process with brand new command line is spawned). If unsure it's safe to assume the latter. Now, shutting down a domain can be difficult. Esp. if you want to do that nicely. Imagine that your VM is a real piece of HW, but with blank screen as you say. What possibilities do you have? You can try pressing the power button (implemented as 'virsh shutdown --mode acpi $dom'), or have a process running within the system initiate the shutdown process ('virsh shutdown --mode agent $dom'). Both cases meet some assumptions, e.g. the system does not ignore ACPI events, or has the process (guest agent as we call it) running. There's of course the obvious option - pull the plug (equivalent to 'virsh destroy $dom') but you risk data loss. SSH-ing into the host could do the trick too. And libvirt even has an API for that: virDomainInterfaceAddresses() exposed in virsh under domifaddr command. That may tell you the IP address(-es) assigned to a guest. But not in all cases. Yet. Michal
Reasonably Related Threads
- Re: libvirt beginner needs to create and start VMs entirely on command line
- Re: libvirt beginner needs to create and start VMs entirely on command line
- Network interface name of guest via python API
- Re: libvirt beginner needs to create and start VMs entirely on command line
- libvirt beginner needs to create and start VMs entirely on command line