You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rafael Weingartner <ra...@gmail.com> on 2014/04/07 00:33:39 UTC

How does a system VM get an IP address?

Hi folks,
I was wondering how a system vm gets an IP address. I know they are the
first things that CS needs in order to start up others VMs, so when they
start there is no virtual router to assign IP addresses via DHCP.

I also noticed that on the physical hosts with the VM.Start command CS
sends some extra data that includes the IPs that the VM should get.
However, I have no idea how it actually gets those parameters and set its
IP.

Does anyone here know how it works?

-- 
Rafael Weingärtner

Re: How does a system VM get an IP address?

Posted by Rafael Weingartner <ra...@gmail.com>.
When I open the VM console I get the following:
Cleaning up temporary files....
modprobe: FATAL: Error inserting padlock_sha
(/lib/modules/2.6.32-5-686-bigmem/kernel/drivers/crypto/padlock-sha.ko): No
such device

INIT: Sending processes the TERM signal
Using makefile-style concurrent boot in runlevel 6.
cat: /var/run/xe-daemon.pid: No such file or directory
Stopping xe daemon:  kill: usage: kill [-s sigspec | -n signum | -sigspec]
pid | jobspec ... or kill -l [sigspec]
Failed
Stopping cloud-early-config...done.
Stopping web server: apache2.
done.
All processes ended within 1 seconds....done.
Stopping enhanced syslogd: rsyslogd already stoppedSaving the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access
method.
Deconfiguring network interfaces...done.
Cleaning up ifupdown....
Deactivating swap...done.

Have anyone seen something like this?



On Mon, Apr 7, 2014 at 10:15 AM, Rafael Weingartner <
rafaelweingartner@gmail.com> wrote:

> I am using Xen server instead of KVM.
> I tried to ping the VM's internal address, however it does not respond.
>
>
> On Mon, Apr 7, 2014 at 10:13 AM, Wido den Hollander <wi...@widodh.nl>wrote:
>
>>
>>
>> On 04/07/2014 03:10 PM, Rafael Weingartner wrote:
>>
>>> By agent you mean CS management server? I am running CS 4.1.1.
>>>
>>
>> No, in the KVM Agent. The hypervisor.
>>
>> /var/log/cloudstack/agent/agent.log
>>
>>
>>  would the command cloudstack-ssh work, if the VM does not respond on its
>>> ip
>>> addresses?
>>>
>>
>> It probably has it's local 169.X.X.X address, so that should work.
>>
>>
>> Wido
>>
>>
>>>
>>>
>>> On Mon, Apr 7, 2014 at 10:01 AM, Wido den Hollander <wi...@widodh.nl>
>>> wrote:
>>>
>>>
>>>>
>>>> On 04/07/2014 02:20 PM, Rafael Weingartner wrote:
>>>>
>>>>  Thanks man ;).
>>>>> By any chance if a system VM does not get its ip assigned, would there
>>>>> be
>>>>> any way to debug and check what is going on? I mean, if after it is
>>>>> running
>>>>> on the physical host it does respond on the IP that was assigned to it.
>>>>>
>>>>>
>>>>>  I say check the agent's log (set to debug!) and try to SSH into the
>>>> SSVM
>>>> with the cloudstack-ssh command.
>>>>
>>>> Wido
>>>>
>>>>
>>>>
>>>>  On Mon, Apr 7, 2014 at 9:14 AM, Wido den Hollander <wi...@widodh.nl>
>>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
>>>>>>
>>>>>>   Hi folks,
>>>>>>
>>>>>>> I was wondering how a system vm gets an IP address. I know they are
>>>>>>> the
>>>>>>> first things that CS needs in order to start up others VMs, so when
>>>>>>> they
>>>>>>> start there is no virtual router to assign IP addresses via DHCP.
>>>>>>>
>>>>>>>
>>>>>>>   Via a local virtio socket from the hypervisor in KVM mode. The VM
>>>>>>> boots
>>>>>>>
>>>>>> and via that local serial socket it gets the IP-address.
>>>>>>
>>>>>>
>>>>>>    I also noticed that on the physical hosts with the VM.Start
>>>>>> command CS
>>>>>>
>>>>>>  sends some extra data that includes the IPs that the VM should get.
>>>>>>> However, I have no idea how it actually gets those parameters and set
>>>>>>> its
>>>>>>> IP.
>>>>>>>
>>>>>>>
>>>>>>>  The management server sends this information to the KVM agent. User
>>>>>> Instances get the IP address via DHCP from the VR, System VMs via the
>>>>>> local
>>>>>> serial socket.
>>>>>>
>>>>>> Wido
>>>>>>
>>>>>>
>>>>>>
>>>>>>   Does anyone here know how it works?
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
> --
> Rafael Weingärtner
>



-- 
Rafael Weingärtner

Re: How does a system VM get an IP address?

Posted by Rafael Weingartner <ra...@gmail.com>.
I am using Xen server instead of KVM.
I tried to ping the VM's internal address, however it does not respond.


On Mon, Apr 7, 2014 at 10:13 AM, Wido den Hollander <wi...@widodh.nl> wrote:

>
>
> On 04/07/2014 03:10 PM, Rafael Weingartner wrote:
>
>> By agent you mean CS management server? I am running CS 4.1.1.
>>
>
> No, in the KVM Agent. The hypervisor.
>
> /var/log/cloudstack/agent/agent.log
>
>
>  would the command cloudstack-ssh work, if the VM does not respond on its
>> ip
>> addresses?
>>
>
> It probably has it's local 169.X.X.X address, so that should work.
>
>
> Wido
>
>
>>
>>
>> On Mon, Apr 7, 2014 at 10:01 AM, Wido den Hollander <wi...@widodh.nl>
>> wrote:
>>
>>
>>>
>>> On 04/07/2014 02:20 PM, Rafael Weingartner wrote:
>>>
>>>  Thanks man ;).
>>>> By any chance if a system VM does not get its ip assigned, would there
>>>> be
>>>> any way to debug and check what is going on? I mean, if after it is
>>>> running
>>>> on the physical host it does respond on the IP that was assigned to it.
>>>>
>>>>
>>>>  I say check the agent's log (set to debug!) and try to SSH into the
>>> SSVM
>>> with the cloudstack-ssh command.
>>>
>>> Wido
>>>
>>>
>>>
>>>  On Mon, Apr 7, 2014 at 9:14 AM, Wido den Hollander <wi...@widodh.nl>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>> On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
>>>>>
>>>>>   Hi folks,
>>>>>
>>>>>> I was wondering how a system vm gets an IP address. I know they are
>>>>>> the
>>>>>> first things that CS needs in order to start up others VMs, so when
>>>>>> they
>>>>>> start there is no virtual router to assign IP addresses via DHCP.
>>>>>>
>>>>>>
>>>>>>   Via a local virtio socket from the hypervisor in KVM mode. The VM
>>>>>> boots
>>>>>>
>>>>> and via that local serial socket it gets the IP-address.
>>>>>
>>>>>
>>>>>    I also noticed that on the physical hosts with the VM.Start command
>>>>> CS
>>>>>
>>>>>  sends some extra data that includes the IPs that the VM should get.
>>>>>> However, I have no idea how it actually gets those parameters and set
>>>>>> its
>>>>>> IP.
>>>>>>
>>>>>>
>>>>>>  The management server sends this information to the KVM agent. User
>>>>> Instances get the IP address via DHCP from the VR, System VMs via the
>>>>> local
>>>>> serial socket.
>>>>>
>>>>> Wido
>>>>>
>>>>>
>>>>>
>>>>>   Does anyone here know how it works?
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>


-- 
Rafael Weingärtner

Re: How does a system VM get an IP address?

Posted by Wido den Hollander <wi...@widodh.nl>.

On 04/07/2014 03:10 PM, Rafael Weingartner wrote:
> By agent you mean CS management server? I am running CS 4.1.1.

No, in the KVM Agent. The hypervisor.

/var/log/cloudstack/agent/agent.log

> would the command cloudstack-ssh work, if the VM does not respond on its ip
> addresses?

It probably has it's local 169.X.X.X address, so that should work.

Wido

>
>
>
> On Mon, Apr 7, 2014 at 10:01 AM, Wido den Hollander <wi...@widodh.nl> wrote:
>
>>
>>
>> On 04/07/2014 02:20 PM, Rafael Weingartner wrote:
>>
>>> Thanks man ;).
>>> By any chance if a system VM does not get its ip assigned, would there be
>>> any way to debug and check what is going on? I mean, if after it is
>>> running
>>> on the physical host it does respond on the IP that was assigned to it.
>>>
>>>
>> I say check the agent's log (set to debug!) and try to SSH into the SSVM
>> with the cloudstack-ssh command.
>>
>> Wido
>>
>>
>>
>>> On Mon, Apr 7, 2014 at 9:14 AM, Wido den Hollander <wi...@widodh.nl>
>>> wrote:
>>>
>>>
>>>>
>>>> On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
>>>>
>>>>   Hi folks,
>>>>> I was wondering how a system vm gets an IP address. I know they are the
>>>>> first things that CS needs in order to start up others VMs, so when they
>>>>> start there is no virtual router to assign IP addresses via DHCP.
>>>>>
>>>>>
>>>>>   Via a local virtio socket from the hypervisor in KVM mode. The VM boots
>>>> and via that local serial socket it gets the IP-address.
>>>>
>>>>
>>>>    I also noticed that on the physical hosts with the VM.Start command CS
>>>>
>>>>> sends some extra data that includes the IPs that the VM should get.
>>>>> However, I have no idea how it actually gets those parameters and set
>>>>> its
>>>>> IP.
>>>>>
>>>>>
>>>> The management server sends this information to the KVM agent. User
>>>> Instances get the IP address via DHCP from the VR, System VMs via the
>>>> local
>>>> serial socket.
>>>>
>>>> Wido
>>>>
>>>>
>>>>
>>>>   Does anyone here know how it works?
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>

