<?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>uefi &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/uefi/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Sat, 30 Sep 2023 04:52:31 +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>Gentoo ARM64 UEFI Install Guide</title>
		<link>https://richliu.com/2020/07/09/4295/gentoo-arm64-uefi-install-guide/</link>
					<comments>https://richliu.com/2020/07/09/4295/gentoo-arm64-uefi-install-guide/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 09 Jul 2020 04:43:38 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[uefi]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=4295</guid>

					<description><![CDATA[<p>This is not a detail guide to describe how to full inst [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2020/07/09/4295/gentoo-arm64-uefi-install-guide/">Gentoo ARM64 UEFI Install Guide</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is not a detail guide to describe how to full install system, just figure out some important point. Even not for Gentoo newbie. <br /><br />Most important handbook is<a rel="noreferrer noopener" aria-label=" Gentoo AMD64 installation guide. (opens in a new tab)" href="https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#Manual_network_configuration" target="_blank"> Gentoo AMD64 installation guide.</a> <br />There is some different between ARM64 and AMD64<br /></p>



<p>2021/08/31 Updated : No more need Ubuntu ISO image, ARM64 EFI minimal ISO can be download from official website: https://www.gentoo.org/downloads/</p>



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



<p>Some ARM64 platform support UEFI bios system, like Ampere Computing Altea or Marvell ThunderX. <br />Recently Linux like CentOS or Ubuntu can support both system, but not for Gentoo ARM64 project, <br />if you want to install Gentoo on ARM64 bare system, it needs some trick skill. </p>



<h3 class="wp-block-heading">Install System</h3>



<p>Gentoo ARM64 install, it needs to relay on other OS&#8217;s installation software. <br />I were using Ubuntu/Debain net-inst to install system, below is my nvme driver partition table.<br /><br />/dev/nvme0n1p1  (bootloader/efi)    500MB    for EFI only <br />/dev/nvme0n1p2  /                                800G       for Gentoo system <br />/dev/nvme0n1p3  /                                 90G        for Ubuntu system <br /><br />Suggest to keep a ubuntu system for booting, it can be rescue system when fail to boot Gentoo system. <br /><br />After Ubuntu/Debian installed system, it can go back to installation menu, there is a execute shell on menu, run it. </p>



<h3 class="wp-block-heading">Decompress Gentoo Stage3 File. </h3>



<p>Most challenge thing is, Ubuntu/Debian installation rootfs, there is no unbzip function, that&#8217;s means it needs to use installed disk and used the Ubuntu system&#8217;s bzip2. below is my command to untar it. </p>



<pre class="wp-block-code"><code># use gentoo iso cdrom boot
# mount /dev/nvme0n1p3 /mnt/gentoo
# cd /mnt/gentoo
# wget https://bouncer.gentoo.org/fetch/root/all/releases/arm64/autobuilds/20210829T233646Z/stage3-arm64-systemd-20210829T233646Z.tar.xz
# tar xvf stage3-arm64-systemd-20210829T233646Z.tar.xz
# mount --bind /proc proc
# mount --bind /dev dev
# mount --bind /sys sys
# mount --bind /sys/firmware/efi/efivars/ ./sys/firmware/efi/efivars/
# cp /etc/resolv.conf /mnt/gentoo/etc/
# cd ..
# chroot gentoo 

&gt;&gt;&gt;&gt; chroot to ubuntu 
# mkdir  -p /mnt/gentoo
# mount /dev/nvme0n1p2 /mnt/gentoo 
# cd /mnt/gentoo 
# wget http://distfiles.gentoo.org/experimental/arm64/stage3-arm64-systemd-20190925.tar.bz2
# tar xvzf stage3-arm64-systemd-20190925.tar.bz2
# mount --bind /proc proc
# mount --bind /dev dev
# mount --bind /sys sys
# cp /etc/resolv.conf /mnt/gentoo/etc/
# cd ..
# chroot gentoo</code></pre>



<p>Yaa.. We got Gentoo file system . </p>



<h3 class="wp-block-heading">Gentoo Kernel</h3>



<p>Suppose that reader know how to configure hostname , fstab, emerge &#8211;sync &#8230; etc.<br /><br />Next step is to install Gentoo kernel, I will show how to use genkernel to generate workable kernel for ARM64 system <br /><br />*Note: Some install command might need to unmask or add accept keyword, will ignore that, please try add &#8220;&#8211;autounmask-write&#8221; and run command &#8220;etc-update&#8221; to update it.</p>



<pre class="wp-block-code"><code># mkdir -p /boot/efi
# mount /dev/nvme0n1p1 /boot/efi
# echo 'GRUB_PLATFORMS="efi-64"' &gt;&gt; /etc/portage/make.conf
# emerge --ask sys-boot/grub:2
# emerge efibootmgr
# grub-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=Gentoo</code></pre>



<p>If have problem on the stage, and it shows cannot find /dev/md0, it needs to emerge mdadm package.</p>



<p>Compile Linux Kernel</p>



<pre class="wp-block-code"><code># emerge gentoo-sources 
# emerge genkernel
# genkernel --menuconfig all</code></pre>



<p>genkernel will let you choice kernel configure before compile it. Please enable those options, Gentoo kernel didn&#8217;t enable ARM&#8217;s serial port by default. </p>



<pre class="wp-block-code"><code>Device Drivers  ---&gt;
	Character devices  ---&gt;
		Serial drivers  ---&gt;
			 &lt;*&gt; ARM AMBA PL010 serial port support
			&#91;*]   Support for console on AMBA serial port
			 &lt;*&gt; ARM AMBA PL011 serial port support
			&#91;*]   Support for console on AMBA serial port
                        &#91;*] Early console using ARM semihosting
</code></pre>



<p>Save it and quit. <br /><br />Next step is edit /etc/default/grub and add &#8220;console==ttyAMA0&#8221; to /etc/default/grub</p>



<pre class="wp-block-preformatted">GRUB_CMDLINE_LINUX_DEFAULT="console=ttyAMA0"</pre>



<p>Update grub.conf </p>



<p> grub-mkconfig -o /boot/grub/grub.cfg </p>



<h3 class="wp-block-heading"> Check UEFI Boot Priority </h3>



<p>Run efibootmgr and get boot priority </p>



<pre class="wp-block-code"><code># efibootmgr
BootCurrent: 0003
Timeout: 5 seconds
BootOrder: 0003,0001,0002,0004
Boot0001* ubuntu
Boot0002* UEFI: PXE IP4 Intel(R) Ethernet Server Adapter I210-T1
Boot0003* Gentoo
Boot0004* UEFI: Built-in EFI Shell</code></pre>



<p>It can see current boot and boot order here , if Gentoo is not first priority, it can use option &#8220;-o&#8221; to update it. </p>



<p></p>



<h3 class="wp-block-heading">Other</h3>



<p>if you choice systemd as your service manager, after install openssh, please run command below to activate it and as default service. </p>



<pre class="wp-block-code"><code># systemctl enable sshd.service
# systemctl start sshd.service
# systemctl status sshd.service</code></pre>



<h3 class="wp-block-heading">Conclusion</h3>



<p>I have write down my note here, good luck to you if you have the same question then get this webpage. </p>
<p>The post <a rel="nofollow" href="https://richliu.com/2020/07/09/4295/gentoo-arm64-uefi-install-guide/">Gentoo ARM64 UEFI Install Guide</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2020/07/09/4295/gentoo-arm64-uefi-install-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>QEMU Run x86_64/AMD64 VM on ARM64/AARCH64</title>
		<link>https://richliu.com/2019/08/02/4045/qemu-run-x86_64-on-arm64-server-command/</link>
					<comments>https://richliu.com/2019/08/02/4045/qemu-run-x86_64-on-arm64-server-command/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 02 Aug 2019 03:33:23 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[18.04]]></category>
		<category><![CDATA[aarch64]]></category>
		<category><![CDATA[amd64]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[ovfm]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[uefi]]></category>
		<category><![CDATA[x86_64]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=4045</guid>

					<description><![CDATA[<p>This is a work note for run x86_64/AM64 on ARM64/AARCH6 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2019/08/02/4045/qemu-run-x86_64-on-arm64-server-command/">QEMU Run x86_64/AMD64 VM on ARM64/AARCH64</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 work note for run x86_64/AM64 on ARM64/AARCH64 server .<br />Because they are different archeticture, so, run x86_64 on ARM server would be very slow. <br /><br />and some functions might be different when run on different platform </p>



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



<h2 class="wp-block-heading">Ubuntu</h2>



<p>It can refer to those three articles to create a new cloud image from Ubuntu server image, remember to change ARM64 image to x86_64 image . <br /><br /><a href="https://richliu.com/2018/08/25/2318/change-ubuntu-cloud-image-size">Change Ubuntu Cloud Image Size</a> (if you choice ubuntu 16.04 as your image)<br /><a href="https://richliu.com/2017/08/31/2165/change-ubuntu-cloud-image-password">Change Ubuntu Cloud Image Password</a><br /><a href="https://richliu.com/2017/10/17/2187/ubuntu-cloud-image-taiwan-mirror-site">Ubuntu Cloud Image Taiwan Mirror Site</a><br /></p>



<p>Install Qemu and setup bridge devices </p>



<pre class="wp-block-code"><code>apt install -y ovmf qemu bridge-utils
mkdir -p /etc/qemu
echo "allow br0" &gt; /etc/qemu/bridge.conf
echo "allow virbr0" &gt;&gt; /etc/qemu/bridge.conf</code></pre>



<p>Write this script to a file and run it. </p>



<pre class="wp-block-code"><code>SERVERFILE=xenial-server-cloudimg-amd64-uefi1.img
VERSION=`uname -r`

sudo qemu-system-x86_64 -name vm1 \
        -machine pc-i440fx-xenial,usb=off \
        -cpu qemu64 -m 8192 \
        -smp 12,sockets=1,cores=12,threads=1 \
        -nographic -nodefaults \
        -bios /usr/share/ovmf/OVMF.fd \
        -virtfs local,path=/home/work,mount_tag=host0,security_model=passthrough,id=host0 \
        -drive file=$SERVERFILE  \
        -net nic,macaddr=$macaddr \
        -net tap,ifname=tap0 \
        -serial telnet::9001,server,nowait &gt; guest1_log.txt 2&gt;&amp;1 &amp;

sleep 5

brctl addif br0 tap0</code></pre>



<p>it can use command <br />qemu-system-x86_64 &#8211;machine help<br />and<br /> qemu-system-x86_64 &#8211;cpu help<br />to get all machine and cpu options. <br /><br />it can change cpu and machine type here. <br /><br />network would be bridge on tap0<br /><br />below is good option to share folder between host and VM, below command will share /home/work with vm. </p>



<pre class="wp-block-code"><code>option 
--virtfs local,path=/home/work,mount_tag=host0,security_model=passthrough,id=host0 </code></pre>



<p>it can put this line to /etc/fstab to mount host&#8217;s folder to somewhere, in this case, just put the same directory like host does. <br /></p>



<pre class="wp-block-code"><code>host0   /home/work   9p      trans=virtio,version=9p2000.L,user,umask=000   0 0</code></pre>



<h2 class="wp-block-heading">CentOS</h2>



<p>CentOS document was written on 2021, but Ubuntu document on 2019, there is some difference between it. but that&#8217;s ok, I believe both ways are works. </p>



<h3 class="wp-block-heading">Compile QEMU</h3>



<p>CentOS default application doesn&#8217;t support run x86_64 code on ARM64 server, it needs to compile manually. <br /><br />Please download qemu and compile it. </p>



<pre class="wp-block-code"><code># Install CentOS Packages
yum config-manager --set-enabled powertools
yum install -y xorg-x11-xauth python3 ninja-build
yum install -y glib2-devel libmount-devel
yum install -y git glib2-devel libfdt-devel pixman-devel zlib-devel

# Download QEMU Source Code
wget https://download.qemu.org/qemu-5.2.0.tar.xz
# Decompress it
tar xvf qemu-5.2.0.tar.xz
# 
cd qemu-5.2.0
./configure --target-list="x86_64-softmmu aarch64-softmmu aarch64-linux-user x86_64-linux-user"
make -j `nproc`
make install 
</code></pre>



<p>Then, qemu will be installed on /usr/local/bin</p>



<h3 class="wp-block-heading">Download UEFI Image</h3>



<p>It needs UEFI Image for x86_64 image boot up. It needs <a rel="noreferrer noopener" href="https://github.com/tianocore/tianocore.github.io/wiki/OVMF" data-type="URL" data-id="https://github.com/tianocore/tianocore.github.io/wiki/OVMF" target="_blank">OVMF&#8217;s tianocore</a> (Open Source UEFI BIOS) to boot up. And we  can download <a href="https://www.kraxel.org" data-type="URL" data-id="https://www.kraxel.org" target="_blank" rel="noreferrer noopener">kraxel </a>as prebuild images. </p>



<pre class="wp-block-code"><code># Install Kraxel into CentOS repos
cd /etc/yum.repos.d/
wget https://www.kraxel.org/repos/firmware.repo
yum install edk2.git-aarch64 edk2.git-ovmf-x64
cd &lt;your vm directory&gt;
cp /usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd .
cp /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd .

</code></pre>



<h3 class="wp-block-heading">Prepare Bridge Devices</h3>



<p>It needs bridge devices to connect to internet, default qemu bridge device name is virbr0 , due to CentOS doesn&#8217;t support brctl, follow this document(<a rel="noreferrer noopener" href="https://www.tecmint.com/create-network-bridge-in-rhel-centos-8/" data-type="URL" data-id="https://www.tecmint.com/create-network-bridge-in-rhel-centos-8/" target="_blank">3 Ways to Create a Network Bridge in RHEL/CentOS 8</a>) to create a CentOS bridge devices. Below is my experiment script to create bridge device, this setting will keep in system, reboot will not be reset. </p>



<pre class="wp-block-code"><code>nmcli conn add type bridge con-name virbr0 ifname virbr0

killall dhclient
ip addr flush enP7p2s0
nmcli conn modify virbr0 ipv4.addresses '192.168.3.191/16'
nmcli conn modify br0 ipv4.gateway '192.168.1.1'
nmcli conn modify br0 ipv4.dns '8.8.8.8'
nmcli conn modify br0 ipv4.method manual
nmcli conn add type ethernet slave-type bridge con-name bridge-br0 ifname enP7p2s0 master virbr0
nmcli conn up virbr0
nmcli conn up bridge-br0

nmcli conn show  --active

# Allow QEMU to access virbr0
mkdir -p /etc/qemu
echo "allow virbr0" &gt;&gt; /etc/qemu/bridge.conf

</code></pre>



<h2 class="wp-block-heading">Run Qemu</h2>



<p>It can refer above to prepare cloud image, I prefer to use ubuntu cloud image, but have not try CentOS image. </p>



<p>Remember Ubuntu 18.04 image won&#8217;t auto increase image size, please follow this <a href="https://richliu.com/2018/08/25/2318/change-ubuntu-cloud-image-size/" data-type="post" data-id="2318">Change Ubuntu Cloud Image Size</a> to modify image size<br /></p>



<pre class="wp-block-code"><code>
qemu-system-x86_64 -m 8192 -smp 16 -nographic \
        -drive if=pflash,format=raw,unit=0,file=OVMF_CODE-pure-efi.fd,readonly=on \
        -drive if=pflash,format=raw,unit=1,file=OVMF_VARS-pure-efi.fd \

        -hdc bionic-server-cloudimg-amd64.img \
        -netdev bridge,br=virbr0,id=net0 \
        -device virtio-net,netdev=net0,mac=00:11:22:33:44:55 \
        -serial telnet::9001,server,nowait &gt; vmlog.txt 2&gt;&gt; vmlog.txt &amp;
</code></pre>



<h3 class="wp-block-heading">x86_64 application</h3>



<p>Sometimes we don&#8217;t need to run whole VM to run some application just for x86_64, it can run user mode application directly. I am a lazy guy, so just reuse cloud image as x86_64 Linux library. </p>



<pre class="wp-block-code"><code>mkdir -p /home/amd64
qemu-img convert  bionic-server-cloudimg-amd64.img bionic-server-cloudimg-amd64.raw
losetup /dev/loop0 bionic-server-cloudimg-amd64.raw
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /home/amd64
</code></pre>



<p>Umount Image</p>



<pre class="wp-block-code"><code>umount /home/amd64
losetup -d /dev/loop0</code></pre>



<p>Run x86_64 only application </p>



<pre class="wp-block-code"><code>qemu-x86_64 -L /home/amd64/ bootutil64e
qemu-x86_64 -L /home/amd64/ nvmupdate64e -l</code></pre>



<h2 class="wp-block-heading">Unsolved Problem</h2>



<h3 class="wp-block-heading">Cannot find way to update INTEL NIC&#8217;s NVM</h3>



<p>Tried vfio and application mode, vfio cannot pass iommu to host, it will fail. <br /><br />User space application will cause mmap fail. <br /><br />If you know how to update Intel NIC&#8217;s NVM, welcome to leave a message for me. </p>



<h3 class="wp-block-heading">QEMU &#8211;static problem</h3>



<p>Add &#8211;static parameter will cause some problem, cannot solve it right now. </p>



<p><br />./configure &#8211;target-list=&#8221;x86_64-softmmu aarch64-softmmu aarch64-linux-user x86_64-linux-user&#8221; &#8211;static<br />===</p>



<p>ERROR: sizeof(size_t) doesn&#8217;t match GLIB_SIZEOF_SIZE_T.</p>



<p>&nbsp;&nbsp;&nbsp; You probably need to set PKG_CONFIG_LIBDIR</p>



<p>&nbsp;&nbsp;&nbsp; to point to the right pkg-config files for your&nbsp;&nbsp;&nbsp; build target</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2019/08/02/4045/qemu-run-x86_64-on-arm64-server-command/">QEMU Run x86_64/AMD64 VM on ARM64/AARCH64</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/08/02/4045/qemu-run-x86_64-on-arm64-server-command/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>No valid host was found. There are not enough hosts available</title>
		<link>https://richliu.com/2017/08/03/2157/no-valid-host-was-found-there-are-not-enough-hosts-available/</link>
					<comments>https://richliu.com/2017/08/03/2157/no-valid-host-was-found-there-are-not-enough-hosts-available/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 03 Aug 2017 00:33:55 +0000</pubDate>
				<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[aarch64]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[libvirt]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[uefi]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=2157</guid>

					<description><![CDATA[<p>OpenStack Horization error message no valid host was fo [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2017/08/03/2157/no-valid-host-was-found-there-are-not-enough-hosts-available/">No valid host was found. There are not enough hosts available</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>OpenStack Horization error message<br />
<span id="more-2157"></span></p>
<pre lang="text">
no valid host was found. There are not enough hosts available.
Code
500
Details
File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", 
line 526, in build_instances context, request_spec, filter_properties) File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", 
line 597, in _schedule_instances hosts = self.scheduler_client.select_destinations(context, spec_obj) File "/usr/lib/python2.7/dist-packages/nova/scheduler/utils.py", 
line 371, in wrapped return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/nova/scheduler/client/__init__.py", 
line 51, in select_destinations return self.queryclient.select_destinations(context, spec_obj) File "/usr/lib/python2.7/dist-packages/nova/scheduler/client/__init__.py", 
line 37, in __run_method return getattr(self.instance, __name)(*args, **kwargs) 
File "/usr/lib/python2.7/dist-packages/nova/scheduler/client/query.py", 
line 32, in select_destinations return self.scheduler_rpcapi.select_destinations(context, spec_obj) 
File "/usr/lib/python2.7/dist-packages/nova/scheduler/rpcapi.py", 
line 129, in select_destinations return cctxt.call(ctxt, 'select_destinations', **msg_args) 
File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", 
line 169, in call retry=self.retry) 
File "/usr/lib/python2.7/dist-packages/oslo_messaging/transport.py", 
line 97, in _send timeout=timeout, retry=retry) 
File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", 
line 458, in send retry=retry) File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", 
line 449, in _send raise result
</pre>
<p>Possible reason</p>
<p>* if using cloud uefi image, it needs to install qemu-efi package in computer node, don&#8217;t know why it won&#8217;t install it automatically .<br />
   $ apt install qemu-efi<br />
* when add new UEFI image, it needs to add new meta data parameter in Horization<br />
   hw_firmware_type=uefi</p>
<p>if see </p>
<pre lang="text">
2017-08-01 14:02:13.612 2409 ERROR nova.compute.manager [instance: b334f0b3-ca9a-4f9a-b488-532dce00265a] libvirtError: unsupported configuration: logfile not supported in this QEMU binary
2017-08-01 14:02:13.612 2409 ERROR nova.compute.manager [instance: b334f0b3-ca9a-4f9a-b488-532dce00265a]
# Use the "logd" backend for handling stdout/stderr from QEMU processes.
</pre>
<p>Reason<br />
* Libvirt later version support new function, logd, it&#8217;s a new console log function, but ARM64 doesn&#8217;t support it. workaround solution is to disable it</p>
<p>Edit file /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py, find </p>
<pre lang="text">
MIN_LIBVIRT_VIRTLOGD = (1, 3, 3)
MIN_QEMU_VIRTLOGD = (2, 7, 0)
</pre>
<p>Replaced it with</p>
<pre lang="text">
MIN_LIBVIRT_VIRTLOGD = (9, 9, 9)
MIN_QEMU_VIRTLOGD = (9, 9, 9)
</pre>
<p>it can avoid to call libvirt logd function. </p>
<p>rm -f /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.pyc, make sure it will call .py<br />
then, reboot service (or system)</p>
<p>Ref.<br />
http://dozencloud.org/ </p>
<p>The post <a rel="nofollow" href="https://richliu.com/2017/08/03/2157/no-valid-host-was-found-there-are-not-enough-hosts-available/">No valid host was found. There are not enough hosts available</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2017/08/03/2157/no-valid-host-was-found-there-are-not-enough-hosts-available/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
