[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] Help Hypervisor VM IP reconfig

If you have access to dom0 you can also grab the dom-id of the vm and use "xl 
console <dom-id>" to access the console as well.

-----Original Message-----
From: xen-api-bounces@xxxxxxxxxxxxx [mailto:xen-api-bounces@xxxxxxxxxxxxx] On 
Behalf Of Denis Cardon
Sent: Friday, January 10, 2014 9:11 AM
To: Agyeman B. Danso Jr.
Cc: xen-api@xxxxxxxxxxxxx
Subject: Re: [Xen-API] Help Hypervisor VM IP reconfig

Hi Agyeman,

> Can you help me with the command to change ip address of a vm while on 
> hypervisor?
> In my case if access to xen center is disabled and a user changes the 
> ipaddress of a vm and no longer can ssh to the vm, I would like to be 
> able to reset the ip address, netmask, and gateway from the hypervisor.
> The command below shows me network info but how to I change that 
> network info?
> xe vm-list params=name-label,networks

I think this command is read only and show you the ip address that has been 
reported by xentools to the hypervisor.

However I don't think there is a default mechanism in xapi to set the ip 
address of a virtual machine. In some VDI deployement solution, the software 
install a service inside the VDI machine to get the ip address from a 
deployement server.

However you don't need xencenter to get access to the vnc frame buffer of the 
virtual machine. You can get the vnc port using the following command line 
(change my_vm_name, and be sure to be on the server where the vm is running if 
the server is in a pool) :

xenstore-read /local/domain/$(xe vm-list params=dom-id name-label=my_vm_name 

Take the port number that is given by the above command line (for example 
5908), and then, just do a ssh port forwarding :

ssh my_xen_server -L 5908:srvxen1:5908 -l root

then from the same machine, run

vncviewer  localhost:8

Another method for a linux VM : use xe-edit-bootloader -n my_vm_name, then from 
another shell, you can find the vm mounted on /var/run/fix-xxxxxx when you have 
fixed the network configuration, you get out of the mount point, then get out 
of the grub editing window, the xe-edit-bootloader script will umount the 
partition by itself.



> *Thank you,*
> *Agyeman B. Danso Jr.*
> Security Engineer
> infoLock Technologies
> 877.610.5625 x253 - direct
> ADanso@xxxxxxxxxxxxxxxx
> <https://east.exch026.serverdata.net/owa/redir.aspx?C=W3qlR8A0LE23deb0
> p_RKqup9rLCEc88I-S2ldrpjnNwv925Zia6zIs5wqMGKxN-DtjqIozN4Cqg.&URL=mailt
> o%3aADanso%40infolocktech.com>
> This body part will be downloaded on demand.

Denis Cardon
Tranquil IT Systems
Les Espaces Jules Verne, bâtiment A
12 avenue Jules Verne
44230 Saint Sébastien sur Loire
tel : +33 (0)

Xen-api mailing list

Xen-api mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.