Re: How does a system VM get an IP address?

Posted by Rafael Weingartner <ra...@gmail.com>.
By agent you mean CS management server? I am running CS 4.1.1.
would the command cloudstack-ssh work, if the VM does not respond on its ip
addresses?



On Mon, Apr 7, 2014 at 10:01 AM, Wido den Hollander <wi...@widodh.nl> wrote:

>
>
> On 04/07/2014 02:20 PM, Rafael Weingartner wrote:
>
>> Thanks man ;).
>> By any chance if a system VM does not get its ip assigned, would there be
>> any way to debug and check what is going on? I mean, if after it is
>> running
>> on the physical host it does respond on the IP that was assigned to it.
>>
>>
> I say check the agent's log (set to debug!) and try to SSH into the SSVM
> with the cloudstack-ssh command.
>
> Wido
>
>
>
>> On Mon, Apr 7, 2014 at 9:14 AM, Wido den Hollander <wi...@widodh.nl>
>> wrote:
>>
>>
>>>
>>> On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
>>>
>>>  Hi folks,
>>>> I was wondering how a system vm gets an IP address. I know they are the
>>>> first things that CS needs in order to start up others VMs, so when they
>>>> start there is no virtual router to assign IP addresses via DHCP.
>>>>
>>>>
>>>>  Via a local virtio socket from the hypervisor in KVM mode. The VM boots
>>> and via that local serial socket it gets the IP-address.
>>>
>>>
>>>   I also noticed that on the physical hosts with the VM.Start command CS
>>>
>>>> sends some extra data that includes the IPs that the VM should get.
>>>> However, I have no idea how it actually gets those parameters and set
>>>> its
>>>> IP.
>>>>
>>>>
>>> The management server sends this information to the KVM agent. User
>>> Instances get the IP address via DHCP from the VR, System VMs via the
>>> local
>>> serial socket.
>>>
>>> Wido
>>>
>>>
>>>
>>>  Does anyone here know how it works?
>>>>
>>>>
>>>>
>>
>>


-- 
Rafael Weingärtner

Re: How does a system VM get an IP address?

Posted by Wido den Hollander <wi...@widodh.nl>.

On 04/07/2014 02:20 PM, Rafael Weingartner wrote:
> Thanks man ;).
> By any chance if a system VM does not get its ip assigned, would there be
> any way to debug and check what is going on? I mean, if after it is running
> on the physical host it does respond on the IP that was assigned to it.
>

I say check the agent's log (set to debug!) and try to SSH into the SSVM 
with the cloudstack-ssh command.

Wido

>
> On Mon, Apr 7, 2014 at 9:14 AM, Wido den Hollander <wi...@widodh.nl> wrote:
>
>>
>>
>> On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
>>
>>> Hi folks,
>>> I was wondering how a system vm gets an IP address. I know they are the
>>> first things that CS needs in order to start up others VMs, so when they
>>> start there is no virtual router to assign IP addresses via DHCP.
>>>
>>>
>> Via a local virtio socket from the hypervisor in KVM mode. The VM boots
>> and via that local serial socket it gets the IP-address.
>>
>>
>>   I also noticed that on the physical hosts with the VM.Start command CS
>>> sends some extra data that includes the IPs that the VM should get.
>>> However, I have no idea how it actually gets those parameters and set its
>>> IP.
>>>
>>
>> The management server sends this information to the KVM agent. User
>> Instances get the IP address via DHCP from the VR, System VMs via the local
>> serial socket.
>>
>> Wido
>>
>>
>>
>>> Does anyone here know how it works?
>>>
>>>
>
>

Re: How does a system VM get an IP address?

Posted by Rafael Weingartner <ra...@gmail.com>.
Thanks man ;).
By any chance if a system VM does not get its ip assigned, would there be
any way to debug and check what is going on? I mean, if after it is running
on the physical host it does respond on the IP that was assigned to it.


