VM template for other architectures

Hello,

I’m trying to figure out how to instantiate a VM with qemu-system-aarch64 on an amd64 host, I tried to follow Problem instantiating Virtual Machines.

I installed qemu-system-arm package on the hosts and defined the following attributes in my template:

EMULATOR = "qemu-system-aarch64"
OS = [ ARCH = "aarch64" ]

But the deployement.0 file use qemu-system-x86_64:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
	<name>one-53810</name>
	<vcpu><![CDATA[4]]></vcpu>
	<cputune>
		<shares>21</shares>
	</cputune>
	<memory>2097152</memory>
	<os>
		<type arch='aarch64'>hvm</type>
	</os>
	<devices>
		<emulator><![CDATA[/usr/bin/qemu-system-x86_64]]></emulator>
		<disk type='file' device='disk'>
			<source file='/var/lib/one//datastores/100/53810/disk.0'/>
			<target dev='sda'/>
			<boot order='1'/>
			<driver name='qemu' type='qcow2' cache='none' discard='unmap'/>
		</disk>
		<disk type='file' device='cdrom'>
			<source file='/var/lib/one//datastores/100/53810/disk.1'/>
			<target dev='hda'/>
			<readonly/>
			<driver name='qemu' type='raw'/>
		</disk>
		<interface type='bridge'>
			<virtualport type='openvswitch'/>
			<source bridge='rectorat'/>
			<mac address='02:00:c0:a8:e6:07'/>
			<target dev='one-53810-0'/>
			<boot order='2'/>
			<model type='virtio'/>
		</interface>
		<graphics type='vnc' listen='0.0.0.0' port='59711' keymap='fr'/>
		<input type='tablet' bus='usb'/>
	</devices>
	<features>
		<acpi/>
	</features>
	<clock offset='localtime'/>
	  <devices>
    <controller type='scsi' index='0' model='virtio-scsi'/>
  </devices>
	<metadata>
		<system_datastore><![CDATA[/var/lib/one//datastores/100/53810]]>		</system_datastore>
	</metadata>
</domain>

Do you have any hints on how to do this?

Regards.

Hi

I’m afraid that this has to be changed into
/etc/one/vmm_exec/vmm_exec_kvm.conf, it seems that is not a per template
setting in the code…

Cheers

“Ruben S. Montero” opennebula@discoursemail.com writes:

Hello,

I’m afraid that this has to be changed into
/etc/one/vmm_exec/vmm_exec_kvm.conf, it seems that is not a per template
setting in the code…

Thanks for the reply, I found a request[1] corresponding to this.

Regards.

Footnotes:
[1] https://dev.opennebula.org/issues/3510

Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF

Merged, We’ve also added EMULATOR as a restricted attribute by default.

“Ruben S. Montero” opennebula@discoursemail.com writes:

Merged,

Thanks a lot.

We’ve also added EMULATOR as a restricted attribute by default.

Ok for me.

Regards.
Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF