Skip to content

Error messages #39

Description

@atwright147

@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>"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions