These instructions are to allow you to increase the size of a virtual machine’s harddrive. This was done on an ESX 4.0 system running ubuntu 8.10 with thin provisioning, meaning the harddrive only takes up as much space as it uses. The main problem was that the swap partition was created after the primary partition, so it would not allow the primary to expand to the “right” of the swap. The solution was to delete the swap and then reallocate the partition, then recreate the swap.
This command may be done via ssh access to ESX to change the VM to use thin provisioning.
vmkfstools -i Ubuntu-s001.vmdk new.vmdk -d thin -a lsilogic
-increase the size from the vsphere client of the hardrive in question
-load gparted iso and set it to boot on startup from vsphere client
-Make sure the cd-rom is “conenct at power on”
-I deleted the linux swap partition (turned it off first) by right clicking on the swap partition
-then I was able to resize my primary partition
-recreated the swap partition at the end [primary + additional partition][swap]
Doing a “df -h” shows that the disk space was automatically recognized by Ubuntu after running gparted.
Posted 1 month, 1 week ago at 12:49 pm. Add a comment
Original info was found here. It was posted about 3 years ago, so JQuery has changed a little since then with the implementation of JQuery.noconflict().
In a nutshell, just in clude JQuery first and then include the other libraries(s) that may use the $( function. Make sure you call JQuery stuff with JQuery(xxx) instead of $( from now on. You include JQuery in rails usually in your main layout file by typing:
<%= javascript_include_tag ‘jquery’ %>
Make sure the jquery download files are in your /public/javascript directory of your project.
The JQuery site suggested adding the noconflict at the end of the jquery.js file, but instead I did it this way in the layout file.
<script>jQuery.noConflict(); </script>
Posted 3 months ago at 2:10 pm. Add a comment
Put the below code in to your model. I found this info on railsforums.com.
HUMANIZED_COLUMNS = {
:Column_name => “New Name”,
:OtherColumn_name => “New Name 2″
}
def self.human_attribute_name(attribute)
HUMANIZED_COLUMNS[attribute.to_sym] || super
end
Posted 3 months ago at 2:01 pm. Add a comment
Installing ESXi 4.0 as the base metal Hypervisor OS. I tried to use converter to create a VM image of various redhat machines. Problems encountered with Converter:
1. Failed: File is larger than the maximum size supported by datastore
Solution: Split up the files to different datastores, or use Thin instead of Flat so it only takes the space used and not the full amount of allocated space for a partition.
2. Failed: MethodFault.summary
Solution: Changed number of processors from 8 to 4, because my VM server only has one quad core processor.
3. Failed: Unable to obtain the IP address of the helper virtual machine.
Solution: Assign a DHCP or static IP to the “Helper VM Network” at the bottom of the configuration. Edit this value.
4. Failed: An error occurred during the conversion. Error: Failed to clone the volume mounted on ‘/boot’
Solution: Add the DNS suffix to the Helper VM Network. Also, I needed to add the IP address to the hosts.allow in my Redhat Linux of the Helper VM, that I assigned in #3 from above.
UPDATE
5. Error: Failed to clone the volume mounted on ‘/’
Solution: again this was a problem with the fact that the machine to duplicate had the security settings setup to block the helper VM. I had to add the entry into the hosts.allow. But I can see other potential problems with the firewall (i.e. iptables) where certain ports must be open. Here is a link to vmware showing which ports to open.
Posted 5 months, 3 weeks ago at 11:47 am. 3 comments
I needed to do capture an existing physical machine to virtual (P2V) of an old linux box that was getting on in age. I thought that VMWare would be the clear solution to capture this through the VMWare Converter tool. Unfortunately, Converter doesn’t directly support capturing a linux machine.
The solution I found was to create a virtual VMWare ESXi OS install on my VMWare Workstation. This was not very straight forward as ESXi 4.0 is only for 64-bit systems. I found that ESXi 3.5 was 32-bit and decided to give it a try. For some reason the ESXi install would not proceed correctly choosing to throw PANIC errors. Later I realized that it was due to the fact that I did not allocate enough RAM to this machine. The default value was 256MB and the solution was to up that value to over 1GB of RAM. Then, I would get stuck during the installation in the first 10% or so and would just not move on. I found the solution through a youtube video which showed that I need to select an Intel VT option for the processor settings. This allowed me to continue with the installation.
Note: On a Dell Quad-core server I had to enable the hardware Intel VT instructions. Otherwise the installation of ESX may hang.
More to come…
ESXi booted up with some lvm error, but for some reason, I could not get an IP address. Edited my myvmName.vmx file with note pad and added the blow lines.
Check out this video here
monitor_control.restrict_backdoor = “TRUE”
monitor_control.vt32 = “TRUE”
SMBIOS.reflectHost = “TRUE”
ethernet0.VirtualDev = “e1000″
After that I was able to get a DHCP address! In my production environment we use static ip addresses, so for now I had to switch it to use NAT.
Now I can use Converter to capture a base virtual image of my remote physical machine. Make sure to give root remote access rights and use the IP address of your server as the source. For the destination, in a p2V situation using linux we can only use ESXi and so we need to capture to a VMWare Infrastructure virtual machine. The IP address is that of your virtual ESX installation and don’t forget to set a root password, otherwise it will not work.
After the image was transferred, I used converter again to bring it over from the VMWare Infrastructure virtual machine to the VMware Workstation or other VMware virtual machine. This allows me to open the vm from workstation instead of from ESX. At some point I may deploy to an ESX installation but for now I am content to access my linux box from workstation.
Posted 6 months ago at 8:13 pm. Add a comment
Was having a big issue with selinux limiting access to my old legacy cgi-scripts in apache. Ended up removing selinux restrictions from this particular script file.
chcon -h -t httpd_unconfined_script_exec_t slides_by_pcd /usr/local/apache/cgi-bin/my_script
Some of the symptoms from apache access_log included :
1. Can’t open perl script
2. Premature end of script headers
Posted 6 months, 1 week ago at 2:17 am. Add a comment
Typing \n printed out \n, typing <br/> printed <br/> in the text area.
Until I found this:
Posted 7 months, 4 weeks ago at 9:59 am. Add a comment
I have been working with XML parsing recently using the StAX (why use StAX?). However, I ran into an issue with the & (ampersand) since it is a reserved character in xml and needs to be escaped. But when the & was escaped the parser would fire multiple events, 1) text before the &, 2) the &, 3) text after the &. This was a bit hard to integrate with, so instead of putting a & in the xml file I just replaced it with a different character and did a search and replace once the data was parsed. This strategy saved me quite a bit of work.
Posted 8 months ago at 3:36 pm. Add a comment
While you can use twitter to follow movie stars, I think there’s a more practical use for normal information hounds.
Here is my analogy:
A normal competent, capable, say software manager, usually seems a few steps ahead of his subordinates with technology, company news, and issues. Usually you talk to your manager to find out what is going on and to get your task assignments. Where does he get this information? I think he has subordinates sending him feeds of information in the form of status reports, quick conversations, etc. That’s why he always seems a few steps ahead of you.
Twitter is exactly the same thing. If you follow the RIGHT people, you can get the same feeds of information for tech, news, issues, event proceedings, basically what ever you want to know about. The emphasis is on the RIGHT people. Don’t just follow anyone, be discriminating or you’ll just have a ton of noise.
Don’t for get to follow @jamescway
This is just one perspective on why twitter is good. I’m sure there are others. What do you think?
Posted 9 months ago at 10:38 am. Add a comment
As shown here
Just to sumarize, there is a netbeans.conf file that needs to be modified. You can Ctrl-Click on the netbean app file to access the directory behind it from Finder. Also, I just set it to the current JDK as follows:
netbeans_jdkhome=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
so that it always uses the most recent JDK.
Posted 9 months, 1 week ago at 12:50 pm. Add a comment