enabling vnc after using virt-install
9,498
Edit the VM config with virsh edit
and add the relevant bit of XML within <devices>
?
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
It should also be possible to replicate this using virt-xml, something like this:
virt-xml --build-xml --graphics vnc,port=-1,autoport=yes,listen=0.0.0.0
or
virt-xml <yourVMname> --add-device --graphics vnc,port=-1,autoport=yes,listen=0.0.0.0
However, it looks like it doesn't support the autoport
keyword as of version 1.3.2 (Ubuntu 16.04 LTS), so it looks like this part would have to be added separately.
Related videos on Youtube
Author by
Luís Rigoni
Former C++ expert (top 5% on Stackoverflow) now working with F#.
Updated on September 18, 2022Comments
-
Luís Rigoni over 1 year
I've created a virtual machine using virt-install with graphics --none. I want to enable vnc. I've tried
virsh -c qemu:///system qemu-monitor-command vm171-SC-1 --hmp change vnc :3
but it doesn't work
virsh -c qemu:///system qemu-monitor-command vm171-SC-1 --hmp info vnc Server: disabled
How can I enable vnc after running virt-install? I don't want to install with vnc enabled (i.e --graphics vnc,listen=0.0.0.0,port=) is not an option because I want it to send its output to the same termnial that I am in.
-
Luís Rigoni almost 9 yearscan it be done without changing the xml? I want to be able to script it.
-
Josip Rodin almost 9 yearsLooks like a new tool is required: blog.wikichoon.com/2014/03/…