Git Product home page Git Product logo

virt-manager's Introduction

Virtual Machine Manager

virt-manager is a graphical tool for managing virtual machines via libvirt. Most usage is with QEMU/KVM virtual machines, but Xen and libvirt LXC containers are well supported. Common operations for any libvirt driver should work.

Several command line tools are also provided:

  • virt-install: Create new libvirt virtual machines
  • virt-clone: Duplicate existing libvirt virtual machines
  • virt-xml: Edit existing libvirt virtual machines/manipulate libvirt XML

For dependency info and installation instructions, see the INSTALL.md file. If you just want to quickly test the code from a git checkout, you can launch any of the commands like:

./virt-manager --debug ...

Contact

virt-manager's People

Contributors

actions-user avatar agx avatar andreabolognani avatar antagonym avatar athinapl avatar berrange avatar cbosdo avatar charlesa avatar chenhanxiao avatar crobinso avatar elmarco avatar fidencio avatar giuseppe avatar goeranu avatar hbrock-redhat avatar mhartmay avatar michaelweiser avatar morecache avatar nertpinx avatar p-bo avatar phrdina avatar pinotree avatar piotrdrag avatar ptoscano avatar rst0git avatar simmon-nplob avatar skycastlelily2 avatar tmtfx avatar weblate avatar yurchor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

virt-manager's Issues

Virt-manager thinks vm cached RAM is used RAM

Hello,

I have the following problem: My host machine uses the free RAM as cache and if I want to create a new guest machine virt manager errors out saying "that there is not enough RAM available". So to create my vm I have to manually run sync; echo 2 > /proc/sys/vm/drop_caches to clear the cache to then be able to start my new guest.
https://askubuntu.com/questions/155768/how-do-i-clean-or-disable-the-memory-cache/155771#155771

It would be nice if virt manager detects the used RAM as cached and just spins up the vm.

RPM Build fails due to Recommends tag

Build fails due to the following commit which introduced tags not found in many RPM distros.

Recommends: (libvirt-daemon-kvm or libvirt-daemon-qemu)

Creating tar archive
removing 'virt-manager-2.2.1' (and everything under it)
error: line 56: Unknown tag: Recommends: (libvirt-daemon-kvm or libvirt-daemon-qemu)
error: line 60: Unknown tag: Suggests: python3-libguestfs

Curios what version of RPM these tags were added because they most certainly do not exist in RHEL/CentOS7.

RPM v4.11.3

Unable to launch virt-manager after building with the python file (crashing)

I was trying to upgrade my version of virt-manager from 1.5.0 to github's latest (I have Ubuntu MATE 18.04 LTS). The build is successful, however, when I try to launch it, it crashes, and the title is "virt-manager crashed with ValueError in require_version(): Namespace LibvirtGLib not available". I think it's because I didn't install all dependencies, but the specs.in file isn't clear to me.

Is there a command that can install all dependencies?
~ AnErrupTion

RFE: Add a toolbar button to switch GFX/Text/Serial console

I mostly do AArch64 systems which default to serial console until initramfs starts and can load VirtIO GPU module.

With Virt-Manager it is easy - I boot VM, switch to serial console and then to graphical console. But I do it so often that some way to have easy switch would be great.

Toolbar buttons or combobutton look like good idea.

Indirect usage of console for extracting logs and executing commands

Compare Docker calls:

docker run ....
docker logs...
docker exec ...

Is, or could be there an equivalent also with virsh? For example, during system installation Ubuntu installer uses tty/S0 to show a progress bar, and tty/S3 (at least what I guess the "4th console" should be) to display error messages. This is of course more complex.

Nevertheless, maybe following calls or similar could be possible?

virsh logs --console ttyX <domain>
virsh exec --console ttyX <domain> command

In both cases, virsh could be used with more flexibility in headless/non-interactive environments to extract logs either execute commands indirectly.

[Reopen] Need help for compilation under Mint

Hello,
I would like a little help on the compilation of your tools.

Your GIT and site lacks clear information on the compilation which I find its a shame.
On the other hand, if documentation could be created for Ubuntu, Debian and Mint.

