What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Hot answers tagged

27

You can do that in the console with: virsh domif-setlink domain interface-device state And check its status with: virsh domifstat domain interface-device You can see the network interfaces configured with: virsh domifaddr domain Have a look at the man page for details. Here's an example of a typical workflow: $ sudo virsh list Id Name ...


25

According to vagrant's documentation, the default provider should be virtualbox, and the VAGRANT_DEFAULT_PROVIDER variable lets you override it. However, VAGRANT_DEFAULT_PROVIDER is empty, so it should be virtualbox, right? Well, if I set the variable to virtualbox, it works again. So I guess fedora sets the default variable somewhere else. Solution: $ ...


25

after spending time with vagrant i got the solution for custom box. first of all install any Linux OS in libvirt/qvm and login to it for customization and create vagrant user with password vagrant adduser vagrant vagrant user should be able to run sudo commands without a password prompt sudo visudo -f /etc/sudoers.d/vagrant and paste vagrant ALL=(ALL) ...


17

From the man page:- virsh list --autostart should do it.


14

Since you haven't shut down the VM, then the process using that image file still has the file open and it hasn't actually been deleted yet. As long as the process keeps running, you should be able to recover it. For this answer I have a kvm image called testdelete. The VM is up, but I have deleted the file. First you need to find the process using the ...


12

elbarna's own answer is the way to go for configuration options "natively" supported by libvirt (and thus its domain XML). For qemu commandline arguments (and more) not supported by libvirt, you need to include qemu's XML namespace declaration in the 'domain' root element: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> ...


11

I realize this is a very old thread - on my RHEL6.5 system, this works, with the usual caveat that if you don't say --all, virsh list will only list info for running domains. So try virsh list --all --autostart and/or virsh list --all --no-autostart Works for me.


10

virsh is a command line interface that can be used to create, destroy, stop start and edit virtual machines and configure the virtual environment (such as virtual networks etc) virt-install is a command line tool that simplifies the process of creating a virtual machine. virt-manager is a GUI that can be used to create, destroy, stop, start and edit ...


9

KVM is a kernel API for virtualisation. It doesn't deal with serial ports. qemu is a machine (PC and other) emulator which can use kvm for improving virtualisation performance. It can emulate a standard 8250 UART serial port (isa-serial) or paravirtualised serial port (virtio-serial). In qemu, you define your machine with command-line arguments that specify ...


9

Qemu is the lowest level that emulates processor and peripherals. KVM is to accelerate it if CPU has VT enabled. Libvirt provides daemon and client to manipulate VMs for convenience. Duplicate


7

virsh destroy, from man virsh Immediately terminate the domain domain. This doesn't give the domain OS any chance to react, and it's the equivalent of ripping the power cord out on a physical machine.


6

Like @jason-harris solution. But simpler and start only marked for autostart. for i in $(virsh list --name --autostart); do virsh start $i; done UPD: I tested it on libvirt 3.2.0 (CentOS 7.4.1708)


6

