Network Config for Ganeti and VM's using KVM

820 views
Skip to first unread message

Brian Beverage

unread,
Apr 21, 2014, 6:17:30 PM4/21/14
to gan...@googlegroups.com
I am new to VM and Ganeti. I followed the instructions / docs on installing Ganeti. I have a 1 node ganeti cluster currently. This will expand if I can figure out how to get the networking part of the VM's working. I have created the bridge xen-br0 and I can connect to the ip address that I have assigned to this bridge so I assume it is configured correctly. Here is what I see from the ifconfig:

root@node1:/home/bbeverage# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1a:a0:e8:8b:07
          inet6 addr: fe80::21a:a0ff:fee8:8b07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15143 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3587 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2189253 (2.1 MB)  TX bytes:450495 (450.4 KB)
          Interrupt:21 Memory:febe0000-fec00000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:186036 (186.0 KB)  TX bytes:186036 (186.0 KB)

tap0      Link encap:Ethernet  HWaddr fe:3b:d8:b6:d4:cc
          inet6 addr: fe80::fc3b:d8ff:feb6:d4cc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:8782 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tap1      Link encap:Ethernet  HWaddr fe:d9:c7:65:cc:fe
          inet6 addr: fe80::fcd9:c7ff:fe65:ccfe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:8725 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

xen-br0   Link encap:Ethernet  HWaddr 00:1a:a0:e8:8b:07
          inet addr:10.1.233.33  Bcast:10.1.0.255  Mask:255.255.0.0
          inet6 addr: fe80::21a:a0ff:fee8:8b07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14949 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3581 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1903092 (1.9 MB)  TX bytes:433119 (433.1 KB)

xen-br0:0 Link encap:Ethernet  HWaddr 00:1a:a0:e8:8b:07
          inet addr:10.1.233.34  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

I have no idea where xen-br0:0 comes from unless Ganeti created it since that is the ip I used to init the cluster

Here is what I see when I show the info of the instance that is using tap1:

root@node1:/home/bbeverage# gnt-instance info iface.adn.com
- Instance name: iface.adn.com
  UUID: 1e1b2968-472e-48af-b97d-94c94e54ea11
  Serial number: 5
  Creation time: 2014-04-21 14:36:22
  Modification time: 2014-04-21 17:01:10
  State: configured to be up, actual state is up
  Nodes:
    - primary: node1.adn.com
      group: default (UUID c3c3b7d7-9031-4855-b7b0-2ffa76a7f6e5)
    - secondaries:
  Operating system: debootstrap+default
  Operating system parameters:
  Allocated network port: 11000
  Hypervisor: kvm
  Hypervisor parameters:
    acpi: default (True)
    boot_order: default (disk)
    cdrom2_image_path: default ()
    cdrom_disk_type: default ()
    cdrom_image_path: default ()
    cpu_cores: default (0)
    cpu_mask: default (all)
    cpu_sockets: default (0)
    cpu_threads: default (0)
    cpu_type: default ()
    disk_cache: default (default)
    disk_type: default (paravirtual)
    floppy_image_path: default ()
    initrd_path:
    kernel_args: default (ro)
    kernel_path:
    keymap: default ()
    kvm_extra: default ()
    kvm_flag: default ()
    kvm_path: default (/usr/bin/kvm)
    machine_version: default ()
    mem_path: default ()
    migration_downtime: default (30)
    nic_type: default (paravirtual)
    reboot_behavior: default (reboot)
    root_path: default (/dev/vda1)
    security_domain: default ()
    security_model: default (none)
    serial_console: default (True)
    serial_speed: default (38400)
    soundhw: default ()
    spice_bind: default ()
    spice_image_compression: default ()
    spice_ip_version: default (0)
    spice_jpeg_wan_compression: default ()
    spice_password_file: default ()
    spice_playback_compression: default (True)
    spice_streaming_video: default ()
    spice_tls_ciphers: default (HIGH:-DES:-3DES:-EXPORT:-ADH)
    spice_use_tls: default (False)
    spice_use_vdagent: default (True)
    spice_zlib_glz_wan_compression: default ()
    usb_devices: default ()
    usb_mouse: default ()
    use_chroot: default (False)
    use_localtime: default (False)
    vga: default ()
    vhost_net: default (False)
    vnc_bind_address: default ()
    vnc_password_file: default ()
    vnc_tls: default (False)
    vnc_x509_path: default ()
    vnc_x509_verify: default (False)
    vnet_hdr: default (True)
  Back-end parameters:
    always_failover: default (False)
    auto_balance: default (True)
    maxmem: default (128)
    memory: default (128)
    minmem: default (128)
    spindle_use: default (1)
    vcpus: default (1)
  NICs:
    - nic/0:
      MAC: aa:00:00:ae:a4:5c
      IP: 10.1.233.35
      mode: bridged
      link: xen-br0
      vlan:
      network: None
      UUID: 28656d75-413e-47e4-a858-ea9db4ce694e
      name: None
  Disk template: plain
  Disks:
    - disk/0: plain, size 4.0G
      access mode: rw
      logical_id: xenvg/b9396de6-1c52-4bd1-a4bd-37a6970f5994.disk0
      on primary: /dev/xenvg/b9396de6-1c52-4bd1-a4bd-37a6970f5994.disk0 (252:0)
      name: None
      UUID: 48677991-aefe-4199-9f69-990a36d54ccc