As it stands, little useful information on the net and makes compilation difficult.

RFE: Add support for the new Ubuntu installer (curtin)

Ubuntu 20.04 recently released with a new installer in tow: the files related to d-i have been moved from the images/ directory to the legacy-images/ directory, and there's now a banner inviting users to switch to the new installer instead.

virt-install doesn't know about this new installer, but it should.

Some preliminary information about it:

From what I can tell, curtin uses cloud-init information instead of preseed files for unattended installation, so hopefully the existing cloud-init support can be hooked up relatively easily. The first step, of course, is teaching virt-manager enough about the new installer that network installation can be performed at all.

Error removing device

Hello.
Whenever I try to remove a device from a machine I get the following error:
I am runing on Manjaro
Python 3.8.2
virt-manager 2.2.1

Error Removing Device: iter() returned non-iterator of type 'xmlCoreDepthFirstItertor'
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details/details.py", line 1935, in remove_device
    self.vm.remove_device(devobj)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 429, in remove_device
    xmlobj.remove_device(editdev)
  File "/usr/share/virt-manager/virtinst/guest.py", line 505, in remove_device
    self.devices.remove_child(dev)
  File "/usr/share/virt-manager/virtinst/xmlbuilder.py", line 723, in remove_child
    self._xmlstate.xmlapi.node_force_remove(xpath)
  File "/usr/share/virt-manager/virtinst/xmlapi.py", line 183, in node_force_remove
    self._node_remove_child(parentnode, childnode)
  File "/usr/share/virt-manager/virtinst/xmlapi.py", line 390, in _node_remove_child
    if all([node_is_text(n) for n in parentnode.children]):
TypeError: iter() returned non-iterator of type 'xmlCoreDepthFirstItertor'

New image allocation uses preallocation=falloc since libvirt 4.3 (instead of metadata)

Hi,
in Ubuntu bug 1847105 I think I have found a somewhat unexpected or unclear behavior mismatch between libvirt >v4.3 and virt-manager.

For volume creation virt-manager since quite some time (I checked back until v1.5) will submit an XML like the following to libvirts volume creation:

<volume>
  <name>ubuntu19.04.qcow2</name>
  <capacity>16106127360</capacity>
  <allocation>16106127360</allocation>
  <target>
    <format type="qcow2"/>
    <features>
      <lazy_refcounts/>
    </features>
  </target>
</volume>

The important detail in regard to this issues is that capacity==allocation.
In the definition by libvirt this is somewhat undefined. In my reading of it this case would also fully allocate the volume.

But - and here is the change in behavior - up until libvirt v4.3 it didn't.
It used to use preallocation=metadata until a change made it issue preallocation=falloc nowadays.

eventual qemu-img call:
Old: /usr/bin/qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts /var/lib/libvirt/images/ubuntu18.04.qcow2 15728640K
New: /usr/bin/qemu-img create -f qcow2 -o preallocation=falloc,compat=1.1,lazy_refcounts /var/lib/libvirt/images/live-server.qcow2 41943040K

This was found by users wondering about increased time when e.g. creating an image for a new guest.

