<?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>不敢流泪 &#187; Windows</title>
	<atom:link href="http://www.boluor.com/category/os/windows/feed" rel="self" type="application/rss+xml" />
	<link>http://www.boluor.com</link>
	<description></description>
	<lastBuildDate>Fri, 07 Oct 2011 07:28:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>[virtualbox]windows宿主机访问linux客户机</title>
		<link>http://www.boluor.com/virtualbox-windows-host-connect-linux-guest.html</link>
		<comments>http://www.boluor.com/virtualbox-windows-host-connect-linux-guest.html#comments</comments>
		<pubDate>Wed, 05 May 2010 15:40:57 +0000</pubDate>
		<dc:creator>boluor</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.boluor.com/?p=630</guid>
		<description><![CDATA[<p>　　今天felix建议，可以虚拟机里跑个ubuntu server，就没必要跑ubuntu下开发，再回到windows下写论文了。之前有考虑过，但是1G的内存，跑了个win7还开了Aero，担心内存不够。回来把Aero给关了，装了试试，有点卡，不过将就着能用，早该加内存了。</p>
<p>　　客户机跑ubuntu 10.04 server，NAT连接的网络。NAT engine将宿主机当作了路由器，所有流出和流进虚拟机的数据包都由这个engine转发，但是这样，客户机隐藏在幕后，包括宿主机在内的其他主机都访问不到客户机了。VirtualBox的帮助文件中提到，如果想在客户机上跑一些服务，就需要用NAT端口映射。使用V&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>　　今天felix建议，可以虚拟机里跑个ubuntu server，就没必要跑ubuntu下开发，再回到windows下写论文了。之前有考虑过，但是1G的内存，跑了个win7还开了Aero，担心内存不够。回来把Aero给关了，装了试试，有点卡，不过将就着能用，早该加内存了。</p>
<p>　　客户机跑ubuntu 10.04 server，NAT连接的网络。NAT engine将宿主机当作了路由器，所有流出和流进虚拟机的数据包都由这个engine转发，但是这样，客户机隐藏在幕后，包括宿主机在内的其他主机都访问不到客户机了。VirtualBox的帮助文件中提到，如果想在客户机上跑一些服务，就需要用NAT端口映射。使用VBoxManage.exe可以满足需求。如果要想开启ssh server，好使宿主机可以用putty或者SecureCRT等等连上去开发，可以用下面的命令(cmd下并切换到virtualbox的安装目录即VBoxManage所在的目录下)：</p>
<p>(1)　　VBoxManage setextradata [GuestHostName] “VBoxInternal/Devices/[vcard]/0/LUN#0/Config/[servicename]/Protocol” TCP<br />
(2)　　VBoxManage setextradata [GuestHostName] “VBoxInternal/Devices/[vcard]/0/LUN#0/Config/[servicename]/GuestPort” 22<br />
(3)　　VBoxManage setextradata [GuestHostName] “VBoxInternal/Devices/[vcard]/0/LUN#0/Config/[servicename]/HostPort” [specifiededport]</p>
<p>其中：<br />
[GuestHostName]为客户机的名称，比如ubuntuserver，如果有空格的话用”"括起来<br />
[vcard]需要根据客户机的网卡芯片改变。PCNet -> pcnet；Intel PRO/1000 -> e1000；<br />
[servicename]就是为这个转发设置起个名字，随便就可以~别跟其他转发设置起冲突<br />
[specifiededport]是将客户机22端口映射到主机的哪个端口，这个端口号最好>1024.</p>
<p>注意设置的时候关闭虚拟机或者是保存状态.</p>
<p>如果要开启其他服务的话，就按照这种格式。比如换成http，mysql时，Protocol不变，只需设置GuestPort为对应的端口号.(ssh -> 22,mysql -> 3306,etc)</p>
<p>在windows宿主机中打开localhost，客户机的Http服务器就会响应了。在SecureCRT用ssh连接localhost时，别忘了将端口号设置为你定义的端口号^/^</p>
<p>不过每次系统启动的时候就需要重新设置下，可以扔到一个bat文件中，开机启动或者virtualbox启动时执行。</p>
<p>由于安装的是ubuntu server ,VBoxGuestAdditions安装不上，从宿主机到客户机传送文件可用rz/sz。</p>
<p>用ubuntu server硬盘很吃紧，考虑用puppy linux with lamp。如果跑ubuntu server的话，分配64M内存就够用了。</p>
<p>有个问题没解决，宿主机怎么ping通客户机？有没有种方式将ICMP包也转发到客户机上？虽然这样并没有实际的用处。</p>
<p>另可参考felix的解决方案：</p>
<p><a href="http://www.felix021.com/blog/read.php?1873" class="broken_link">用VirtualBox在Windows上搭建一个Ubuntu工作站</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.boluor.com/virtualbox-windows-host-connect-linux-guest.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