I passed ip addresses when creating the instances. I assumed this was how you set the IP address to access the VM.

I have entries in my host file to allow name resolution locally. The only IP address that has a NIC is node1.adn.com this is xen-br0's ip address.

10.1.233.33     node1.adn.com node1
10.1.233.34     master.adn.com  master
10.1.233.35     iface.adn.com iface
10.1.233.36     db.adn.com db

I cannot connect using gnt-instance console <name> it just hangs I also can not ping any of the ip addresses from the machine hosting Ganeti. I do not see how the translation of IP to VM happens. If someone could point me in the direction of how to configure the network that would be GREAT! I need to create several VM's with external IP addresses.

Any help would be appreciated.

Thanks,
Brian 

Helga Velroyen

unread,
Apr 22, 2014, 9:22:50 AM4/22/14
to gan...@googlegroups.com
Hi!
I am not entirely sure what the problem is, but can you please provide the line that you used to to initialize the cluster? And the one that you used to initialized the instance? (feel free to redact any confidential information)

I guess you used something like this?
gnt-cluster init --master-netdev=eth0 --nic-parameters mode=bridged,link=xen-br0 cluster-name

The --master-netdev option specifies which interface should be used for the cluster ip (the one 'cluster-name' resolves to, this should be a different than the host name of the master node). For this interface, ganeti creates the ':0' interface. I am not really sure what you did to have Ganeti creating an xen-br0:0 interface.

The mode parameter specifies which way you want to talk to your instances (in this case your bridge) and what the bridge's name is. Did you use something like that?

For debugging, please check the output of 'gnt-cluster info', in particular what the following values say:

- Default nic parameters: 
  default: 
    link: ?
    mode: ?
    vlan: 
- master netdev

That said, have you tried running an instance without Ganeti, but with plain KVM? Do these problems occur then, too? I am not really an expert on KVM, so it would be good to see if it a problem with KVM or with Ganeti.

Cheers,
Helga

Brian Beverage

unread,
Apr 22, 2014, 4:17:42 PM4/22/14
to gan...@googlegroups.com
Hello Helga,

Thanks for the info. It looks like since I did not pass the master-net-dev parameter it by default must have used xen-br0. I have modified the cluster to use --master-netdev=eth0 and now I have eth0:0 and it has the master ip and I can ping it. I still can not access any VM that is created.

Here is the nic info from both VM instances:

 NICs:
    - nic/0:
      MAC: aa:00:00:a2:43:d8
      IP: 10.1.233.36
      mode: bridged
      link: xen-br0
      vlan:
      network: None
      UUID: 29145b09-a7e9-425c-85e5-f9bfdb6738d8
      name: None
 NICs:
    - nic/0:
      MAC: aa:00:00:ae:a4:5c
      IP: 10.1.233.35
      mode: bridged
      link: xen-br0
      vlan:
      network: None
      UUID: 28656d75-413e-47e4-a858-ea9db4ce694e
      name: None
