{"id":13449375,"url":"https://github.com/sethmlarson/virtualbox-python","last_synced_at":"2025-03-22T22:32:53.977Z","repository":{"id":8632608,"uuid":"10278934","full_name":"sethmlarson/virtualbox-python","owner":"sethmlarson","description":"Complete implementation of VirtualBox's COM API with a Pythonic interface.","archived":true,"fork":false,"pushed_at":"2024-06-20T17:09:50.000Z","size":2780,"stargazers_count":351,"open_issues_count":0,"forks_count":75,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-09-26T20:06:24.576Z","etag":null,"topics":["python","virtual-machine","virtualbox","virtualbox-vm","vm"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/virtualbox","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sethmlarson.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-05-25T03:06:25.000Z","updated_at":"2024-09-23T16:48:54.000Z","dependencies_parsed_at":"2024-01-13T03:30:23.568Z","dependency_job_id":"b6fa9d55-4cc9-4ca6-9b86-8d4545a1115d","html_url":"https://github.com/sethmlarson/virtualbox-python","commit_stats":{"total_commits":366,"total_committers":24,"mean_commits":15.25,"dds":"0.27322404371584696","last_synced_commit":"36cb7d34dac4763e250ca0c44128a40d93d9fce5"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fvirtualbox-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fvirtualbox-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fvirtualbox-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethmlarson%2Fvirtualbox-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethmlarson","download_url":"https://codeload.github.com/sethmlarson/virtualbox-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221840634,"owners_count":16889834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","virtual-machine","virtualbox","virtualbox-vm","vm"],"created_at":"2024-07-31T06:00:36.678Z","updated_at":"2024-10-28T14:30:51.471Z","avatar_url":"https://github.com/sethmlarson.png","language":"Python","readme":"virtualbox-python\n*****************\n\n.. image:: http://unmaintained.tech/badge.svg\n  :target: http://unmaintained.tech\n  :alt: No Maintenance Intended\n\n**NOTE: ⚠️ I am no longer actively maintaining this project. If you have a vested interest in seeing it continued to be maintained please reach out to me via email.\nComplete implementation of VirtualBox's COM API with a Pythonic interface.**\n\nInstallation\n============\n\nGo to VirtualBox's downloads page (https://www.virtualbox.org/wiki/Downloads) and download the VirtualBox SDK.\nWithin the extracted ZIP file there is a directory called \"installer\". Open a console within the installer directory\nand run ``python vboxapisetup.py install`` using your system Python. This installs ``vboxapi`` which is the interface\nthat talks to VirtualBox via COM.\n\nNext is to install this library:\n\nTo get the latest released version of virtualbox from PyPI run the following::\n\n    $ python -m pip install virtualbox\n    \nor to install the latest development version from GitHub::\n\n    $ git clone https://github.com/sethmlarson/virtualbox-python\n    $ cd virtualbox-python\n    $ python setup.py install\n\nGetting Started \n===============\n\nListing Available Machines\n--------------------------\n\n .. code-block::\n\n    \u003e\u003e\u003e import virtualbox\n    \u003e\u003e\u003e vbox = virtualbox.VirtualBox()\n    \u003e\u003e\u003e [m.name for m in vbox.machines]\n    [\"windows\"]\n\nLaunching a Machine\n-------------------\n\n  .. code-block::\n\n    \u003e\u003e\u003e session = virtualbox.Session()\n    \u003e\u003e\u003e machine = vbox.find_machine(\"windows\")\n    \u003e\u003e\u003e # progress = machine.launch_vm_process(session, \"gui\", \"\")\n    \u003e\u003e\u003e # For virtualbox API 6_1 and above (VirtualBox 6.1.2+), use the following:\n    \u003e\u003e\u003e progress = machine.launch_vm_process(session, \"gui\", [])\n    \u003e\u003e\u003e progress.wait_for_completion()\n\nQuerying the Machine\n--------------------\n\n .. code-block::\n\n    \u003e\u003e\u003e session.state\n    SessionState(2)  # locked\n    \u003e\u003e\u003e machine.state\n    MachineState(5)  # running\n    \u003e\u003e\u003e height, width, _, _, _, _ = session.console.display.get_screen_resolution()\n\nInteracting with the Machine\n----------------------------\n\n .. code-block::\n\n    \u003e\u003e\u003e session.console.keyboard.put_keys(\"Hello, world!\")\n    \u003e\u003e\u003e guest_session = session.console.guest.create_session(\"Seth Larson\", \"password\")\n    \u003e\u003e\u003e guest_session.directory_exists(\"C:\\\\Windows\")\n    True\n    \u003e\u003e\u003e proc, stdout, stderr = guest_session.execute(\"C:\\\\\\\\Windows\\\\System32\\\\cmd.exe\", [\"/C\", \"tasklist\"])\n    \u003e\u003e\u003e print(stdout)\n    Image Name                   PID Session Name     Session#    Mem Usage\n    ========================= ====== ================ ======== ============\n    System Idle Process            0 Console                 0         28 K\n    System                         4 Console                 0        236 K\n    smss.exe                     532 Console                 0        432 K\n    csrss.exe                    596 Console                 0      3,440 K\n    winlogon.exe                 620 Console                 0      2,380 K\n    services.exe                 664 Console                 0      3,780 K\n    lsass.exe                    676 Console                 0      6,276 K\n    VBoxService.exe              856 Console                 0      3,972 K\n    svchost.exe                  900 Console                 0      4,908 K\n    svchost.exe                 1016 Console                 0      4,264 K\n    svchost.exe                 1144 Console                 0     18,344 K\n    svchost.exe                 1268 Console                 0      2,992 K\n    svchost.exe                 1372 Console                 0      3,948 K\n    spoolsv.exe                 1468 Console                 0      4,712 K\n    svchost.exe                 2000 Console                 0      3,856 K\n    wuauclt.exe                  400 Console                 0      7,176 K\n    alg.exe                     1092 Console                 0      3,656 K\n    wscntfy.exe                 1532 Console                 0      2,396 K\n    explorer.exe                1728 Console                 0     14,796 K\n    wmiprvse.exe                1832 Console                 0      7,096 K\n    VBoxTray.exe                1940 Console                 0      3,196 K\n    ctfmon.exe                  1948 Console                 0      3,292 K\n    cmd.exe                     1284 Console                 0      2,576 K\n    tasklist.exe                 124 Console                 0      4,584 K\n\nRegistering Event Handlers\n--------------------------\n\n .. code-block::\n\n    \u003e\u003e\u003e def test(event):\n    \u003e\u003e\u003e    print(\"scancode received: %r\" % event.scancodes)\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e session.console.keyboard.set_on_guest_keyboard(test)\n    140448201250560\n    scancode received: [35]\n    scancode received: [23]\n    scancode received: [163]\n    scancode received: [151]\n    scancode received: [57]\n\nPowering-Down a Machine\n-----------------------\n\n  .. code-block::\n\n    \u003e\u003e\u003e session.console.power_down()\n\nLicense\n=======\n\nApache-2.0\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethmlarson%2Fvirtualbox-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethmlarson%2Fvirtualbox-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethmlarson%2Fvirtualbox-python/lists"}