Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error messages #39

Open
atwright147 opened this issue Dec 23, 2018 · 1 comment
Open

Error messages #39

atwright147 opened this issue Dec 23, 2018 · 1 comment

Comments

@atwright147
Copy link
Contributor

atwright147 commented Dec 23, 2018

@RamyElkest a new issue I am having now, is that Libvirt is spitting out lovely useful messages into the terminal but I cannot seem to get them in JS.

Terminal output after an error:

libvirt: Domain Config error : operation failed: domain 'created_from_post' already exists with uuid d6bd24d8-ff09-426d-ae23-e8c3cdb696e6
Error: virDomainDefineXML() failed
    at module.exports.defineXML (/vagrant/node_modules/libvirt-node/generated/libvirt-connect.js:708:28)
    at Object.create (/vagrant/src/server/models/Domains.js:67:38)
    at create (/vagrant/src/server/controllers/DomainsController.js:34:21)
    at Layer.handle [as handle_request] (/vagrant/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/vagrant/node_modules/express/lib/router/index.js:317:13)
    at /vagrant/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/vagrant/node_modules/express/lib/router/index.js:335:12)
    at next (/vagrant/node_modules/express/lib/router/index.js:275:10)
    at nocache (/vagrant/node_modules/nocache/index.js:8:5)
    at Layer.handle [as handle_request] (/vagrant/node_modules/express/lib/router/layer.js:95:5)

I can only get: virDomainDefineXML() failed, but Domain Config error : operation failed: domain 'created_from_post' already exists with uuid d6bd24d8-ff09-426d-ae23-e8c3cdb696e6 would be way more useful to me :)

Is there something I am doing wrong, or could you make a change to expose these messages?

More info

This is where I am using it: https://gitlab.com/atwright147/kvm-controller/commit/d3667b39bdb7457020d01358923949d8464b33c2

Sending a payload like:

{
	"xmlString": "<domain type='kvm'><name>created_from_post</name><memory unit='MB'>512</memory><vcpu>1</vcpu><os><type arch='i686'>hvm</type></os><clock sync='localtime'/><devices><disk type='file' device='disk'><source file='/var/lib/libvirt/images/demo2.img'/><target dev='hda'/></disk><disk type='file' device='cdrom'><source file='/home/vagrant/Downloads/Core-current.iso'/><target dev='hdc'/><readonly/></disk><interface type='network'><source network='default'/></interface><graphics type='vnc' port='-1'/></devices></domain>"
}
@atwright147
Copy link
Contributor Author

@RamyElkest do you have any thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant