[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]