acrnctl and acrnd¶
acrnctl tool helps users create, delete, launch, and stop a User
OS (UOS). The tool runs under the Service OS, and UOSs should be based
acrn-dm. The daemon for acrn-manager is acrnd.
You can see the available
acrnctl commands by running:
# acrnctl help support: list start stop del add pause continue suspend resume reset blkrescan Use acrnctl [cmd] help for details
Here are some usage examples:
Add a VM¶
add command lets you add a VM by specifying a
script that will launch a UOS, for example
# acrnctl add launch_uos.sh -U 1 vm1-14:59:30 added
-C option is also specified, the VM is launched in a runC
# acrnctl add launch_uos.sh -C
You can download an example launch_uos.sh script
that supports the
run_container function) option. You may refer to Enable QoS based on runC container
for more details about this option.
Note that the launch script must only launch one UOS instance.
The VM name is important.
acrnctl searches VMs by their
names so duplicate VM names are not allowed. If the
launch script changes the VM name at launch time,
will not recognize it.
delete command with a VM name to delete that VM:
# acrnctl del vm1-14:59:30
list command to display VMs and their state:
# acrnctl list vm1-14:59:30 untracked vm-yocto stopped vm-android stopped
If a VM is in a
stopped state, you can start it with the
# acrnctl start vm-yocto
stop command to stop one or more running VM:
# acrnctl stop vm-yocto vm1-14:59:30 vm-android
RESCAN BLOCK DEVICE¶
blkrescan command to trigger a rescan of
virtio-blk device by guest VM, in order to revalidate and
update the backend file.
# acrnctl blkrescan vmname slot,newfilepath vmname: Name of VM with dummy backend file attached to virtio-blk device. slot: Slot number of the virtio-blk device. newfilepath: File path for the backend of virtio-blk device. acrnctl blkrescan vm1 6,actual_file.img
blkrescan is only supported when VM is launched with empty backend file (using nodisk) for virtio-blk device. Replacing a valid backend file is not supported and will result in error.
acrnd daemon process provides a way for launching or resuming a UOS
should the UOS shut down, either planned or unexpected. A UOS can ask
to set up a timer to make sure the UOS is running, even if the SOS is
suspended or stopped.
You can see the available
acrnd commands by running:
$ acrnd -h acrnd - Deamon for ACRN VM Management [Usage] acrnd [-t] [-d delay] [-h] -h: print this message -t: print messages to stdout
acrnd runs silently (messages are directed to
/dev/null). Use the
-t option to direct messages to stdout,
useful for debugging.
acrnd daemon stores pending UOS work to
and sets an RTC timer to wake up the SOS or bring the SOS back up again.
acrnd daemon is restarted, it restores the previously saved timer
list and launches the UOSs at the right time.
systemd service file (
acrnd.service) is installed by default that will
acrnd daemon when the Service OS comes up.
You can restart/stop acrnd service using
Build and Install¶
Source code for both
acrnd is in the
Change to that folder and run:
# make # make install