
	const execute = require('../lib/executeCommand');

	module.exports = (vm) => {

		return new Promise((resolve, reject) => {

			execute(['showvminfo', '"' + vm + '"']).then(stdout => {

				let info = [];

				let regex = /^(.*?):\s+(.*)$/gim;
				let match;

				while (match = regex.exec(stdout)) {

					if (match.index === regex.lastIndex) {
						regex.lastIndex++;
					}

					// Trim
					let varname = match[1].trim().toLowerCase().replace(/ /g, '_');
					let value = match[2].trim();

					info[varname] = value;

				}

				resolve(info);

			}).catch(reject);


		});

	};

	const execute = require('../lib/executeCommand');

	module.exports = (vm) => {

		return new Promise((resolve, reject) => {

			execute(['showvminfo', '"' + vm + '"']).then(stdout => {

				let info = {};

				let regex = /^(.*?):\s+(.*)$/gim;
				let match;

				while (match = regex.exec(stdout)) {

					if (match.index === regex.lastIndex) {
						regex.lastIndex++;
					}

					// Trim
					let varname = match[1].trim().toLowerCase().replace(/ /g, '_');
					let value = match[2].trim();

					info[varname] = value;

				}

				resolve(info);

			}).catch(reject);


		});

	};

Use Object and not array.
Use Object and not array.

Instead of using `info = []`. To which if we try to assign properties, doesn't seem to work well. Hence, try to use object representation, which allows us to use `info.name` or assign it another object.