I was now wondering about virt-managers position on this, do you:

  • want to modify virt-manager to get back to spare/lazy allocations (TL;DR submit an allocation value that is 0<allocation<capacity?
  • consider this change a bug in libvirt, so that we should report/change it there? Maybe the comparison there should be >= and not just > in your opinion?
  • not changing anything as the falloc creation is preferred from the POV of virt-manager
  • some other way answer I didn't predict :-)

Cannot use virt-install to create a machine without soundcard

Hi,

Been trying to create a new VM with virt-install 2.0.0 under CentOS 8.
So far, I could not find any option in order to remove the default soundcard that gets added.

Is there any --no-sound option or something I may have missed from the docs ?
Best regards.

My virt-install commandline:

virt-install --name mymachine.local --ram 4096 --machine q35 --vcpus=4,sockets=1,cores=2,threads=2 --cpuset=0,1,4,5 --cpu host --cdrom=/mnt/CentOS-8-x86_64-1905-dvd1.iso --os-variant rhel8.0 --boot cdrom --disk path=/var/lib/libvirt/images/mymachine.local.raw,bus=virtio,cache=none,io=native --network bridge=br0,model=virtio --network bridge=br0,model=virtio --video virtio --channel unix,mode=bind,target_type=virtio,name=org.qemu.guest_agent.0 --channel spicevmc --graphics vnc,listen=127.0.0.1,keymap=fr --virt-type kvm --watchdog ib700,action=reset --noautoconsole --print-xml 2 > /root/mymachine.local.xml

My dirty hack to remove sound card:

sed -i 's#<sound model="ich9"/>##g' /root/mymachine.local.xml
virsh define /root/mymachine.local.xml

Japanese translation mistake: OpenGL

msgstr "GL を開く(_G)"

"OpenGL" is translated to "GL を開く". But, this translation interpret a proper noun "OpenGL" as "Open" (verb) and "GL" (noun), so it's meaning "to open a GL" which is confusing.
Correct translation should keep the proper noun as is, so "Open_GL:" is fine here.

Issue with virt-install 1.5.0 installing Ubuntu 20.04 focal

Hi all,

is it possible to install Ubuntu 20.04 LTS with virt-install 1.5.0?

virt-install command (virt-install version 1.5.0):

virt-install --wait -1 --force --debug --noreboot --name ubuntu-20.04-00123456 \
             --noautoconsole --graphics vnc \
             --disk path=/var/lib/libvirt/images/ubuntu-20.04-114046.qcow2,format=qcow2,size=10,bus=scsi \
             --controller type=scsi \
             --location $OS_ISO \
             --os-type=linux --os-variant ubuntu18.04 -r 2048 --vcpus=2 --network network=default \
             --features acpi=on,apic=on --initrd-inject config/20.04/preseed.cfg -x edd-off -x ipv6.disable=1

The --cdrom option works but then no custom configuration is possible.

Error:

[virt-install 44526] ERROR (cli:318) Couldn't find hvm kernel for Ubuntu tree.
[virt-install 44526] DEBUG (cli:320) 

Q: will 'virt-manager' be ported to get usable with python3.x?

Hello Community
As stated above, will there be done any effort/steps to get virt-manager usable with Python3 as system-wide python-env?
Or, do I have to migrate to another app?
If so, which one could be a valueable/featured similar app?

Thanks for your response.
Regards,
Roger

virt-install --connect lxc:/ unnecessarily requires --memory

I can run virt-install --memory 2048 --connect lxc:/ --os-variant fedora31 --filesystem /var/lib/lxc/fedora31test/rootfs,/ --network none --transient --import --name fedora31test without any error on Fedora Rawhide, but if I remove --memory 2048 I get an error ERROR --memory amount in MiB is required and virt-install fails. As far as I understand LXC containers do not need memory amount.

Package versions:

# dnf list --installed
virt-install.noarch 2.2.1-2.fc31
libvirt-daemon-driver-lxc.x86_64 5.10.0-2.fc32 
libvirt-daemon-lxc.x86_64        5.10.0-2.fc32 
lxc.x86_64                       3.2.1-1.fc32   
lxc-libs.x86_64                  3.2.1-1.fc32  
lxc-templates.x86_64             3.2.1-1.fc32 

Change Emulator

Hi, it seems virt-manager defaults to the emulator in /usr/libexec. I'd like to point it to one located in /usr/local/bin. How can I do that?

Feature request: Don't capture specific key combination

Hi, could it be possible to add a specific key combination whitelist that will not be captured by the guest VM.

I'm currently running a VM on a separate workspace on Gnome desktop. Gnome has some key combination for moving between workspaces. It would be great if I can make my VM fullscreen and still be able to move easily between workspaces (similar to Parallels on MacOS)

I don't know where this behavior is supposed to be implemented (by virt-manager, libvirt, or other component) so I'm sorry if this is not in the scope of virt-manager.

Thanks

[help wanted] virt-xml, remove --boot hd,cdrom

Got this rather common <os> element:

<os>
<type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/DebianSDK_VARS.fd</nvram>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>

How do I remove the two <boot> elements with virt-xml?
virt-xml DebianSDK --edit --boot hd,cdrom
The way I see it doesn't make sense to use option=, (hd and cdrom don't take any values right)

I could replace the whole element with clearxml but it that really my only option?
It's a lot of values to rewrite, which I first have to retrieve.

virt-manager with qemu-system-sparc64 - cannot remove piix3-usb-uhci device

I'm running Debian 10, virt-manager 2.0.0, libvirt 5.0.0. After installing qemu-system-sparc and openbios-sparc, I've tried both the sun4u and sun4v (niagara complains about missing firmware, but I guess that's a separate issue), and selecting "Begin Installation" gives the following error:

qemu-system-sparc64: -device piix3-usb-uhci,id=usb,bus=pci,addr=0x2: PCI: slot 2 function 0 not available for piix3-usb-uhci, reserved

Defining the machine manually using virsh and the base given on the Debian wiki results in a similar error, and removing the USB device causes it to be recreated when the machine is started. Is there any way to prevent it being added?

virt-install: Cannot use storage /var/lib/libvirt/images/k8sc29n05a.qcow2: internal error: pool 'default' has asynchronous jobs running.

Good afternoon,

I am using an Ansible playbook that will execute a task to create 6 VMs simultaneously using
shell: virt-install

Out of the 6 VMs, 3 complete successfully the installation and the other 3 get this error:

Cannot use storage /var/lib/libvirt/images/k8sc29n05a.qcow2: internal error: pool 'default' has asynchronous jobs running.

(Of course the other 2 will have a different image filename).

What is causing this? Is looks like a bug as it's not always occuring.

Thanks in advance.

Kind regards,

Pascal van Dam

Add switch for keyboard locks

Lock key state sync is broken when one of lock keys is used for an alternative action.
Steps to reproduce:

  1. Have 2 or more keyboard layouts on a host machine
  2. Set layout switch combination to Caps Lock
  3. Connect to a remote machine using Spice.
  4. Use Caps Lock in a remote machine. It will get back off in a few seconds.

Possible fix:
spice-gtk (including spicy GUI client) allows to turn lock syncing off.
It just needs to be added to virt-manager.

Or alternatively it may be reasonable to add some sort of detection technique to spice-gtk for this (or similar) cases

Mount a host folder as a floppy disk either USB drive

What I have found out so far, you can perform an unattended install for a Windows OS if its installer can discover an "anwers file" in the root folder of a connected device like floppy disk or an USB drive.

Is it possible to provide this file to the Windows installer directly from a local host path pretending it to be a floppy or USB drive?

Alternatively, I would also have a floppy disk image and mount it, is it possible if the above option is not available?

configuring default settings for OS.

Hello,

When I want to create a new VM. My preference is (On linux) to have a virtio gpu, and a virtio_scsi main disk.

how do I change the default configuration for new Linux VM's?

Blank screen in remote-viewer on windows with spice-streaming-agent

Remote-Viewer 9.0-256 x64 on Windows 10 1909.

The new spice window created by running spice-streamgin-agent is black, only mouse cursor is visible.
Using remote-viewer on linux the same setup works.

Spice-streaming-agent built from sources today, with gstreamer support.

felix@guest:~$ ./spice-streaming-agent -d
spice-streaming-agent[2465]: GOT START_STOP message -- request to START streaming
spice-streaming-agent[2465]: streaming starts now
spice-streaming-agent[2465]: Got device info of 1 devices from the plugin
spice-streaming-agent[2465]: stream id 0: device address: pci/0000/06.0, device display id: 2
spice-streaming-agent[2465]: got a frame -- size is 321265 (26 ms) (1589641660285 ms from last frame)(1589641660258136 us)
spice-streaming-agent[2465]: wXh 1920X1200 codec=1
spice-streaming-agent[2465]: got a frame -- size is 335175 (87 ms) (87 ms from last frame)(189 us)
spice-streaming-agent[2465]: got a frame -- size is 341098 (133 ms) (133 ms from last frame)(66 us)

Log from remote-viewer.exe on client (Windows):
remote-viewer.exe:1436): GSpice-WARNING **: 16:36:47.347: notify the server that stream 48 does not exist
(remote-viewer.exe:1436): GSpice-CRITICAL **: 16:36:47.348: display_handle_stream_clip: assertion 'st != NULL' failed
(remote-viewer.exe:1436): GSpice-WARNING **: 16:36:47.356: notify the server that stream 41 does not exist
(remote-viewer.exe:1436): GSpice-CRITICAL **: 16:36:47.357: display_handle_stream_clip: assertion 'st != NULL' failed
(remote-viewer.exe:1436): GSpice-WARNING **: 16:36:47.363: notify the server that stream 33 does not exist
(remote-viewer.exe:1436): GSpice-CRITICAL **: 16:36:47.364: display_handle_stream_clip: assertion 'st != NULL' failed
(remote-viewer.exe:1436): GSpice-WARNING **: 16:36:47.366: notify the server that stream 34 does not exist
(remote-viewer.exe:1436): GSpice-CRITICAL **: 16:36:47.367: display_handle_stream_clip: assertion 'st != NULL