Here is the command I used to create the instance:
gnt-instance add --disk-template plain --os-size 4GiB --os-type debootstrap+default --hypervisor-parameters --net 0:ip=10.1.233.36 0:link=xen-br0 db.adn.com

This does not work. I will see if I can get a VM to run just using KVM.

Thanks,
Brian

candlerb

unread,
Apr 23, 2014, 4:38:52 PM4/23/14
to gan...@googlegroups.com
How did you create xen-br0? Does it have eth0 as a port member? ("brctl show")

 
I have no idea where xen-br0:0 comes from unless Ganeti created it since that is the ip I used to init the cluster


That's correct. A ganeti cluster has a shared management IP address, in addition to the individual IP addresses of the nodes. The node which is chosen as master is the one which also gets the management IP address, and it takes it over by creating an alias on the master netdev.

If you fail over the master role to another node, then *it* would take that address.

The master address is where you would send requests to the API.

 
Here is what I see when I show the info of the instance that is using tap1:


Hopefully you didn't create tap1 manually. You should just have started the instance and ganeti/kvm would have created tap1 and added it to xen-br0.

So "brctl show xen-br0" should show both eth0 and tap1 as members.

 
root@node1:/home/bbeverage# gnt-instance info iface.adn.com
- Instance name: iface.adn.com
... 

I passed ip addresses when creating the instances. I assumed this was how you set the IP address to access the VM.


No, the instance will need to have an IP address configured just like any other machine. e.g. if it's an ubuntu/debian guest then you'll need to set it up in /etc/network/interfaces to have the IP you want it to have. If the guest is configured for DHCP then it'll just DHCP for an address.

Passing the IP to ganeti is really just for keeping track of allocated IPs, and it allows ganeti's automatic IP allocator to work. If you do some fancy os scripts you can probably use it to configure the guest, but os creation is probably the trickiest part of ganeti to get to grips with.

Best thing to do is to get a console onto the guest.

You say that the serial console doesn't work - this probably means the guest wasn't configured to run getty on the serial port :-(

How to fix this depends on how you created the instance and whether it's booting from an external kernel (e.g. debootstrap) or a kernel within the image.

But the fail-safe way which should always work is to use a VNC console.

gnt-instance shutdown iface.adn.com
gnt-instance start -H vnc_bind_address=0.0.0.0 iface.adn.com

gnt-instance list -o name,pnode,network_port
# or: gnt-instance list -o +network_port

Now take a VNC client (e.g. tigervnc) and connect it to <node>:<port> for the machine of interest. Actually I can see it's node1.adm.com:11000 (from the gnt-instance info output you gave)

Voila, you have a console. Login in, fix networking, fix serial console if desired.

You might find these useful when finding your way around:

Ganeti has very good documentation, it's just knowing where to look to find what you need :-)

Regards,

another Brian.

Phil Regnauld

unread,
Apr 23, 2014, 4:44:26 PM4/23/14
to gan...@googlegroups.com
candlerb (b.candler) writes:
>
> Ganeti has very good documentation, it's just knowing where to look to find
> what you need :-)

I sense a tagline coming alone.

Brian Beverage

unread,
Apr 23, 2014, 5:19:54 PM4/23/14
to gan...@googlegroups.com
Yes, I created the xen-br0 bridge. Everything looks like it is set up correctly. Below is the out put from brctl show:
root@node1:/usr/local/lib/ganeti/tools# brctl show
bridge name     bridge id               STP enabled   interfaces
virbr0    8000.000000000000     yes
xen-br0   8000.001aa0e88b07     no             eth0
                                                                tap0
                                                                tap1
Everything looks like it is correct. I can not connect to either instance using gnt-instance console <name>
I also can not ping the assigned IP to the instances I created.