The file is sparse, meaning it contains "holes" in it that, when they are read, returns zeroes. This is a feature that saves actual hard disk space when huge files that are mostly zeroes are stored. ls will return the apparent file size, but du will show the apparent size of the file minus the size of the holes in the file (which is how much space the file ...


6

Apparently discard wasn't supported on that setting. However it can work if you change the disk from "VirtIO" to "SCSI", and change the SCSI controller to "VirtIO". I found a walkthrough. There are several walkthroughs; that was just the first search result. This new option is called virtio-scsi. The other, older system is called virtio-block or virtio-...


5

If you have virt-xml 1.4.1 (released in 2017, so should be widespread by now) or later in your path (provided by community/virt-install in Arch), you can use: virt-xml $DOMAIN --edit --confirm --qemu-commandline '-my-args 1234' virt-xml $DOMAIN --edit --confirm --qemu-commandline 'env=MY-ENV=1234' to automatically add the XML corresponding to env vars and/...


5

Finally I found the proper way to achieve question goal. It implies Linux bridging, because I wasn't able to solve the issue with libvirt networking. Steps: Identify KVM VM interfaces. Probably interfaces names start with vnet* In this example vnet0 and vnet1 Create a Linux bridge with: brctl addbr virbr1 Attach Physical interface and KVM VMs interfaces ...


5

To achieve the same thing as VMmware's "Suspend" in virsh, do: virsh managedsave <domain-name> The machine can later be resumed with virsh start <domain-name> On my tested host (Ubuntu Server 14.04), the save file is stored at: /var/lib/libvirt/qemu/save/<domain-name>.save


5

It's a hack, but you could just write a quick systemd service to run it on startup, perhaps in /etc/systemd/system/set-qemu-acl.service. [Unit] Description=QEMU ACL Hack Requires=local-fs.target After=local-fs.target [Service] ExecStart=/usr/bin/setfacl -R -m u:qemu:rwx /run/media/cl [Install] WantedBy=multi-user.target Then, just enable it. sudo ...


5

This may work for a VM guest called "pollyanna" if the host has communicated with the VM recently, so that its IP address is in the ARP cache: arp -na | awk -v mac=$(virsh domiflist pollyanna | awk '$2=="bridge"{print $NF}') '$0 ~ " at " mac {gsub("[()]", "", $2); print $2}' Let's split this out: # Get the MAC for a VM guest called pollyanna vmac=$(virsh ...


5

So, it turns out that specifying your boot device with --cdrom /path/to/bootmedia.iso can be problematic when it comes to viewing output during boot up. Trying to install again, I noticed this warning pop up before the Starting install... text: WARNING CDROM media does not print to the text console by default, so you likely will not see text install ...


5

SSH's X11 forwarding is a bit more than generic port forwarding, and it probably is the simplest way to achieve what you want, at least from the user's viewpoint. If you want technically simpler, you'll need to understand how X11 was originally envisioned to be used. In an environment with a number of X11-capable computers, the user information might be ...


4

Other than "virt-clone" you can duplicate the VM this way: Ensure that existing VM (to be duplicated) is shut down. do a "sudo virsh dumpxml < domid >" of the existing VM, and save the output xml file. Modify the < name > tag under the < domain > tag. Use "uuidgen" to generate a new unique ID, and use that to modify the existing < uuid > tag. ...


4

I had the same problem - same error message. I found out that the VM will continue creation, if I give it less than 4gb RAM, so e.g. 3gb RAM VM started to install the installation process was terribly slow in /var/log/libvirt/libvirtd.log I saw errors like: qemuSetupCgroupForVcpu:566 : Unable to get vcpus' pids I did not have all kvm kernel modules ...


4

Here is a universal script for getting autostart information. To list domains (VMs) that have autostart enable put in virsh_autostart_info.sh and run: virsh_autostart_info.sh | grep -i enabled. You could of course clear it up to just display names or whatever you want. ## # Configuration # VIRSH=/usr/bin/virsh ## # Simple list of domains (VMs) # ...


4

This is just my experience on encountering this problem. On executing vagrant up, i got this The provider 'libvirt' could not be found, but was requested to back the machine 'default'. Please use a provider that exists. I tried the commands provided above echo "export VAGRANT_DEFAULT_PROVIDER=virtualbox" >> ~/.bashrc source ~/.bashrc Then I ...


4

The proper way fo changing address is using virsh. You can stop network (e.g. ifdown): virsh net-destroy default And you can start it with: virsh net-start default As you edited default.xml file this should be enough. But for editing you can use: virsh net-edit default


4

As discovered in chat, the solution is: Copy your .ISO image to /var/lib/libvirt/images and run virt-install like so: virt-install --name=public-centos7 \ --disk path=/home/publicvm/some.img,size=10 \ --graphics none \ --vcpus=2 \ --memory=2048 \ --location /var/lib/libvirt/images/CentOS-7-x86_64-DVD-1503-01.iso \ --network bridge=...


4

The virt-manager window has a feature "shut down" -> "save". Additional drivers are not required. I think the obvious bad thing happens with system time inside the guest. I don't know if there are guest drivers available to let the clock catch up.


4

The Red Hat Virtualization Deployment and Administration Guide has a section on this, but if you don't have access then it wont be much help... In a nutshell, what you are looking for is the virsh dompmsuspend command and option. The GUI utilities for KVM are okay but leave a LOT of functionality out. The virsh command can do anything you need it to, given ...


4

I will post the steps I used, in case someone has a similar usecase: Using gnome-boxes in session mode to create and run windows guests without qemu:///session default networking 'user'. create this file with the following content : /etc/qemu/bridge.conf # allow virbr0 virbr0 is the bridge used by libvirt for qemu:///system for the "default" network (...


Only top voted, non community-wiki answers of a minimum length are eligible