import { runCommand } from './command.js';

export async function runVirsh(args = [], options = {}) {
  const uri = options.uri ?? process.env.LIBVIRT_URI ?? 'qemu:///system';
  const timeoutMs = (options.timeoutSec ?? 10) * 1000;
  return await runCommand('virsh', ['--connect', uri, ...args], { timeoutMs });
}
