<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fly together Forever 比翼恒飞 &#187; windows</title>
	<atom:link href="http://www.liucougar.net/blog/archives/category/windows/feed" rel="self" type="application/rss+xml" />
	<link>http://www.liucougar.net/blog</link>
	<description></description>
	<lastBuildDate>Fri, 19 Feb 2010 21:27:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Convert VirtualBox image (vdi) to VMWare (vmdk)</title>
		<link>http://www.liucougar.net/blog/archives/118</link>
		<comments>http://www.liucougar.net/blog/archives/118#comments</comments>
		<pubDate>Fri, 19 Dec 2008 07:05:48 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/?p=118</guid>
		<description><![CDATA[Due to better 64bit support, we decided to use VMWare instead of VirtualBox. To prevent of installing a gentoo to a VMWare image, I decided to convert the already working virtualbox image (a vdi file) to VMWare (vmdk).

Qemu-img is the command line tool for this task, using the following line, I can get a vmdk:


qemu-img [...]]]></description>
			<content:encoded><![CDATA[Due to better 64bit support, we decided to use VMWare instead of VirtualBox. To prevent of installing a gentoo to a VMWare image, I decided to convert the already working virtualbox image (a vdi file) to VMWare (vmdk).

Qemu-img is the command line tool for this task, using the following line, I can get a vmdk:


<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">qemu-img convert <span style="color: #660033;">-O</span> vmdk gentoo32.vdi gentoo32.vmdk</pre></div></div>



However, this vmdk is not recognized by VMWare 6.5. I guess it has something to do with the fact that the original vdi file is using dynamic sizing (the file contains a 5G partition, and it only has 1.9G data, so the real size for the vdi file is about 2.1G): the converted vmdk is 1.9G, and VMWare reports that it has 2.1G total size.When booting with this image, VMWare fails to read any data from the virtual disk.

After tried another time with the above approach, which also failed, it seems I have to find another way.

Luckily, VirtualBox comes with a command line tool called vboxmanage, which can do all sorts of operations on vdi files, including converting vdi to raw disk image, so let&#8217;s try that:


<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">vboxmanage internalcommands converttoraw gentoo32.vdi gentoo32.raw</pre></div></div>



The above command will generate a 5G gentoo32.raw file. Then use qemu-img:


<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">qemu-img convert <span style="color: #660033;">-O</span> vmdk gentoo32.raw gentoo32.vmdk</pre></div></div>



To convert the raw file to vmdk. The resulting vmdk file is also 1.9G, but this time VMWare recognize it just fine (reporting its real size as 5G).

After changing the root device from <code>/dev/sda1</code> to <code>/dev/hda1</code>, this image can boot just fine in VMWare, with one exception: the network interface eth0 can not be started. More inspecting reveals that &#8220;udev renames network interface eth0 to eth1&#8243;. This is caused by the fact that one of the default gentoo udev rule (<code>/etc/udev/rules.d/75-persistent-net-generator.rules</code>) will write another rule file which saves the MAC address for each NIC, and sure enough, the MAC address for the NIC in VirtualBox is different from that of VMWare. However, this is very easy to fix, once you know where the generated udev rule is:

Open <code>/etc/udev/rules.d/70-persistent-net.rules</code> and remove all rules in this file, save and reboot, eth0 won&#8217;t be renamed to eth1 any more.]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/118/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>TortoiseSVN and Public Key Authentication (svn+ssh)</title>
		<link>http://www.liucougar.net/blog/archives/50</link>
		<comments>http://www.liucougar.net/blog/archives/50#comments</comments>
		<pubDate>Fri, 29 Sep 2006 23:45:33 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[dojo]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/50</guid>
		<description><![CDATA[
In order to support IE, which does not run reliably under linux with  
ie4linux, I have to stick with M$ windows when working on dojo. However, the experience with windows svn client was not pleasant: as svn+ssh protocol is used to access dojo repository (among other svn repositories I use), I had to input [...]]]></description>
			<content:encoded><![CDATA[
<p>In order to support IE, which does not run reliably under linux with  
<a href="http://www.tatanka.com.br/ies4linux/page/Main_Page">ie4linux</a>, I have to stick with M$ windows when working on dojo. However, the experience with windows svn client was not pleasant: as svn+ssh protocol is used to access dojo repository (among other svn repositories I use), I had to input my password each and every time when I update/commit to it. What&#8217;s more annoying, when doing some operation, such as svn log, I am asked three times for password (or maybe twice?).</p>
<p>I had hoped the svn client I use, TortoiseSVN, could support Public Key Authentication for svn+ssh, just as what the svn linux client can do.</p>
<p>Today, I had a look at the documentation of TortoiseSVN and found out that it IS INDEED possible to configure TortoiseSVN to use Public Key Authentication. It was just my assumption, it has not implemented this support, prevented me from digging into it.</p>
<p>The key point is to understand this: TortoiseSVN makes use of  
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">putty</a> behind the scenes (more specifically, it uses a derivate work of plink, a windows ssh command client). You can tell putty to login ssh with Public Key Authentication: just go to Connection -&gt; SSH -&gt; Auth, select the a private key file for the authentication. Under Connection -&gt; Data, you may also fill in Auto-login username, so that you don&#8217;t need to specify the username every time you login.</p>
<p>If you do not already have a pair of your own private/public keys, then you may want to check out  
<a href="http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html#pubkey-puttygen">PuTTYgen</a> and  
<a href="http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter8.html#pubkey">Using public keys for SSH authentication</a>.</p>
<p>If you come from linux world, like me, and already have your own private/public keys, just import it with PuTTYgen and save the private key to a format putty recognize, then select this saved private key in the place mentioned before. You have to save the session under a name, such as dojo, in order to make it accessible to other ssh dependent applications, such as TortoiseSVN. </p>
<p>Don&#8217;t forget to add your public key to file ~/.ssh/authorized_keys in your subversion server.</p>
<p>After that, you should be able to ssh to your remote server without input your password. Next step is to tell TortoiseSVN to make use this Public Key Authentication. You don&#8217;t need to explicitly teach TortoiseSVN to use putty for ssh connection. All you need to do is in the checkout dialog of TortoiseSVN, instead of the normal host of the svn repository server, you just specify the session name (in this case, it is dojo). So instead of checking out dojo from this address:</p>
<pre>svn+ssh://liucougar@svn.dojotoolkit.org/var/src/dojo/trunk</pre>
<p>just use this:</p>
<pre>svn+ssh://dojo/var/src/dojo/trunk</pre>
<p>That&#8217;s all. TortoiseSVN can make use all the information you saved in that session for ssh connection, and you don&#8217;t need to type in password any more. That&#8217;s neat.</p>
<p>(As how TortoiseSVN knows about session saved in putty, here is my guess: putty stores all information of sessions in windows register, so that&#8217;s can be accessed by TortoiseSVN.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/50/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Windows crashes when browsing avi files</title>
		<link>http://www.liucougar.net/blog/archives/30</link>
		<comments>http://www.liucougar.net/blog/archives/30#comments</comments>
		<pubDate>Sun, 04 Jun 2006 16:12:34 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://liucougar.scim-im.org/blog/archives/30</guid>
		<description><![CDATA[
One of my friends asked me to help install movie players in his computer so he can watch movies. The computer is his company&#8217;s, and some limitation is imposed. The most annoying one is that the property of local network connection is disabled! I never thought this is possible under windows XP. Anyway, as I [...]]]></description>
			<content:encoded><![CDATA[
<p>One of my friends asked me to help install movie players in his computer so he can watch movies. The computer is his company&#8217;s, and some limitation is imposed. The most annoying one is that the property of local network connection is disabled! I never thought this is possible under windows XP. Anyway, as I need to copy some files over, so I have to setup the connection between my laptop and his. The workaround is to set my IP address to something in the same C sub net as his computer, such as 169.254.220.235.</p><span id="more-30"></span>
<p>The next issue is I can not browse his file shares. When I access \\169.254.220.234 (his laptop&#8217;s IP), I get &quot;can not access error&quot;. After turn off his windows firewall, I can connect now, but it keeps asking a username/password to login. However, the username he normally uses can not login. I am forced to create a new one in his computer and login with it.</p>
<p>Now, finally, the two computers are connected. Next is to install some codecs, real player and upgrade his media player. All went well.</p>
<p>After that, I tested some avi files to see whether they can be played, but no success: real player/media player just crashes, and in fact, even exploeror will crash if I browse that dir containing the avi files.</p>
<p>I tried my own latptop, to my surprise, it crashes as well! (I normally use linux, so did not notice this before).</p>
<p>Google tells me that,    
<a href="http://www.moviecodec.com/topics/3379p1.html">codes conflict</a> may be the cause. I uninstalled all codes packages, and install the    
<a href="http://www.softpedia.com/get/Multimedia/Video/Codec-Packs-Video-Codecs/Codec-Pack-All-in-one.shtml">codec pack all in 1</a>, it backs to normal, finally.</p>
<p>At last, I have to revert the firewall changes and remove the user I created in his laptop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/30/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
