On Wed, Sep 22, 2010 at 4:39 PM, Jonathan Sabo <jsabo(a)criminal.org> wrote:
On Wed, Sep 22, 2010 at 4:26 PM, James Cammarata
<jimi(a)sngx.net> wrote:
>
>> How are you setting that on install and making it not create the
>> vswif0 interface? You can actually get it to work if you use ip
>> append 1 but that sucks. Do you mind sharing your template or
>> whatever settings you're doing to allow you to just assign the ip to a
>> vmnic and not vswif0? How do you get the service console not to use
>> vswif0...
>
> vswif0 still gets created, VMware creates it and assigns the random mac,
> but all our kickstart traffic goes across vmnic0 still which we setup to
> use the static IP normally just like any kickstart.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
I was trying that for awhile and wasn't having any luck with getting
it to work. I was using ESX 4.0... were you using 4.1 or something?
Maybe I was just messing it up. I'll have to retest.
So for automatically creating vmware guests... I see a few ways to
make that happen. You could template out the VMX files, you could use
one of the vmware api's, or you could use libvirtd. Libvirtd vmware
support isn't included in earlier RHEL versions and maybe none of
them... I haven't found the support in anything but the download from
the libvirt web page. Templating VMX files will work but it seems
like a hack... We could just use the koan vmcreate.py and just
update the vmx code or template it out and pull it from cobbler. I
wrote some code to remote control vmware vm's and create them using
the vijava api. It's an open source java api that's now a vmware
"fling". I basically ported one of the examples from Steve Jin's book
to jython from java and I made a little command line tool.
http://github.com/jsabo/vmware_misc/blob/master/manage-vms.py
Please forgive my lack of programming skill :)
I want to have a way to pull the information from Cobbler's virtual
section and create the virtual hardware for the guests and then have a
way to install them from Cobbler...
I'm finally testing... and I'm getting an exception. Still looking
for why. The action_import code looks like it should set it to esxi4.
scanning /var/www/cobbler/ks_mirror/vmware-esxi4.1-x86_64 for distro signature
found content (breed=vmware) at /var/www/cobbler/ks_mirror/vmware-esxi4.1-x86_64
creating new distro: vmware-esxi4.1-x86_64
Exception occured: exceptions.AttributeError
Exception value: 'NoneType' object has no attribute 'os_version'
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 89, in run
rc = self._run(self)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line
219, in runner
self.logger
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 664,
in import_tree
return importer.run()
File "/usr/lib/python2.4/site-packages/cobbler/action_import.py",
line 217, in run
os.path.walk(self.path, self.distro_adder, distros_added)
File "/usr/lib64/python2.4/posixpath.py", line 290, in walk
func(arg, top, names)
File "/usr/lib/python2.4/site-packages/cobbler/action_import.py",
line 553, in distro_adder
adtls.append(self.add_entry(dirname,kernel,initrd))
File "/usr/lib/python2.4/site-packages/cobbler/action_import.py",
line 641, in add_entry
self.distros.add(distro,save=True)
File "/usr/lib/python2.4/site-packages/cobbler/collection.py", line
288, in add
self.lite_sync.add_single_distro(ref.name)
File "/usr/lib/python2.4/site-packages/cobbler/action_litesync.py",
line 76, in add_single_distro
self.sync.pxegen.make_pxe_menu()
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line
266, in make_pxe_menu
self.make_actual_pxe_menu()
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line
343, in make_actual_pxe_menu
contents = self.write_pxe_file(None,None,None,None,image.arch,image=image)
File "/usr/lib/python2.4/site-packages/cobbler/pxegen.py", line
513, in write_pxe_file
elif distro.os_version.startswith("esxi"):