Closed cacoyle closed 8 years ago
Credit to @capsterx for figuring this out:
import virtualbox
vbox = virtualbox.VirtualBox()
vm = vbox.find_machine("Windows2012_64_base")
s = virtualbox.Session()
try:
vm.lock_machine(s, virtualbox.library.LockType.shared)
s.machine.create_shared_folder("export", "/tmp", True, True)
s.machine.save_settings()
finally:
s.unlock_machine()
Unable to create a shared folder between the Host and Guest using pyvbox, trying to accomplish the same result as the following command:
vboxmanage sharedfolder add Windows2012_64_base --name exports --hostpath /tmp --automount
Code:
Output (Guest powered off)
Output (Guest powered on)
Let me know if there's any further detail I can provide, thanks!