XEN script to get ssh access to guest VM
xenconsole.sh
#!/bin/bash
xl list;
echo -n "Input VM name:";
read domname;
echo -n "Input ssh username:";
read sshusername;
domid=`xe vm-list | grep -B 1 $domname | grep uuid | awk '{print $5}'`;
domip=`xe vm-param-list uuid=$domid | grep network | awk '{print $4}' | sed 's/;//g'`;
ssh $sshusername@$domip;
#!/bin/bash
xl list;
echo -n "Input VM name:";
read domname;
echo -n "Input ssh username:";
read sshusername;
domid=`xe vm-list | grep -B 1 $domname | grep uuid | awk '{print $5}'`;
domip=`xe vm-param-list uuid=$domid | grep network | awk '{print $4}' | sed 's/;//g'`;
ssh $sshusername@$domip;
Комментарии
Отправить комментарий