If you really need the console window of virt-manager, just call it like virt-manager -connect= -show-domain-console Į.g. Especially, if the domain is not known to virsh or fails to start, virt-viewer will probably wait forever. There is no error handling in the script you may add some if necessary. It will start the domain (if not already started), then start virt-viewer to connect with this domain.Ī sample desktop file (sktop) Įxec=~/scripts/StartVirtDomain.sh Win7Proĭid the job (domain name is Win7Pro). You may call it with the name of the domain as parameter. Virt-viewer should be installed with virt-manager if not, sudo apt-get install virt-viewer. usr/bin/virt-viewer -w $1 # -w to wait until domain is running. usr/bin/virsh start $1 # domain must be known to virsh # call this script with domainname as parameter I wrote a small script "~/scripts/StartVirtDomain.sh" #!/bin/sh You can also add the command directly to the menu with the parameters, but often it is easier for debugging problems to get the command running in the command line as a script. $ chmod u+x ~/bin/run-vmĪnd, then you should be able to add this command to your menu - see for example Answer on Unix and Linux Stackoverflow site. Virt-manager -connect qemu:///system -show-domain-console win7 If that works, you should be able to put it in a simple script $ cat > ~/bin/run-vm $ virt-manager -connect qemu:///system -show-domain-console win7 Where URI and name are where you got them from above. $ virt-manager -connect > -show-domain-console > Use the virt-manager to find the "Libvirt URI" (select the VM, Edit -> Connection Details), then the name of the VM (select the VM, Edit -> Virtual Machine Details - if you have the machine open, you will have to make sure it is not maximized, then View -> Details, and go back to the Console when you're done.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |