How to connect QEMU qmp-shell to a VM via unix socket? - qemu

I followed this tutorial to connect qmp-shell to a QEMU VM instance.
1. Start QMP on a unix socket
# qemu-system-aarch64 -M virt -qmp unix:./qmp-sock,server,wait=off
2. Run the script
# qmp-shell ./qmp-sock
3. You should get the following prompt
(QEMU)
But step 2 gives below error:
ERROR: Couldn't connect to ./qmp-sock: Failed to establish connection: [Errno 2] No such file or directory
What could be wrong?

Related

Cannot start minishift on mac Catalina

I tried a couple of time to install uninstall and reinstall openshift on 2 macs with os Catalina 10.15.7 but it never starts.
I read Minishift cannot start in macOS and installed the var as described. but I still get the error below. Did anybody manage to install it on Catalyna and managed to resolve these errors?
kind regards
Markus
-- Starting Minishift VM ........ FAIL E0423 15:57:02.814314 21785 start.go:499] Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: /usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
. Retrying.
Error starting the VM: Error creating the VM. Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: /usr/local/bin/VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.99.1 --netmask 255.255.255.0 failed:
VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp
It seens a virtualbox configuration error about network access deniying. Try this:
Access or create file /etc/vbox/networks.conf (or where your vbox configuration file is located)
Change the content to: *0.0.0.0/0 ::/0

curl: (28) Failed to connect to dist.ipfs.io port 443: Operation timed out

I am trying to install ipfs using the following command from this link
enter link description here
curl -O https://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_darwin-arm64.tar.gz
but every time when I run it on terminal gives me this error
curl: (28) Failed to connect to dist.ipfs.io port 443: Operation timed
out
I am using MacBook m1 chip.
also I am using VPN for google services.

Problem with virsh / cannot connect to qemu

I am trying to setup KVM, but when running $ sudo virsh net-define br10.xml I get this:
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
And when jumping into virt-manager GUI a get this dialog Unable to connect to libvirt qemu:///system.
I checked if I am in both kvm and libvirt groups and that seems okay.
I also checked if the libvrt-sock file is created when running $ sudo systemctl start libvirtd.service but there is nothing.
So it showed up that privilges for my files wasn't set correctly. Now everything works

Getting error: operation failed: Failed to connect to remote libvirt error when I try doing kvm migration using virsh on debian

I am getting the error message
error: operation failed: Failed to connect to remote libvirt URI qemu+ssh://mytargethostname.mydomain.com/system: Cannot recv data: Host key verification failed.: Connection reset by peer
when I try to run the kvm migration command like this
virsh migrate --verbose --live --p2p --tunnelled hosttomigrate qemu+ssh://mytargethostname.mydomain.com/system
I can successfully view the running vms on the target host when I run
virsh -c qemu+ssh://mytargethostname.mydomain.com/system list --all
Is there some special configuration that I may need for kvm ?

Mysql: forward host lookup failed: Unknown host

We are using docker-compose in our app and am not familiar with this part of the application we are getting this error after runnning docker-compose up --build:
Mysql: forward host lookup failed: Unknown host
After an inspection to hosts list created by docker-compose:
$ docker network prune
$ docker network ls
$ docker network inspect <desired_network>
I noticed db was not there, so I tried to build it up and see what happens:
$ docker-compose run <desired_db_image>
Getting the correct output:
Initializing database
mkdir: cannot create directory '/var/lib/mysql//mysql': No space left on device
Fatal error Can't create database directory '/var/lib/mysql//mysql'
So you need to free some space:
$ docker system prune
Select: y