Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by wilsontc

  1. I've P2V and V2V'd a few linux servers using this procedure - http://forums.citrix.com/thread.jspa?messageID=1477999

    * create new VM, boot it and assign a temporary IP
    	* install rsync on the old and the new VM
    	* enable SSH root login on the old VM
    	* run the following rsync command the first time:
    rsync -av --numeric-ids --delete --progress --exclude /sys --exclude /boot --exclude /dev --exclude /proc --exclude /etc/mtab --exclude /etc/fstab --exclude /etc/udev/rules.d --exclude /lib/modules root@my-old-vm:/ /
    	* this copies most files from the old VM, but excludes the running kernel, special filesystems, fstab etc.
    	* downtime begins: switch the old VM to runlevel 1, disable remote logins, startup the sshd again
    	* do a final rsync with the command from above
    	* shutdown the old VM
    	* downtime ends: reboot the new VM
    	* install the linux XenTools on the new VM

    I am sure for vmware it's slightly different, but it's worked a treat.

    This is probably the fastest approach. You obviously can't do this on a Windows system, but for Unix it's great!


    Just be careful of /etc/fstab. Depending on how many virtual hard disks you're going to use, you may need to modify this file.

  2. I can pretty much replicate in Ubuntu, all the things I'd typically be doing on my Windows PC. Only question is though, which I'll ask here before Googling it, can I easily create desktop icons?

    You can right click on any file or application and go to "Make Link". Then just drag that to your desktop. However, I don't think that really is the most effective way to navigate. If you press your Windows key on your keyboard, you get the Dash. It's probably faster to type the name of the application than to minimise windows to the desktop. As Unity and Ubuntu mature, we'll start to see more novel ways of using the Dash through the use of Lens's.

  3. From what I've been reading, I must be the only person who loves Unity (other than Canonical employees).


    Ubuntu is awesome. I love Ubuntu One, and will soon need a second 20GB pack (!). Quickly is really fun and interesting. DesktopCouch is awesome, I can't wait to see how that evolves in the next few years. AppIndicators are really sweet, and have reduced the clutter in the notification area.


    I think it's awesome that Ubuntu is daring to be different in a world of "me too!" Linux distros.


    Canonical has a lot of detractors. I think if people put the politics aside, they would see that Canonical is making some great software, and to do that, have to make some decisions that not every single community is going to like. My server will probably always run FreeBSD, but Ubuntu is a wonderful desktop distro which is getting better all the time.

  4. Heh, we were just packing to come home to Melbourne when the Earthquake struck. Thankfully we were able to change our flight to the next day (today), but although Narita airport is apparently open, all roads and trains are closed, so we can't physically get there. Instead, we've had to change our flight to depart from Osaka, but Jetstar has told us we can only change a maximum of two times - if an aftershock happens, or if we can no longer get to Osaka (we're going via Shinkansen naturally), we'll need to re-buy the air ticket.

  5. Looks like I will be setting up a test unit before installing it on my server.

    Has anyone had any issues with Hyper-V after the update?

    I've done two Hyper-V hosts, and about 8 guests, no issues, but it takes a hell of a long time to install (several hours). Our VM hosts are fairly old though.


    To get Dynamic Memory working, both the host and the guests need to be updated. Once you've updated the host, be sure to update the integration drivers on the guest and do another restart for the Dynamic Memory goodness :D

  6. In any case, you give me such grief as to send me a .docx file, I'll return the favour with a .odt.

    I'd love to see you work in a business environment. That sort of attitude would get you laughed out of a job.


    I don't see why OO isn't ready to work for most small businesses either. Is it the lack of group edits or something? It's a powerful word processor, with mail merge (necessary for office workers), and the ability to create templates. What more do businesses need?

    • Compatibility with the most popular office suite (MS Office)
    • Integration with document management systems (SharePoint and friends)
    • Group calendaring (Outlook)
    • Group editing (Office 2010 + SharePoint)
    • Easy-to-use image tools (Office 2010)
    • Rich form creation and management (InfoPath)
    • Shared mailboxes and contact lists (Exchange + Outlook)

    There is probably more weight on the top three reasons than the others, and to be fair, email / "groupware" functionality is probably provided by other platforms, but Microsoft Office has excellent integration between the various programs in the suite, and this is improving with each release. I am not aware of any one open source solution that has complete feature parity with MS Office, but please enlighten me if this is the case (especially with point 1)

  7. Yup, OpenOffice / LibreOffice has really crap compatibility with Microsoft Office OpenXML files (not too sure about the older .doc, .xls files).


    If you create a basic document from the default.docx template, yeah, OOo / LO can read it, and you don't lose too much. If you have custom styles, tables, graphics and fields, then you're in for a world of frustration.


    OpenOffice might be capable of editing your basic uni assignment, but it's far from ready for the average corporate document if compatibility with Microsoft Office needs to be retained.


    *edit* I saw Dick Smith advertising Office Home and Student for $99 if you purchased a PC too - that doesn't strike me as an unreasonable amount to pay, and if it were available for Linux, I would gladly be using it!

  8. Is the SKU class a partial class, with the other parts auto generated? probably doesn't matter....


    Anyway, you just need to test for NULL before you do a Contains.

    SKU is not a partial class.


    What should I test for NULL? searchTerm will always be present, and escapedTerm shouldn't ever return NULL...?


    Sorry, I'm not sure what you mean Kikz!


    Is there a better way of accomplishing what I want to do? Should I employ a more sophisticated method of escaping the search query string?

  9. Thanks for the responses Kikz and Periander.


    So then...what would I need to do to make the above work? Basically, I'm trying to keep all the "find Sku" code in the Sku class. It seems like if I moved this to the controller, it would work fine! Not what I'm after :| (Yes, this is .NET MVC 3 as you seem to have gathered)


    Or do I need to implement Periander's "rant" pattern? ;)

  10. Hi guys,


    I have two public classes. I am trying to call a static method from one of the public classes, and am getting "An object reference is required for the non-static field, method or property <methodName>" when I try to build.


    Class with static method:

    public class Sku
    	/* Snip various getters and setters */
    	public static IEnumerable<Sku> FindByDynamic(string searchTerm)
    			OrderManagerEntities db = new OrderManagerEntities();
    			string escapedTerm = searchTerm.Replace("'", "''");
    			return (from s in db.Skus
    					where s.manufacturer_code.Contains(escapedTerm) ||
    						  s.name.Contains(escapedTerm) ||
    						  s.vendor_code.Contains(escapedTerm) ||
    					select s).ToList();

    I'm trying to call the above method like this:

    1		public ActionResult Results(string query)
    2	   {
    3		   IEnumerable<Sku> skus = Sku.FindByDynamic(query);
    4			return View(skus);
    5		}

    I'm getting the error on line 3. I thought that by performing the Linq query within the static method the I could call FindByDynamic() like this, but clearly I can't.


    As an aside, is there a better way to query my DB? Is there a built-in method to escape my query string? I'm quite worried about it!

  11. Often, people will hack something up on a non-production system & by chance, it finds it's way to a production system.

    Ah yes, the "production POC"...:(


    You may not be immediately aware that you have a malicious user on your system, so your last sentiment doesn't make much sense, at least logically. There may well be a lot more serious things to be worried about than creating symlinks in /tmp/, but it's generally through trivial holes such as symlink exploits that someone with something other than good intentions gets to do more serious things on your system. They will generally need to escalate their privileges first.


    Think about it.

    You're right. I will be more careful.

  12. This looks quite interesting, but for a non-coder like me, what does it achieve?


    I use LD_PRELOAD for v4l2 with xawtv and my webcam.

    It allows you to load a program or library which the program wasn't originally going to load. The security implications are enormous.


    In this case, anything that requires getpwuid() is going to use this function instead, and thus print usernames in reverse...

  13. Firstly, great work! However, I'd like to point something out here that you should pay a little more attention to. Always check your temporary files before writing to them! Imagine the following scenario.

    That's a very good point. The function is a quick and dirty thing home users (such as myself) would probably find useful - such a function has no place on a production server! Of course, if a malicious user had access to the system, I would be a bit more worried about them doing more serious things that create symlinks in /tmp.


    With all due respect; That seems like a silly idea to me :P


    Why not place those scripts in their own scripts file, and then either place then in /usr/bin or add /usr/scripts to your PATH var?

    I do this for larger stuff, but find it convenient to have some of these smaller things in my shell rc. For example, the mail backup function references a perl script (imapsync) which lives in such a place (~/opt/local/bin/) as I rarely have root access to machines outside of my personal ones. Once again, for production servers, you are absolutely right: pick a more appropriate location. These functions are a lot harder to call from Cron for example than something in /usr/local/bin.