"brctl show xen-br0" should show both eth0 and tap1 as members. It does show both as members. All of the MAC addresses seem to match to where they should. If you look at the ifconfig of the taps you will notice that they are dropping all packets.
tap0      Link encap:Ethernet  HWaddr fe:26:ca:ca:5c:fb
          inet6 addr: fe80::fc26:caff:feca:5cfb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:445345 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tap1      Link encap:Ethernet  HWaddr fe:e4:da:84:81:10
          inet6 addr: fe80::fce4:daff:fe84:8110/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:455459 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
It appears that Ganeti and KVM are functioning correctly. By that I mean I can create, remove, start, shutdown instances. I even ran burnin and it worked fine.... I just cannot connect to any instance I create either through gnt-instance console <name> or ssh to the IP I also can not ping any instance created form the node it was created on either...I only have 1 node at the moment. This is really a proof of concept before we invest in servers to host several vms and several nodes.... I am not familiar with Virtual machines and the networking part of it to determine what has went wrong. I followed the Ganeti setup instructions and using info from here and the man pages managed to get this far but I cannot figure out what is wrong with the networking part. Everything seems to be set up correctly.

I did see this blurb on the ganeti instructions under Hypervisor/Network/Cluster parameters but am not certain if this is my problem or what:
KVM Instances are by default configured to use a host kernel, and to be reached via serial console, which works nice for Linux paravirtualized instances. If you want fully virtualized instances you may want to handle their kernel inside the instance, and to use VNC.

Any ideas of where to look is much appreciated.

Thanks,
Brian

candlerb

unread,
Apr 24, 2014, 3:54:56 AM4/24/14
to gan...@googlegroups.com
On Wednesday, 23 April 2014 22:19:54 UTC+1, Brian Beverage wrote:
It appears that Ganeti and KVM are functioning correctly. By that I mean I can create, remove, start, shutdown instances. I even ran burnin and it worked fine.... I just cannot connect to any instance I create either through gnt-instance console <name> or ssh to the IP I also can not ping any instance created form the node it was created on either...

Like I said before, both of these (networking and serial comms) require configuration *inside the guest* to work.