incompatible with vte3-0.60

Serial text console is broken with vte3-0.60. I can't input anything but serial output is fine. vte3-0.58 do not have such problem. My test environment is the latest archlinux and master branch of virt-manager.

virt-manager and gpg-key for ssh auth

Hello team,

I use a ssh connection with a gpg key to connect to my host.

However when I try to connect virt-manager to my host with:

virt-manager -c 'qemu+ssh://[email protected]/system?socket=/var/run/libvirt/libvirt-sock'

virt-manager use by default the private ./ssh/id_rsa. I know that I can specify an other private key by adding &keyfile=~/id_rsa but I would like virt-manager to use gpg-agent just like my ssh connections.

Disabling Link state for NIC does not work for Windows guest with e1000e driver

I wanted to try the useful "Link state" feature for NICs, in order to temporarily disable network connectivity.

While this works fine for a Linux guest with a virtio driver, it has no effect for a Windows guest with e1000e driver. The XML changes accordingly, but once booted, the system has regular network connectivity.

<interface type="network">
  <mac address="52:54:00:70:d1:13"/>
  <source network="default"/>
  <model type="e1000e"/>
  <link state="down"/>
  <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>

Fedora 31
virt-manager-2.2.1
QEMU emulator version 4.1.1

Error refreshing hardware page: 'virConnect' object has no attribute 'baselineHypervisorCPU'

When going to Show virutal hardware details>CPUs constantly getting this error.

