Rename VirtManager to VirtualizationService.

Bug: 188042280
Test: atest VirtualizationTestCases
Change-Id: I15f3f91e464f52d1b1fd47b1290846b1d21fa665
diff --git a/apex/Android.bp b/apex/Android.bp
index 63f257b..4386e6e 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -44,7 +44,7 @@
     },
     binaries: [
         "fd_server",
-        "virtmanager",
+        "virtualizationservice",
         "vm",
 
         // tools to create composite images
@@ -80,6 +80,6 @@
 
 prebuilt_etc {
     name: "com.android.virt.init.rc",
-    src: "virtmanager.rc",
+    src: "virtualizationservice.rc",
     filename: "init.rc",
 }
diff --git a/apex/virtmanager.rc b/apex/virtualizationservice.rc
similarity index 81%
rename from apex/virtmanager.rc
rename to apex/virtualizationservice.rc
index 4a41154..6e0b045 100644
--- a/apex/virtmanager.rc
+++ b/apex/virtualizationservice.rc
@@ -12,8 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-service virtmanager /apex/com.android.virt/bin/virtmanager
+service virtualizationservice /apex/com.android.virt/bin/virtualizationservice
     class main
-    user virtmanager
-    group virtmanager
+    user virtualizationservice
+    group virtualizationservice
     disabled
diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md
index 9c06367..148b8d8 100644
--- a/docs/getting_started/index.md
+++ b/docs/getting_started/index.md
@@ -39,7 +39,7 @@
 
 ### Spawning your own VMs
 
-You can spawn your own VMs by passing a JSON config file to the Virt Manager via the `vm` tool on a
+You can spawn your own VMs by passing a JSON config file to the VirtualizationService via the `vm` tool on a
 rooted KVM-enabled device. If your device is attached over ADB, you can run:
 
 ```shell
@@ -53,16 +53,16 @@
 $ adb push <kernel> /data/local/tmp/kernel
 $ adb push <ramdisk> /data/local/tmp/ramdisk
 $ adb push vm_config.json /data/local/tmp/vm_config.json
-$ adb shell "start virtmanager"
+$ adb shell "start virtualizationservice"
 $ adb shell "/apex/com.android.virt/bin/vm run /data/local/tmp/vm_config.json"
 ```
 
 The `vm` command also has other subcommands for debugging; run `/apex/com.android.virt/bin/vm help`
 for details.
 
-### Building and updating CrosVM and Virt Manager
+### Building and updating CrosVM and VirtualizationService
 
-You can update CrosVM and the Virt Manager service by updating the `com.android.virt` APEX. If your
+You can update CrosVM and the VirtualizationService by updating the `com.android.virt` APEX. If your
 device already has `com.android.virt` (e.g. VIM3L):
 
 ```shell
diff --git a/microdroid/README.md b/microdroid/README.md
index cb6cc18..372c21f 100644
--- a/microdroid/README.md
+++ b/microdroid/README.md
@@ -71,7 +71,7 @@
 Copy the artifacts to the temp directory, create the composite image using
 `mk_cdisk` and copy the VM config file. For now, some other files have to be
 manually created. In the future, you won't need these, and this shall be done
-via [`virtmanager`](../virtmanager/).
+via [`virtualizationservice`](../virtualizationservice/).
 
 ```sh
 $ adb root
@@ -89,7 +89,7 @@
 $ adb push microdroid.json /data/local/tmp/microdroid/microdroid.json
 ```
 
-Ensure SELinux is in permissive mode to allow virtmanager and crosvm to open
+Ensure SELinux is in permissive mode to allow virtualizationservice and crosvm to open
 files from `/data/local/tmp`. Opening files from this directory is
 neverallow-ed and file descriptors should be passed instead but, before that is
 supported, `adb shell setenforce 0` will put the device in permissive mode.
@@ -97,7 +97,7 @@
 Now, run the VM and look for `adbd` starting in the logs.
 
 ```sh
-$ adb shell "start virtmanager"
+$ adb shell "start virtualizationservice"
 $ adb shell "RUST_BACKTRACE=1 RUST_LOG=trace /apex/com.android.virt/bin/vm run /data/local/tmp/microdroid/microdroid.json"
 ```
 
diff --git a/microdroid/signature/README.md b/microdroid/signature/README.md
index b47c303..bc97106 100644
--- a/microdroid/signature/README.md
+++ b/microdroid/signature/README.md
@@ -49,6 +49,7 @@
 ### `mk_payload`
 
 `mk_payload` creates a payload image.
+
 ```
 $ cat payload_config.json
 {
@@ -78,4 +79,4 @@
 ...
 ```
 
-In the future, [VirtManager](../../virtmanager) will handle this.
\ No newline at end of file
+In the future, [VirtualizationService](../../virtualizationservice) will handle this.
diff --git a/tests/Android.bp b/tests/Android.bp
index a06977e..be6e653 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -36,7 +36,7 @@
     static_libs: [
         // The existence of the library in the system partition is not guaranteed.
         // Let's have our own copy of it.
-        "android.system.virtmanager-cpp",
+        "android.system.virtualizationservice-cpp",
     ],
     shared_libs: [
         "libbase",
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index 7c9d889..a8fdf19 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -25,8 +25,8 @@
         <option name="run-command" value="ls /dev/vhost-vsock" />
         <!-- CrosVM is installed. -->
         <option name="run-command" value="ls /apex/com.android.virt/bin/crosvm" />
-        <!-- Virt Manager is installed. -->
-        <option name="run-command" value="ls /apex/com.android.virt/bin/virtmanager" />
+        <!-- VirtualizationService is installed. -->
+        <option name="run-command" value="ls /apex/com.android.virt/bin/virtualizationservice" />
     </target_preparer>
 
     <!-- Push test binaries to the device. -->
@@ -42,11 +42,11 @@
          TODO: Give sufficient permissions to the adb shell user (b/171240450). -->
     <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
 
-    <!-- Run Virt Manager for the duration of the test.
-         TODO: Run Virt Manager as a system service. -->
+    <!-- Run VirtualizationService for the duration of the test.
+         TODO: Run VirtualizationService as a system service. -->
     <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
         <option name="throw-if-cmd-fail" value="true" />
-        <option name="run-command" value="start virtmanager" />
+        <option name="run-command" value="start virtualizationservice" />
     </target_preparer>
 
     <test class="com.android.tradefed.testtype.GTest" >
diff --git a/tests/common.cc b/tests/common.cc
index 10c98b6..fbda6c6 100644
--- a/tests/common.cc
+++ b/tests/common.cc
@@ -19,7 +19,9 @@
 namespace virt {
 
 void VirtualizationTest::SetUp() {
-    status_t err = getService<IVirtManager>(String16("android.system.virtmanager"), &mVirtManager);
+    status_t err =
+            getService<IVirtualizationService>(String16("android.system.virtualizationservice"),
+                                               &mVirtualizationService);
     ASSERT_EQ(err, 0);
 }
 
diff --git a/tests/include/virt/VirtualizationTest.h b/tests/include/virt/VirtualizationTest.h
index a996f11..29509ba 100644
--- a/tests/include/virt/VirtualizationTest.h
+++ b/tests/include/virt/VirtualizationTest.h
@@ -14,13 +14,13 @@
  * limitations under the License.
  */
 
-#include "android/system/virtmanager/IVirtManager.h"
-#include "android/system/virtmanager/IVirtualMachine.h"
+#include "android/system/virtualizationservice/IVirtualMachine.h"
+#include "android/system/virtualizationservice/IVirtualizationService.h"
 #include "binder/IServiceManager.h"
 #include "gtest/gtest.h"
 
 using namespace android;
-using namespace android::system::virtmanager;
+using namespace android::system::virtualizationservice;
 
 namespace virt {
 
@@ -28,7 +28,7 @@
 protected:
     void SetUp() override;
 
-    sp<IVirtManager> mVirtManager;
+    sp<IVirtualizationService> mVirtualizationService;
 };
 
 } // namespace virt
diff --git a/tests/vsock_test.cc b/tests/vsock_test.cc
index f31cb94..84827d8 100644
--- a/tests/vsock_test.cc
+++ b/tests/vsock_test.cc
@@ -27,7 +27,7 @@
 #include "android-base/logging.h"
 #include "android-base/parseint.h"
 #include "android-base/unique_fd.h"
-#include "android/system/virtmanager/VirtualMachineConfig.h"
+#include "android/system/virtualizationservice/VirtualMachineConfig.h"
 #include "virt/VirtualizationTest.h"
 
 using namespace android::base;
@@ -66,7 +66,7 @@
     config.params = String16(kVmParams);
 
     sp<IVirtualMachine> vm;
-    status = mVirtManager->startVm(config, std::nullopt, &vm);
+    status = mVirtualizationService->startVm(config, std::nullopt, &vm);
     ASSERT_TRUE(status.isOk()) << "Error starting VM: " << status;
 
     int32_t cid;
diff --git a/virtmanager/.gitignore b/virtualizationservice/.gitignore
similarity index 100%
rename from virtmanager/.gitignore
rename to virtualizationservice/.gitignore
diff --git a/virtmanager/Android.bp b/virtualizationservice/Android.bp
similarity index 72%
rename from virtmanager/Android.bp
rename to virtualizationservice/Android.bp
index 0e746b3..2c44200 100644
--- a/virtmanager/Android.bp
+++ b/virtualizationservice/Android.bp
@@ -3,13 +3,13 @@
 }
 
 rust_binary {
-    name: "virtmanager",
-    crate_name: "virtmanager",
+    name: "virtualizationservice",
+    crate_name: "virtualizationservice",
     srcs: ["src/main.rs"],
     edition: "2018",
     prefer_rlib: true,
     rustlibs: [
-        "android.system.virtmanager-rust",
+        "android.system.virtualizationservice-rust",
         "libandroid_logger",
         "libanyhow",
         "libcommand_fds",
diff --git a/virtmanager/aidl/Android.bp b/virtualizationservice/aidl/Android.bp
similarity index 90%
rename from virtmanager/aidl/Android.bp
rename to virtualizationservice/aidl/Android.bp
index ebe5624..89cfdef 100644
--- a/virtmanager/aidl/Android.bp
+++ b/virtualizationservice/aidl/Android.bp
@@ -3,7 +3,7 @@
 }
 
 aidl_interface {
-    name: "android.system.virtmanager",
+    name: "android.system.virtualizationservice",
     srcs: ["**/*.aidl"],
     // TODO(qwandor): Consider changing this to false, unless we have a Java wrapper.
     unstable: true,
diff --git a/virtmanager/aidl/android/system/virtmanager/DiskImage.aidl b/virtualizationservice/aidl/android/system/virtualizationservice/DiskImage.aidl
similarity index 94%
rename from virtmanager/aidl/android/system/virtmanager/DiskImage.aidl
rename to virtualizationservice/aidl/android/system/virtualizationservice/DiskImage.aidl
index 9abb350..6bc747e 100644
--- a/virtmanager/aidl/android/system/virtmanager/DiskImage.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationservice/DiskImage.aidl
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.system.virtmanager;
+package android.system.virtualizationservice;
 
 /** A disk image to be made available to the VM. */
 parcelable DiskImage {
diff --git a/virtmanager/aidl/android/system/virtmanager/IVirtualMachine.aidl b/virtualizationservice/aidl/android/system/virtualizationservice/IVirtualMachine.aidl
similarity index 89%
rename from virtmanager/aidl/android/system/virtmanager/IVirtualMachine.aidl
rename to virtualizationservice/aidl/android/system/virtualizationservice/IVirtualMachine.aidl
index 26aad0c..e864414 100644
--- a/virtmanager/aidl/android/system/virtmanager/IVirtualMachine.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationservice/IVirtualMachine.aidl
@@ -13,9 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.system.virtmanager;
+package android.system.virtualizationservice;
 
-import android.system.virtmanager.IVirtualMachineCallback;
+import android.system.virtualizationservice.IVirtualMachineCallback;
 
 interface IVirtualMachine {
     /** Get the CID allocated to the VM. */
diff --git a/virtmanager/aidl/android/system/virtmanager/IVirtualMachineCallback.aidl b/virtualizationservice/aidl/android/system/virtualizationservice/IVirtualMachineCallback.aidl
similarity index 66%
rename from virtmanager/aidl/android/system/virtmanager/IVirtualMachineCallback.aidl
rename to virtualizationservice/aidl/android/system/virtualizationservice/IVirtualMachineCallback.aidl
index 65a685d..10ef31b 100644
--- a/virtmanager/aidl/android/system/virtmanager/IVirtualMachineCallback.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationservice/IVirtualMachineCallback.aidl
@@ -13,20 +13,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.system.virtmanager;
+package android.system.virtualizationservice;
 
-import android.system.virtmanager.IVirtualMachine;
+import android.system.virtualizationservice.IVirtualMachine;
 
 /**
- * An object which a client may register with the Virt Manager to get callbacks about the state of
- * a particular VM.
+ * An object which a client may register with the VirtualizationService to get callbacks about the
+ * state of a particular VM.
  */
 oneway interface IVirtualMachineCallback {
     /**
      * Called when the VM dies.
      *
-     * Note that this will not be called if the Virt Manager itself dies, so you should also use
-     * `link_to_death` to handle that.
+     * Note that this will not be called if the VirtualizationService itself dies, so you should
+     * also use `link_to_death` to handle that.
      */
     void onDied(int cid);
 }
diff --git a/virtmanager/aidl/android/system/virtmanager/IVirtManager.aidl b/virtualizationservice/aidl/android/system/virtualizationservice/IVirtualizationService.aidl
similarity index 63%
rename from virtmanager/aidl/android/system/virtmanager/IVirtManager.aidl
rename to virtualizationservice/aidl/android/system/virtualizationservice/IVirtualizationService.aidl
index 650b847..7974e71 100644
--- a/virtmanager/aidl/android/system/virtmanager/IVirtManager.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationservice/IVirtualizationService.aidl
@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.system.virtmanager;
+package android.system.virtualizationservice;
 
-import android.system.virtmanager.IVirtualMachine;
-import android.system.virtmanager.VirtualMachineConfig;
-import android.system.virtmanager.VirtualMachineDebugInfo;
+import android.system.virtualizationservice.IVirtualMachine;
+import android.system.virtualizationservice.VirtualMachineConfig;
+import android.system.virtualizationservice.VirtualMachineDebugInfo;
 
-interface IVirtManager {
+interface IVirtualizationService {
     /**
      * Start the VM with the given config file, and return a handle to it. If `logFd` is provided
      * then console logs from the VM will be sent to it.
@@ -34,15 +34,15 @@
     VirtualMachineDebugInfo[] debugListVms();
 
     /**
-     * Hold a strong reference to a VM in Virt Manager. This method is only intended for debug
-     * purposes, and as such is only permitted from the shell user.
+     * Hold a strong reference to a VM in VirtualizationService. This method is only intended for
+     * debug purposes, and as such is only permitted from the shell user.
      */
     void debugHoldVmRef(IVirtualMachine vm);
 
     /**
-     * Drop reference to a VM that is being held by Virt Manager. Returns the reference if VM was
-     * found and null otherwise. This method is only intended for debug purposes, and as such is
-     * only permitted from the shell user.
+     * Drop reference to a VM that is being held by VirtualizationService. Returns the reference if
+     * VM was found and null otherwise. This method is only intended for debug purposes, and as such
+     * is only permitted from the shell user.
      */
     @nullable IVirtualMachine debugDropVmRef(int cid);
 }
diff --git a/virtmanager/aidl/android/system/virtmanager/VirtualMachineConfig.aidl b/virtualizationservice/aidl/android/system/virtualizationservice/VirtualMachineConfig.aidl
similarity index 93%
rename from virtmanager/aidl/android/system/virtmanager/VirtualMachineConfig.aidl
rename to virtualizationservice/aidl/android/system/virtualizationservice/VirtualMachineConfig.aidl
index 39be0f3..6ca9cc7 100644
--- a/virtmanager/aidl/android/system/virtmanager/VirtualMachineConfig.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationservice/VirtualMachineConfig.aidl
@@ -13,9 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.system.virtmanager;
+package android.system.virtualizationservice;
 
-import android.system.virtmanager.DiskImage;
+import android.system.virtualizationservice.DiskImage;
 
 /** Configuration for running a VM. */
 parcelable VirtualMachineConfig {
diff --git a/virtmanager/aidl/android/system/virtmanager/VirtualMachineDebugInfo.aidl b/virtualizationservice/aidl/android/system/virtualizationservice/VirtualMachineDebugInfo.aidl
similarity index 95%
rename from virtmanager/aidl/android/system/virtmanager/VirtualMachineDebugInfo.aidl
rename to virtualizationservice/aidl/android/system/virtualizationservice/VirtualMachineDebugInfo.aidl
index 967db04..d20d91d 100644
--- a/virtmanager/aidl/android/system/virtmanager/VirtualMachineDebugInfo.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationservice/VirtualMachineDebugInfo.aidl
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.system.virtmanager;
+package android.system.virtualizationservice;
 
 /** Information about a running VM, for debug purposes only. */
 parcelable VirtualMachineDebugInfo {
diff --git a/virtmanager/src/aidl.rs b/virtualizationservice/src/aidl.rs
similarity index 84%
rename from virtmanager/src/aidl.rs
rename to virtualizationservice/src/aidl.rs
index d8fb1ed..ef973d1 100644
--- a/virtmanager/src/aidl.rs
+++ b/virtualizationservice/src/aidl.rs
@@ -12,38 +12,38 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-//! Implementation of the AIDL interface of the Virt Manager.
+//! Implementation of the AIDL interface of the VirtualizationService.
 
 use crate::crosvm::VmInstance;
 use crate::{Cid, FIRST_GUEST_CID};
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtManager::IVirtManager;
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtualMachine::{
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualizationService::IVirtualizationService;
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualMachine::{
     BnVirtualMachine, IVirtualMachine,
 };
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtualMachineCallback::IVirtualMachineCallback;
-use android_system_virtmanager::aidl::android::system::virtmanager::VirtualMachineConfig::VirtualMachineConfig;
-use android_system_virtmanager::aidl::android::system::virtmanager::VirtualMachineDebugInfo::VirtualMachineDebugInfo;
-use android_system_virtmanager::binder::{
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualMachineCallback::IVirtualMachineCallback;
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::VirtualMachineConfig::VirtualMachineConfig;
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::VirtualMachineDebugInfo::VirtualMachineDebugInfo;
+use android_system_virtualizationservice::binder::{
     self, BinderFeatures, Interface, ParcelFileDescriptor, StatusCode, Strong, ThreadState,
 };
 use log::{debug, error};
 use std::sync::{Arc, Mutex, Weak};
 
-pub const BINDER_SERVICE_IDENTIFIER: &str = "android.system.virtmanager";
+pub const BINDER_SERVICE_IDENTIFIER: &str = "android.system.virtualizationservice";
 
 // TODO(qwandor): Use PermissionController once it is available to Rust.
 /// Only processes running with one of these UIDs are allowed to call debug methods.
 const DEBUG_ALLOWED_UIDS: [u32; 2] = [0, 2000];
 
-/// Implementation of `IVirtManager`, the entry point of the AIDL service.
+/// Implementation of `IVirtualizationService`, the entry point of the AIDL service.
 #[derive(Debug, Default)]
-pub struct VirtManager {
+pub struct VirtualizationService {
     state: Mutex<State>,
 }
 
-impl Interface for VirtManager {}
+impl Interface for VirtualizationService {}
 
-impl IVirtManager for VirtManager {
+impl IVirtualizationService for VirtualizationService {
     /// Create and start a new VM with the given configuration, assigning it the next available CID.
     ///
     /// Returns a binder `IVirtualMachine` object referring to it, as a handle for the client.
@@ -111,8 +111,8 @@
         Ok(cids)
     }
 
-    /// Hold a strong reference to a VM in Virt Manager. This method is only intended for debug
-    /// purposes, and as such is only permitted from the shell user.
+    /// Hold a strong reference to a VM in VirtualizationService. This method is only intended for
+    /// debug purposes, and as such is only permitted from the shell user.
     fn debugHoldVmRef(&self, vmref: &Strong<dyn IVirtualMachine>) -> binder::Result<()> {
         if !debug_access_allowed() {
             return Err(StatusCode::PERMISSION_DENIED.into());
@@ -123,9 +123,9 @@
         Ok(())
     }
 
-    /// Drop reference to a VM that is being held by Virt Manager. Returns the reference if VM was
-    /// found and None otherwise. This method is only intended for debug purposes, and as such is
-    /// only permitted from the shell user.
+    /// Drop reference to a VM that is being held by VirtualizationService. Returns the reference if
+    /// the VM was found and None otherwise. This method is only intended for debug purposes, and as
+    /// such is only permitted from the shell user.
     fn debugDropVmRef(&self, cid: i32) -> binder::Result<Option<Strong<dyn IVirtualMachine>>> {
         if !debug_access_allowed() {
             return Err(StatusCode::PERMISSION_DENIED.into());
@@ -206,7 +206,8 @@
     }
 }
 
-/// The mutable state of the Virt Manager. There should only be one instance of this struct.
+/// The mutable state of the VirtualizationService. There should only be one instance of this
+/// struct.
 #[derive(Debug)]
 struct State {
     /// The next available unused CID.
diff --git a/virtmanager/src/crosvm.rs b/virtualizationservice/src/crosvm.rs
similarity index 97%
rename from virtmanager/src/crosvm.rs
rename to virtualizationservice/src/crosvm.rs
index 1b11fd6..552941d 100644
--- a/virtmanager/src/crosvm.rs
+++ b/virtualizationservice/src/crosvm.rs
@@ -16,7 +16,7 @@
 
 use crate::aidl::VirtualMachineCallbacks;
 use crate::Cid;
-use android_system_virtmanager::aidl::android::system::virtmanager::VirtualMachineConfig::VirtualMachineConfig;
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::VirtualMachineConfig::VirtualMachineConfig;
 use anyhow::{bail, Context, Error};
 use command_fds::{CommandFdExt, FdMapping};
 use log::{debug, error, info};
diff --git a/virtmanager/src/main.rs b/virtualizationservice/src/main.rs
similarity index 65%
rename from virtmanager/src/main.rs
rename to virtualizationservice/src/main.rs
index 762e2f8..5453146 100644
--- a/virtmanager/src/main.rs
+++ b/virtualizationservice/src/main.rs
@@ -12,21 +12,21 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-//! Android Virt Manager
+//! Android VirtualizationService
 
 mod aidl;
 mod crosvm;
 
-use crate::aidl::{VirtManager, BINDER_SERVICE_IDENTIFIER};
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtManager::BnVirtManager;
-use android_system_virtmanager::binder::{add_service, BinderFeatures, ProcessState};
+use crate::aidl::{VirtualizationService, BINDER_SERVICE_IDENTIFIER};
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualizationService::BnVirtualizationService;
+use android_system_virtualizationservice::binder::{add_service, BinderFeatures, ProcessState};
 use log::{info, Level};
 
-/// The first CID to assign to a guest VM managed by the Virt Manager. CIDs lower than this are
-/// reserved for the host or other usage.
+/// The first CID to assign to a guest VM managed by the VirtualizationService. CIDs lower than this
+/// are reserved for the host or other usage.
 const FIRST_GUEST_CID: Cid = 10;
 
-const LOG_TAG: &str = "VirtManager";
+const LOG_TAG: &str = "VirtualizationService";
 
 /// The unique ID of a VM used (together with a port number) for vsock communication.
 type Cid = u32;
@@ -36,8 +36,8 @@
         android_logger::Config::default().with_tag(LOG_TAG).with_min_level(Level::Trace),
     );
 
-    let virt_manager = VirtManager::default();
-    let virt_manager = BnVirtManager::new_binder(
+    let virt_manager = VirtualizationService::default();
+    let virt_manager = BnVirtualizationService::new_binder(
         virt_manager,
         BinderFeatures { set_requesting_sid: true, ..BinderFeatures::default() },
     );
diff --git a/vm/Android.bp b/vm/Android.bp
index d0f341d..e7148ca 100644
--- a/vm/Android.bp
+++ b/vm/Android.bp
@@ -8,7 +8,7 @@
     srcs: ["src/main.rs"],
     edition: "2018",
     rustlibs: [
-        "android.system.virtmanager-rust",
+        "android.system.virtualizationservice-rust",
         "libanyhow",
         "libenv_logger",
         "liblibc",
diff --git a/vm/src/config.rs b/vm/src/config.rs
index a6f48ce..cbdd0bf 100644
--- a/vm/src/config.rs
+++ b/vm/src/config.rs
@@ -14,9 +14,9 @@
 
 //! Struct for VM configuration.
 
-use android_system_virtmanager::{
-    aidl::android::system::virtmanager::DiskImage::DiskImage as AidlDiskImage,
-    aidl::android::system::virtmanager::VirtualMachineConfig::VirtualMachineConfig,
+use android_system_virtualizationservice::{
+    aidl::android::system::virtualizationservice::DiskImage::DiskImage as AidlDiskImage,
+    aidl::android::system::virtualizationservice::VirtualMachineConfig::VirtualMachineConfig,
     binder::ParcelFileDescriptor,
 };
 use anyhow::{bail, Context, Error};
diff --git a/vm/src/main.rs b/vm/src/main.rs
index 2f5d9e6..56a0c92 100644
--- a/vm/src/main.rs
+++ b/vm/src/main.rs
@@ -18,15 +18,15 @@
 mod run;
 mod sync;
 
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtManager::IVirtManager;
-use android_system_virtmanager::binder::{get_interface, ProcessState, Strong};
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualizationService::IVirtualizationService;
+use android_system_virtualizationservice::binder::{get_interface, ProcessState, Strong};
 use anyhow::{Context, Error};
 use run::command_run;
 use std::path::PathBuf;
 use structopt::clap::AppSettings;
 use structopt::StructOpt;
 
-const VIRT_MANAGER_BINDER_SERVICE_IDENTIFIER: &str = "android.system.virtmanager";
+const VIRT_MANAGER_BINDER_SERVICE_IDENTIFIER: &str = "android.system.virtualizationservice";
 
 #[derive(StructOpt)]
 #[structopt(no_version, global_settings = &[AppSettings::DisableVersion])]
@@ -58,7 +58,7 @@
     ProcessState::start_thread_pool();
 
     let virt_manager = get_interface(VIRT_MANAGER_BINDER_SERVICE_IDENTIFIER)
-        .context("Failed to find Virt Manager service")?;
+        .context("Failed to find VirtualizationService")?;
 
     match opt {
         Opt::Run { config, daemonize } => command_run(virt_manager, &config, daemonize),
@@ -68,16 +68,16 @@
 }
 
 /// Retrieve reference to a previously daemonized VM and stop it.
-fn command_stop(virt_manager: Strong<dyn IVirtManager>, cid: u32) -> Result<(), Error> {
+fn command_stop(virt_manager: Strong<dyn IVirtualizationService>, cid: u32) -> Result<(), Error> {
     virt_manager
         .debugDropVmRef(cid as i32)
-        .context("Failed to get VM from Virt Manager")?
+        .context("Failed to get VM from VirtualizationService")?
         .context("CID does not correspond to a running background VM")?;
     Ok(())
 }
 
 /// List the VMs currently running.
-fn command_list(virt_manager: Strong<dyn IVirtManager>) -> Result<(), Error> {
+fn command_list(virt_manager: Strong<dyn IVirtualizationService>) -> Result<(), Error> {
     let vms = virt_manager.debugListVms().context("Failed to get list of VMs")?;
     println!("Running VMs: {:#?}", vms);
     Ok(())
diff --git a/vm/src/run.rs b/vm/src/run.rs
index de9b720..6ac66f1 100644
--- a/vm/src/run.rs
+++ b/vm/src/run.rs
@@ -16,15 +16,15 @@
 
 use crate::config::VmConfig;
 use crate::sync::AtomicFlag;
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtManager::IVirtManager;
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtualMachine::IVirtualMachine;
-use android_system_virtmanager::aidl::android::system::virtmanager::IVirtualMachineCallback::{
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualizationService::IVirtualizationService;
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualMachine::IVirtualMachine;
+use android_system_virtualizationservice::aidl::android::system::virtualizationservice::IVirtualMachineCallback::{
     BnVirtualMachineCallback, IVirtualMachineCallback,
 };
-use android_system_virtmanager::binder::{
+use android_system_virtualizationservice::binder::{
     BinderFeatures, DeathRecipient, IBinder, ParcelFileDescriptor, Strong,
 };
-use android_system_virtmanager::binder::{Interface, Result as BinderResult};
+use android_system_virtualizationservice::binder::{Interface, Result as BinderResult};
 use anyhow::{Context, Error};
 use std::fs::File;
 use std::io;
@@ -33,7 +33,7 @@
 
 /// Run a VM from the given configuration file.
 pub fn command_run(
-    virt_manager: Strong<dyn IVirtManager>,
+    virt_manager: Strong<dyn IVirtualizationService>,
     config_path: &Path,
     daemonize: bool,
 ) -> Result<(), Error> {
@@ -48,16 +48,17 @@
     println!("Started VM from {:?} with CID {}.", config_path, cid);
 
     if daemonize {
-        // Pass the VM reference back to Virt Manager and have it hold it in the background.
-        virt_manager.debugHoldVmRef(&vm).context("Failed to pass VM to Virt Manager")
+        // Pass the VM reference back to VirtualizationService and have it hold it in the
+        // background.
+        virt_manager.debugHoldVmRef(&vm).context("Failed to pass VM to VirtualizationService")
     } else {
-        // Wait until the VM or VirtManager dies. If we just returned immediately then the
+        // Wait until the VM or VirtualizationService dies. If we just returned immediately then the
         // IVirtualMachine Binder object would be dropped and the VM would be killed.
         wait_for_vm(vm)
     }
 }
 
-/// Wait until the given VM or the VirtManager itself dies.
+/// Wait until the given VM or the VirtualizationService itself dies.
 fn wait_for_vm(vm: Strong<dyn IVirtualMachine>) -> Result<(), Error> {
     let dead = AtomicFlag::default();
     let callback = BnVirtualMachineCallback::new_binder(
@@ -78,7 +79,7 @@
 /// If the returned DeathRecipient is dropped then this will no longer do anything.
 fn wait_for_death(binder: &mut impl IBinder, dead: AtomicFlag) -> Result<DeathRecipient, Error> {
     let mut death_recipient = DeathRecipient::new(move || {
-        println!("VirtManager died");
+        println!("VirtualizationService died");
         dead.raise();
     });
     binder.link_to_death(&mut death_recipient)?;