<?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>mac address &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/mac-address/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Tue, 24 Sep 2019 07:08:28 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Ubuntu 18.04 Change Mac Address on QEMU via Netplan</title>
		<link>https://richliu.com/2019/09/09/4146/ubuntu18-04changemacaddressonqemuvianetplan/</link>
					<comments>https://richliu.com/2019/09/09/4146/ubuntu18-04changemacaddressonqemuvianetplan/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Mon, 09 Sep 2019 15:40:32 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[mac address]]></category>
		<category><![CDATA[netplan]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=4146</guid>

					<description><![CDATA[<p>This is a quick note about how to modify mac address fo [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2019/09/09/4146/ubuntu18-04changemacaddressonqemuvianetplan/">Ubuntu 18.04 Change Mac Address on QEMU via Netplan</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is a quick note about how to modify mac address for qemu image with ubuntu 18.04 cloud image. <br /><br />but I have not found a working way only change mac address in system </p>



<span id="more-4146"></span>



<h4 class="wp-block-heading">Add mac parameter to qemu command</h4>



<p>in qemu command line, add mac= parameter to netdev option , ex:</p>



<pre class="wp-block-preformatted">-device virtio-net-device,netdev=net2,<strong>mac=52:54:00:56:12:34</strong> \</pre>



<h4 class="wp-block-heading">Modify netplan</h4>



<p>edit file /etc/netplan/50-cloud-init.yaml, and add section match, ex</p>



<pre class="wp-block-preformatted">network:
     version: 2
     ethernets:
         eth0:
             dhcp4: true
<strong>             match:
                 macaddress: 52:54:00:56:12:34</strong>
             set-name: eth0</pre>



<p>now, you can shutdown qemu system and restart . <br /><br />* Notice: if used ubuntu cloud image, please assign mac address before init it. <br />suppose that cloud image might save mac address some where . </p>
<p>The post <a rel="nofollow" href="https://richliu.com/2019/09/09/4146/ubuntu18-04changemacaddressonqemuvianetplan/">Ubuntu 18.04 Change Mac Address on QEMU via Netplan</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2019/09/09/4146/ubuntu18-04changemacaddressonqemuvianetplan/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