Error refreshing hardware page: 'virConnect' object has no attribute 'baselineHypervisorCPU'

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/details/details.py", line 1025, in hw_selected
self.refresh_config_cpu()
File "/usr/share/virt-manager/virtManager/details/details.py", line 2223, in refresh_config_cpu
if not self._cpu_secure_is_available():
File "/usr/share/virt-manager/virtManager/details/details.py", line 2167, in _cpu_secure_is_available
features = domcaps.get_cpu_security_features()
File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 309, in get_cpu_security_features
cpu = self._get_expanded_cpu(m)
File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 278, in _get_expanded_cpu
expandedXML = self.conn.baselineHypervisorCPU(
File "/usr/share/virt-manager/virtinst/connection.py", line 118, in getattr
return getattr(libvirtconn, attr)
AttributeError: 'virConnect' object has no attribute 'baselineHypervisorCPU'

virt-convert fails to convert disks in ova

Hi,

I'm using virt-convert to deploy an OVA. I hit the following error message:

$ virt-convert --debug --disk-format qcow2 vm.ova
Running /usr/bin/qemu-img convert -O qcow2 vm-sda.vmdk /home/bersace/.local/share/libvirt/images/vm-sda.qcow2
ERROR    /usr/bin/qemu-img convert -O qcow2 vm-sda.vmdk /home/bersace/.local/share/libvirt/images/vm-sda.qcow2: failed with exit
RuntimeError: qemu-img convert -O qcow2 vm-sda.vmdk /home/bersace/.local/share/libvirt/images/vm-sda.qcow2: failed with exit status 1: b"qemu-img: Could not open 'vm-sda.vmdk': Could not open 'vm-sda.vmdk': No such file or directory\n"

I runned with pdb. The problem is that absin variable in https://github.com/virt-manager/virt-manager/blob/master/virtconv/formats.py#L238 is not absolute at all.

OVA support seems implemented by extracting the archive, then replacing input with extracted directory. But qemu-img is still runned in CWD instead of temp-dir.

If I extract locally the ova with tar, it works even when passing the original ova file as argument :

$ tar -xf vm.ova
$ virt-convert --disk-format qcow2 vm.ova
...
[ven., 20 sept. 2019 11:56:00 virt-convert 32536] DEBUG (formats:78) Running command: /usr/bin/qemu-img convert -O qcow2 /home/bersace/src/vm-sda.vmdk /home/bersace/.local/share/libvirt/images/vm-sda.qcow2
[ven., 20 sept. 2019 11:59:53 virt-convert 3699] DEBUG (formats:85) stdout=b''
[ven., 20 sept. 2019 11:59:53 virt-convert 3699] DEBUG (formats:86) stderr=b''   
...

thus, the vm-sda.vmdk used is not the one in ova !

What am I missing ?

ESXi vmxnet3 & e1000e

Can add to the UI e1000 & vmxnet3 for (ESXi EFI 7.0+)?

$ qemu-system-x86_64 -machine pc-q35-4.2 -net nic,model=help
Supported NIC models:
e1000
e1000-82544gc
e1000-82545em
e1000e
i82550
i82551
i82557a
i82557b
i82557c
i82558a
i82558b
i82559a
i82559b
i82559c
i82559er
i82562
i82801
ne2k_pci
pcnet
rocker
rtl8139
tulip
virtio-net-pci
virtio-net-pci-non-transitional
virtio-net-pci-transitional
vmxnet3

$ qemu-system-aarch64 -machine virt -net nic,model=help
Supported NIC models:
e1000
e1000-82544gc
e1000-82545em
e1000e
i82550
i82551
i82557a
i82557b
i82557c
i82558a
i82558b
i82559a
i82559b
i82559c
i82559er
i82562
i82801
ne2k_pci
pcnet
rocker
rtl8139
tulip
virtio-net-pci
virtio-net-pci-non-transitional
virtio-net-pci-transitional
vmxnet3

Boot options change isn't shown with a running VM

I suppose this has something to do with the dialog telling you "these changes will take effect after the next guest shutdown".
I mean, of course this is the case for boot options.. But it gets pretty annoying soon if you happen to see that your edits aren't sticking.

Add support for specifying websocket port

Please, add support for specifying websocket port into virt-install.

It should be as simple as adding one line in file: virtinst/cli.py:

...
        cls.add_arg("type", "type", cb=cls.set_type_cb)
        cls.add_arg("port", "port")
#       cls.add_arg("websocket", "websocket")
        cls.add_arg("tlsPort", "tlsPort")
        cls.add_arg("listen", "listen")
...

RFE: momory.high cannot be set by virt-install --memory

This is an RFE related to libvirt LXC driver and somewhat related to #73.
When virt-install --memory=1024 is used on a pure CGroup V2 distro (e.g. Fedora 31 and newer), memory.max is set. When total real memory usage exceeds 1024 MB, OOM killer is invoked to a process in the LXC container made by virt-install.

On the other hand, if memory.high is used, OOM killer is not invoked, but memory pages are swapped out to a swap partition. But virt-install does not seem to provide an option to set memory.high

libvirt provides a way to set memory.high as

https://github.com/libvirt/libvirt/blob/2feaa925bba06e77be918bcbfab63bc8201c8f19/src/util/vircgroupv2.c#L1317-L1341

and

https://github.com/libvirt/libvirt/blob/2feaa925bba06e77be918bcbfab63bc8201c8f19/src/lxc/lxc_cgroup.c#L165-L167

Migration to the new Fedora translation platform

Hi there,

Daniel P. Berrange reached me to migrate the project to weblate as part of our migration: https://fedoraproject.org/wiki/L10N_Move_to_Weblate

I created this project for you and made Daniel admin:
https://translate.fedoraproject.org/projects/virt-manager/

Once done, I would appreciate to see you project to include a translation widget in your readme:
https://translate.fedoraproject.org/widgets/virt-manager/

Please let me know if any help is required,

specific access for user

hi,
I use Kimchi, that use libvirt and i try have a specific access for a simple users.
I tryed with polkit but i don't have rules's file, and when user is in a libvirt group they are so much access (create, delete, ...).
If your have issu for have just a start, a shutdown and a reboot for a simple user.
thx for help.

Feature request: Addt'l view

Could I request that an addt'l view be added (or perhaps just addt'l columns to the existing view). I have many VM's and sorting them out via the main view in virt-manager is quite tedious - as it simply shows the name given to the VM image.