On Mon, Apr 7, 2014 at 9:14 AM, Wido den Hollander <wi...@widodh.nl> wrote:

>
>
> On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
>
>> Hi folks,
>> I was wondering how a system vm gets an IP address. I know they are the
>> first things that CS needs in order to start up others VMs, so when they
>> start there is no virtual router to assign IP addresses via DHCP.
>>
>>
> Via a local virtio socket from the hypervisor in KVM mode. The VM boots
> and via that local serial socket it gets the IP-address.
>
>
>  I also noticed that on the physical hosts with the VM.Start command CS
>> sends some extra data that includes the IPs that the VM should get.
>> However, I have no idea how it actually gets those parameters and set its
>> IP.
>>
>
> The management server sends this information to the KVM agent. User
> Instances get the IP address via DHCP from the VR, System VMs via the local
> serial socket.
>
> Wido
>
>
>
>> Does anyone here know how it works?
>>
>>


-- 
Rafael Weingärtner

Re: How does a system VM get an IP address?

Posted by Wido den Hollander <wi...@widodh.nl>.

On 04/07/2014 12:33 AM, Rafael Weingartner wrote:
> Hi folks,
> I was wondering how a system vm gets an IP address. I know they are the
> first things that CS needs in order to start up others VMs, so when they
> start there is no virtual router to assign IP addresses via DHCP.
>

Via a local virtio socket from the hypervisor in KVM mode. The VM boots 
and via that local serial socket it gets the IP-address.

> I also noticed that on the physical hosts with the VM.Start command CS
> sends some extra data that includes the IPs that the VM should get.
> However, I have no idea how it actually gets those parameters and set its
> IP.

The management server sends this information to the KVM agent. User 
Instances get the IP address via DHCP from the VR, System VMs via the 
local serial socket.

Wido

>
> Does anyone here know how it works?
>

Re: How does a system VM get an IP address?

Posted by Rafael Weingartner <ra...@gmail.com>.
Ok, thanks.

I actually already new that. What I do not know it how the System VM that
has been started on some physical host gets the parameters that were sent
to the hypervisor and sets its IP addresses (have I been clear?). That is
why I also sent the email to the dev list.

I would like to understand the complete picture. Because in our Cloud for
some odd reason that we do not know yet, the system VMs are going up on the
physical host (hypervisor), but it is now getting its network interfaces
up. So, the CS cannot access them.
If we try to ping them from the host they are running, they do not respond.
It seems that the ip address was not set on the VM. We checked the logs on
/var/log/syslog and xcp-api.log, but apparently there was no problem with
the VM start up process.


On Sun, Apr 6, 2014 at 8:43 PM, Fred Newtz <fb...@gmail.com> wrote:
>
> It takes them from the available public IP addresses you configure when
> setting up the zone.
>
>
>
> On Sun, Apr 6, 2014 at 5:33 PM, Rafael Weingartner <
> rafaelweingartner@gmail.com> wrote:
>
> > Hi folks,
> > I was wondering how a system vm gets an IP address. I know they are the
> > first things that CS needs in order to start up others VMs, so when they
> > start there is no virtual router to assign IP addresses via DHCP.
> >
> > I also noticed that on the physical hosts with the VM.Start command CS
> > sends some extra data that includes the IPs that the VM should get.
> > However, I have no idea how it actually gets those parameters and set
its
> > IP.
> >
> > Does anyone here know how it works?
> >
> > --
> > Rafael Weingärtner
> >
>
>
>
> --
>
> Zobotek, LLC
> 7941 Katy Freeway #256
> Houston, TX 77024
>
> 281-216-0488 - Main Number
>
> http://www.zobotek.com
> http://www.stonemountainhosting.com




--
Rafael Weingärtner

Re: How does a system VM get an IP address?

Posted by Fred Newtz <fb...@gmail.com>.
It takes them from the available public IP addresses you configure when
setting up the zone.



On Sun, Apr 6, 2014 at 5:33 PM, Rafael Weingartner <
rafaelweingartner@gmail.com> wrote:

> Hi folks,
> I was wondering how a system vm gets an IP address. I know they are the
> first things that CS needs in order to start up others VMs, so when they
> start there is no virtual router to assign IP addresses via DHCP.
>
> I also noticed that on the physical hosts with the VM.Start command CS
> sends some extra data that includes the IPs that the VM should get.
> However, I have no idea how it actually gets those parameters and set its
> IP.
>
> Does anyone here know how it works?
>
> --
> Rafael Weingärtner
>



-- 

Zobotek, LLC
7941 Katy Freeway #256
Houston, TX 77024

281-216-0488 - Main Number

http://www.zobotek.com
http://www.stonemountainhosting.com