- if you want to be able to ping the guest, you have to configure the network interface *inside the guest* (e.g. using ifconfig, or /etc/network/interfaces so it's done automatically when the VM starts)

- if you want to be able to serial console into the guest, the guest has to be started with the correct kernel args or has to be configured to start a getty on the serial port (typically /dev/ttyS0)

So the problem is not with networking, the problem is with how you installed your guest (instance) images. You haven't described how you did that. There are many, many different ways of doing this.  If you'd like to show the steps you followed, then we can probably work out how to tweak the process to get everything set up automatically.

It *may* be that your guests are configured for DHCP, and so if there's a DHCP server on your network, they may have already picked up an IP address automatically. All you need to do is to find it (e.g. by looking at your DHCP logs for the MAC address of the VM, or by doing an nmap sweep across the subnet)

But for the quickest and most fool-proof way to fix this, please do what I described before, which is to attach a *VNC* (graphical/VGA) console onto your running instance. This will work even if the guest has no networking, because you're not connecting to the guest, you're connecting to the host machine, i.e. the ganeti node.

Then you can go in and edit /etc/network/interfaces and ifup eth0 (or whatever, depending on what type of guest you have installed) to configure its networking.

Regards,

Brian.

Brian Beverage

unread,
Apr 24, 2014, 11:27:35 AM4/24/14
to gan...@googlegroups.com
Thanks you somehow I missed the entire VNC conversation. It was a crazy day yesterday..... I will give this a try sometime today. Thanks Very much for your help.

Thanks,
Brian 

On Monday, April 21, 2014 5:17:30 PM UTC-5, Brian Beverage wrote:

Brian Beverage

unread,
Apr 24, 2014, 3:18:05 PM4/24/14
to gan...@googlegroups.com
OK, Thank you Brian for the help. I can connect to the VNC console but it looks to be frozen.
I attached a screenshot of the vnc session. It stays just like in the screenshot.

I also have a couple more questions. Using the documentation links you listed I was trying to install from an iso like the following:
 gnt-instance add --disk-template plain --os-size 10GiB --os-type image+default --hypervisor-parameters kvm:initrd_path=,kernel_path= --net 0:ip=10.1.233.35,link=xen-br0 --no-install --no-start iface.adn.com

OS 'image+default' not in supported OS list for node node1.adn.com: Directory for OS image not found in search path

it fails because I do  I do not have the image+default defined anywhere. Can you tell me where some documentation is that shows how to create the image+default. I would like to be able to install any os from an iso file. Like windows or linux. I would also like to know how the debootstrap+variant works as well. How do we define a variant like for example -o debootstrap+precise 

Thanks so very much for all of the help.

Thanks,
Brian


On Monday, April 21, 2014 5:17:30 PM UTC-5, Brian Beverage wrote:
vncConsole.png

Brian Beverage

unread,
Apr 24, 2014, 4:10:15 PM4/24/14
to gan...@googlegroups.com
Brian

On Monday, April 21, 2014 5:17:30 PM UTC-5, Brian Beverage wrote:

Phil Regnauld

unread,
Apr 24, 2014, 4:23:00 PM4/24/14
to gan...@googlegroups.com
Brian Beverage (bbeverage) writes:
> I think I found out how to do the images!
>
> https://code.osuosl.org/projects/ganeti-image/wiki/HOWTO_-_Ganeti_Instance_Image

Yes, that's the the place you'll find the image definition.

You should be much closer to getting things to work now!

Cheers,
Phil

Brian Beverage

unread,
Apr 24, 2014, 4:50:12 PM4/24/14
to gan...@googlegroups.com
Thanks I think I am slowly working my way through this... 

I now see this panic when trying to install a centos 6.5 instance via image on this test node. I know this pc I am using as a testing machine is 6 years old so could this just be a "old hardware issue"? It opens up the install just like I had placed the DVD in the machine and booted to it. I then select install the OS and it starts to load things then just a little ways in panics. looking at the screenshot it looks like the kernal init might be where it is tripping up. Again I am on an 6 year old PC to try and create a proof of concept before real servers are purchased. I am just uncertain if this is just because of a flag I need to pass or if old hardware with virtualization could be my problem. I do know that the machine that is hosting this node did have CentOS 6.5 installed previously. This is my first dive into virtualization so I am not familiar with how to do this type of thing.

I appreciate all the help. If I can get this setup working it seems like such a great cost effective way to have an enterprise type vm solution with out the $$$$$'s of a SAN.

Thanks,
Brian


On Monday, April 21, 2014 5:17:30 PM UTC-5, Brian Beverage wrote:
CentOS6.5Pan.png

Phil Regnauld

unread,
Apr 24, 2014, 4:57:03 PM4/24/14
to gan...@googlegroups.com
Brian Beverage (bbeverage) writes:
> Thanks I think I am slowly working my way through this...
>
> I now see this panic when trying to install a centos 6.5 instance via image
> on this test node. I know this pc I am using as a testing machine is 6
> years old so could this just be a "old hardware issue"? It opens up the
> install just like I had placed the DVD in the machine and booted to it. I
> then select install the OS and it starts to load things then just a little
> ways in panics.

Hmmm..

> looking at the screenshot it looks like the kernal init
> might be where it is tripping up. Again I am on an 6 year old PC to try and
> create a proof of concept before real servers are purchased.

That could be an issue between KVM and CentOS, and not your fault.
Remember, KVM presents a normalized virtual machine, no
matter what hardware you're running on - assuming you HAVE
VT-x hardware virtualization enabled (which you do, otherwise, you
wouldn't be able to boot the installer in the first place).

What exactly does the panic say ? Can you get a screen shot ?
It could be a missing disk, or something else.

> This is my first dive into virtualization so I am not familiar with how to
> do this type of thing.

You didn't pick the simplest topic by deploying Ganeti :)
But nevertheless, don't be discouraged. You can, if you want to experiment
a bit, test using libvirt, virt-manager + KVM. But now you've got Ganeti
going, you're on the right track.

> I appreciate all the help. If I can get this setup working it seems like
> such a great cost effective way to have an enterprise type vm solution with
> out the $$$$$'s of a SAN.

Very much so!

Cheers,
Phil

Brian Beverage

unread,
Apr 24, 2014, 6:03:54 PM4/24/14
to gan...@googlegroups.com
Thanks Phil attached is the screenshot of the Panic I am seeing. 

I think I will try another version of CentOS just to see if that one will work.

        You didn't pick the simplest topic by deploying Ganeti :) 
        But nevertheless, don't be discouraged. You can, if you want to experiment 
        a bit, test using libvirt, virt-manager + KVM. But now you've got Ganeti 
        going, you're on the right track. 

Seems like when I do something its never a simple topic! LOL I can see so much value here if I can get my head around how it works and how to deploy instances. I need to understand this enough to teach my other team members how this all works.

I have tried Ubuntu 12.04 LTS iso as well and it hangs at detecting network hardware......

Thanks,
Brian
CentOS6.5Pan.png

Phil Regnauld

unread,
Apr 24, 2014, 6:15:22 PM4/24/14
to gan...@googlegroups.com
Brian Beverage (bbeverage) writes:
> Thanks Phil attached is the screenshot of the Panic I am seeing.
>
> I think I will try another version of CentOS just to see if that one will
> work.

Ok.

> I have tried Ubuntu 12.04 LTS iso as well and it hangs at detecting network
> hardware......

That could be because your VM's virtual interface is not attached to
the right bridge - I know you posted output earlier at Brian's request,
so I'll dig those up, but do verify this point.

gnt-instance info instance_name

and look for the network info.

Brian Beverage

unread,
Apr 24, 2014, 6:19:56 PM4/24/14
to gan...@googlegroups.com
Here is that info:

 NICs:
    - nic/0:
      MAC: aa:00:00:69:5b:5d
      IP: 10.1.233.35
      mode: bridged
      link: xen-br0
      vlan:
      network: None
      UUID: 264d703d-1b51-47a9-8908-660813e32d7a
      name: None
I looks like it should work to me but the installer just sits at 0% I have attached that screenshot as well.

Thanks,
Brian
UbunNet.png

Phil Regnauld

unread,
Apr 24, 2014, 6:53:40 PM4/24/14
to gan...@googlegroups.com
Brian Beverage (bbeverage) writes:
> NICs:
> - nic/0:
> MAC: aa:00:00:69:5b:5d
> IP: 10.1.233.35
> mode: bridged
> link: xen-br0

> I looks like it should work to me

You're right, it does look correct.

> but the installer just sits at 0%
> I have attached that screenshot as well.

Detecting hardware.. I wonder what it's doing in the background. This
is odd.

You may want to try ALT+F1/2/3 while it's hung to see what's happening
on the debug console.

candlerb

unread,
Apr 25, 2014, 6:41:53 AM4/25/14
to gan...@googlegroups.com
On Thursday, 24 April 2014 20:18:05 UTC+1, Brian Beverage wrote:
OK, Thank you Brian for the help. I can connect to the VNC console but it looks to be frozen.
I attached a screenshot of the vnc session. It stays just like in the screenshot.

OK, that's clear. It means you haven't installed an OS into the hard disk image. It's like booting a PC with a brand new hard-drive :-)
 
I also have a couple more questions. Using the documentation links you listed I was trying to install from an iso like the following:
 gnt-instance add --disk-template plain --os-size 10GiB --os-type image+default --hypervisor-parameters kvm:initrd_path=,kernel_path= --net 0:ip=10.1.233.35,link=xen-br0 --no-install --no-start iface.adn.com

OS 'image+default' not in supported OS list for node node1.adn.com: Directory for OS image not found in search path

That means you don't have the package "ganeti-instance-image" installed (only "ganeti-instance-debootstrap" is installed by default).

You can get ganeti-instance image 0.5.1 by:


or you can install 0.6 from source (although 0.5.1 will do you fine).

In your case, since you're doing "--no-install", it doesn't actually matter what OS definition you use. You could use "-o debootstrap+default --no-install" and get the same result.
 
it fails because I do  I do not have the image+default defined anywhere. Can you tell me where some documentation is that shows how to create the image+default. I would like to be able to install any os from an iso file. Like windows or linux.

Right, so you need to attach a CD-ROM at instance startup time.

If you install ganeti-instance-image, then my preference is to create a new variant for this. Create /etc/ganeti/instance-image/variants/cd.conf containing:

CDINSTALL="yes"
NOMOUNT="yes"

Then edit /etc/ganeti/instance-image/variants.list so it looks like this:

default
cd

If you have more than one node, copy these files from the master to the other nodes:

# gnt-cluster copyfile /etc/ganeti/instance-image/variants/cd.conf
# gnt-cluster copyfile /etc/ganeti/instance-image/variants.list

Now if you type "gnt-os list" you should see that "image+cd" variant is available.

Create your image as you did before, but with --no-start

# gnt-instance add -t plain -o image+cd \
    -s 4G -B minmem=256M,maxmem=1G \
    --no-start --no-ip-check --no-name-check \
    centos1

Put the CD-ROM ISO in any location of your choice, let's say /var/iso/, and start the instance with the CD-ROM attached.

# gnt-instance start \
    -H vnc_bind_address=0.0.0.0,boot_order=cdrom,cdrom_image_path=/var/iso/CentOS-6.5-i386-LiveCD.iso \
    centos1
 
Attach VNC to control to install.

After install, shutdown and restart at the ganeti level to detach the CD-ROM.

# gnt-instance reboot centos1


I would also like to know how the debootstrap+variant works as well. How do we define a variant like for example -o debootstrap+precise 

Can I save that story for another time please :-)

Cheers,

Brian.
 

Brian Beverage

unread,
Apr 25, 2014, 11:47:09 AM4/25/14
to gan...@googlegroups.com
Thanks Phil,

It looks like the instance is out of memory is why it would not install. I am guessing since I did not pass a memory value it defaulted to something very small? I am guessing that a default value can be set somewhere? This is all based on the an assumption since I tried to install CentOS 5 and it said memory is to low to use the graphical installer so it switched to text based on and is trying to install now. Hopefully this one will work.

If this one works next I need to create a windows instance to make certain that all works.

Thanks,
Brian 

Brian Beverage

unread,
Apr 25, 2014, 11:47:47 AM4/25/14
to gan...@googlegroups.com
Thanks Brian,

I had figured out some of what you mentioned. It looks like the reason the iso's I have tried did not install is because the system is out of memory..... I went back to centos 5.5 and it told me while the install was going on that it did not have enough memory to install so it switched to text mode!

Sure you can save the variant story for another time.

Thanks,
Brian

Brian Beverage

unread,
Apr 25, 2014, 6:48:44 PM4/25/14
to gan...@googlegroups.com
I am now trying to create a Windows server 2003 instance on this node. It hangs at setup saying "Setup is starting Windows". I assume that windows will run in this environment. Again I am using Ubuntu 12.04 for my nodes with KVM.

Thanks,
Brian

candlerb

unread,
May 6, 2014, 3:44:38 PM5/6/14
to gan...@googlegroups.com


On Friday, 25 April 2014 16:47:09 UTC+1, Brian Beverage wrote:
Thanks Phil,

It looks like the instance is out of memory is why it would not install. I am guessing since I did not pass a memory value it defaulted to something very small?

gnt-cluster info | egrep 'minmem|maxmem'

will show you the defaults for your cluster, i.e. for any instance where you didn't specify the memory you wanted. I have a vague idea the default is very small, like 128MB.

Note: to specify the memory for an instance to be, say, between 512M and 1G, use:

gnt-instance modify -B minmem=512,maxmem=1024 <instance-name>

Don't use "gnt-instance modify -B memory=..." - that sets the run-time memory size on a running instance to be somewhere between minmem and maxmem.  This is how you control "balloon memory", adding or removing memory on a running VM. The VM OS needs a balloon memory driver for this to work (included by default in modern Linux guests; for Windows it's included in the Red Hat virtio drivers disk)

Regards,

Brian.

Reply all
Reply to author
Forward
0 new messages