I'm hoping it would be possible to add columns to the main view that list VM name,title, description, image location, last run/modified date, and creation date.

It might be best if these info columns were a different list view from those that are running - the useful CPU and memory graphs could be kept to a different/switchable listing/view.

I hope this might be considered generally useful enough to incorporate into a new release.

[virt-install] --cdrom produces incorrect xml

virt-install --name example --vcpus=2 --memory=4096 --disk=20,target.bus=sata --machine q35 --print-xml produces a correct xml.

<domain type="kvm">
  <name>example</name>
  <uuid>e74e363a-afd7-48d4-b0d3-fbaeeec22773</uuid>
  <memory>4194304</memory>
  <currentMemory>4194304</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch="x86_64" machine="q35">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model"/>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/vilgot/.local/share/libvirt/images/example-4.qcow2"/>
      <target dev="sda" bus="sata"/>
    </disk>
    <controller type="usb" index="0" model="ich9-ehci1"/>
    <controller type="usb" index="0" model="ich9-uhci1">
      <master startport="0"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci2">
      <master startport="2"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci3">
      <master startport="4"/>
    </controller>
    <interface type="user">
      <mac address="52:54:00:1f:a0:70"/>
      <model type="e1000e"/>
    </interface>
    <console type="pty"/>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <input type="tablet" bus="usb"/>
    <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
      <image compression="off"/>
    </graphics>
    <sound model="ich9"/>
    <video>
      <model type="qxl"/>
    </video>
    <redirdev bus="usb" type="spicevmc"/>
    <redirdev bus="usb" type="spicevmc"/>
  </devices>
</domain>

But virt-install --name example --vcpus=2 --memory=4096 --disk=20,target.bus=sata --machine q35 --cdrom debian-10.3.0-amd64-netinst.iso --print-xml

<domain type="kvm">
  <name>example</name>
  <uuid>02f7b3b9-2354-4cb8-8a2d-7ba0534fd621</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://debian.org/debian/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory>4194304</memory>
  <currentMemory>4194304</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch="x86_64" machine="q35">hvm</type>
    <boot dev="cdrom"/>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model"/>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <on_reboot>destroy</on_reboot>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/vilgot/.local/share/libvirt/images/example-2.qcow2"/>
      <target dev="sda" bus="sata"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/vilgot/debian-10.3.0-amd64-netinst.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
    <interface type="user">
      <mac address="52:54:00:9e:6f:69"/>
      <model type="virtio"/>
    </interface>
    <console type="pty"/>
    <channel type="unix">
      <source mode="bind"/>
      <target type="virtio" name="org.qemu.guest_agent.0"/>
    </channel>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <input type="tablet" bus="usb"/>
    <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
      <image compression="off"/>
    </graphics>
    <sound model="ich9"/>
    <video>
      <model type="qxl"/>
    </video>
    <redirdev bus="usb" type="spicevmc"/>
    <redirdev bus="usb" type="spicevmc"/>
    <memballoon model="virtio"/>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
    </rng>
  </devices>
</domain>
<domain type="kvm">
  <name>example</name>
  <uuid>02f7b3b9-2354-4cb8-8a2d-7ba0534fd621</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://debian.org/debian/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory>4194304</memory>
  <currentMemory>4194304</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch="x86_64" machine="q35">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model"/>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/vilgot/.local/share/libvirt/images/example-2.qcow2"/>
      <target dev="sda" bus="sata"/>
    </disk>
    <disk type="file" device="cdrom">
      <target dev="sdb" bus="sata"/>
      <readonly/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
    <interface type="user">
      <mac address="52:54:00:9e:6f:69"/>
      <model type="virtio"/>
    </interface>
    <console type="pty"/>
    <channel type="unix">
      <source mode="bind"/>
      <target type="virtio" name="org.qemu.guest_agent.0"/>
    </channel>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <input type="tablet" bus="usb"/>
    <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
      <image compression="off"/>
    </graphics>
    <sound model="ich9"/>
    <video>
      <model type="qxl"/>
    </video>
    <redirdev bus="usb" type="spicevmc"/>
    <redirdev bus="usb" type="spicevmc"/>
    <memballoon model="virtio"/>
    <rng model="virtio">
      <backend model="random">/dev/urandom</backend>
    </rng>
  </devices>
</domain>

(notice how there are two <domain>)
this produces an error when piping it to virsh define /dev/stdin

error: Failed to define domain from /dev/stdin
error: (domain_definition):75: Extra content at the end of the document
<domain type="kvm">
^

Error installing app from setup.py

Try to install the application with latest master and getting the following error

virt-manager git:(master) ✗ ./setup.py install

 virt-manager git:(master) ✗ ./setup.py install
running install
Using sysprefix=/usr
running build
Generating /home/kalanamith/Desktop/virtmanager/virt-manager/build/virt-manager
Generating /home/kalanamith/Desktop/virtmanager/virt-manager/build/virt-install
Generating /home/kalanamith/Desktop/virtmanager/virt-manager/build/virt-clone
Generating /home/kalanamith/Desktop/virtmanager/virt-manager/build/virt-convert
Generating /home/kalanamith/Desktop/virtmanager/virt-manager/build/virt-xml
Generating man/virt-clone.1
Generating man/virt-xml.1
Generating man/virt-install.1
Generating man/virt-convert.1
Generating man/virt-manager.1
Generating build/bash-completion/virt-install
Generating build/bash-completion/virt-clone
Generating build/bash-completion/virt-convert
Generating build/bash-completion/virt-xml
running build_i18n
Writing po/POTFILES.in
intltool-update -p -g virt-manager
unable to execute 'intltool-update': No such file or directory
Removing po/POTFILES.in
error: [Errno 2] No such file or directory: 'po/POTFILES.in'

Python version

➜  virt-manager git:(master) ✗ python --version         
Python 3.6.8

limit i/o disk

Hello,

Is it possible to limit disk iops in virt-manager for one or more VM?

thank you

Linux Y520 5.4.17-200.fc31.x86_64 #1 SMP Sat Feb 1 19:00:13 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
virt-manager --version
2.2.1

Using the storage view triggers attributeError: type object 'vmmStoragePool' has no attribute 'pretty_type'

Hi,
with 2.2.1 I get this traceback:

[Di, 20 Aug 2019 11:09:52 virt-manager 15468] DEBUG (cli:197) Uncaught exception:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/createvm.py", line 1198, in _browse_iso
    self._browse_file(None, cb=set_path, is_media=True)
  File "/usr/share/virt-manager/virtManager/createvm.py", line 1304, in _browse_file
    self._storage_browser = vmmStorageBrowser(self.conn)
  File "/usr/share/virt-manager/virtManager/storagebrowse.py", line 26, in __init__
    self._vol_sensitive_cb)
  File "/usr/share/virt-manager/virtManager/hoststorage.py", line 107, in __init__
    self._populate_pools()
  File "/usr/share/virt-manager/virtManager/hoststorage.py", line 388, in _populate_pools
    typ = vmmStoragePool.pretty_type(pool.get_type())
AttributeError: type object 'vmmStoragePool' has no attribute 'pretty_type'

I wondered if the file is missing or anything like it, but things are in place:

$ grep -C 4 pretty_type /usr/share/virt-manager/virtManager/object/storagepool.py
            ])
        return pool_type in supported

    @staticmethod
    def pretty_type(pool_type):
        return POOL_TYPE_DESCS.get(pool_type, "%s pool" % pool_type)

    @staticmethod
    def list_types():

This is probably related to commit 4a0b7f6 which is new in 2.2.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.