Jump to content




VirtualOS - A virtual Machine for CC (Now with GUI)


16 replies to this topic

#1 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 03 September 2017 - 02:03 PM

With VirtualOS you can run CraftOS in a virtual Machine.

VirtualOS (Commandline)
VirtualOS Manager (GUI)
Sandboxing

Edited by Wilma456, 11 June 2018 - 03:40 PM.


#2 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 04 September 2017 - 12:49 AM

Wasn't there a thing that said you aren't allowed to run virtual machines in virtual machines? :P

Technically MC could be considered a virtual machine..then CC running in that is another..

#3 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 04 September 2017 - 11:12 AM

View PostDave-ee Jones, on 04 September 2017 - 12:49 AM, said:

Wasn't there a thing that said you aren't allowed to run virtual machines in virtual machines? :P

Technically MC could be considered a virtual machine..then CC running in that is another..

If your server is running on a blade than that's another VM, if the thing about the universe being a simulation is true than that's another too.

Edited by Lupus590, 04 September 2017 - 11:12 AM.


#4 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 04 September 2017 - 11:39 AM

View PostLupus590, on 04 September 2017 - 11:12 AM, said:

View PostDave-ee Jones, on 04 September 2017 - 12:49 AM, said:

Wasn't there a thing that said you aren't allowed to run virtual machines in virtual machines? :P

Technically MC could be considered a virtual machine..then CC running in that is another..

If your server is running on a blade than that's another VM, if the thing about the universe being a simulation is true than that's another too.

The Matrix getting into your head, haha.

#5 Mumbai

  • Members
  • 62 posts

Posted 09 September 2017 - 05:16 PM

haha the BTC / LTC / blah *Tc of cc

#6 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 11 September 2017 - 04:21 PM

I had VirtualOS updated to Version 2.0 which fixed bugs and add new options to run.

And I had made a GUI for easy use.

#7 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 15 September 2017 - 02:17 AM

+1. It works surprisingly well, though the GUI manager could be a bit more..GUI-ey. :P

I'd be happy to try make one for you? OR, you can use my new GUI API. Haven't released it yet, though I could (it's basically done, but I'm figuring out what else I can add).

Mind you, you don't need to make a new GUI, as it works and is sufficient.

Edited by Dave-ee Jones, 15 September 2017 - 02:17 AM.


#8 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 15 September 2017 - 03:23 PM

What features do you miss in the GUI?

#9 Dave-ee Jones

  • Members
  • 456 posts
  • LocationVan Diemen's Land

Posted 19 September 2017 - 12:40 AM

View PostWilma456, on 15 September 2017 - 03:23 PM, said:

What features do you miss in the GUI?

Good question. As I said, it works, and works well, but it's not the nicest GUI to look at (not saying it has to be). It's up to you whether you want to make it look nice and fancy, but this works just fine.

#10 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 20 September 2017 - 03:04 PM

I have Updated VirtualOS and VirtualOS Manager:

VirtualOS 3.0:
-All Events are now sandboxed
-The VM can no longer overide tables from the Host
-Add Suport for shared folder

VirtualOS Manager 2.0:
-Add CraftOS Version 1.0-1.4
-Check Name if of VM is valid when creating
-Add About Page
-Renamed list.lua to drivelist.lua in /var/virtualos-manager to ensure, that ls willwork on CraftOS 1.8 in thie folder. You need to rename it when upgrading.

#11 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 13 October 2017 - 05:45 PM

Another Update:

VirtualOS 4.0:
-You can give VMs now acces to the disk
-You can disable turtle, pocket and commandsapi now
-The return of os.getComputerID() is now always round
-You can disable Peripherals

VirtualOS Manager 3.0:
-Add a GUI the configure the settings of a VM
-You can now copy VMs

#12 CRUGG

  • Members
  • 26 posts
  • Locationpropably in front of his PC

Posted 29 March 2018 - 06:46 PM

Is there a way to install the command line version in 1.7.10?

#13 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 29 March 2018 - 07:15 PM

View PostCRUGG, on 29 March 2018 - 06:46 PM, said:

Is there a way to install the command line version in 1.7.10?

http://www.computerc...r-gui-much-wow/

#14 ardera

  • Members
  • 503 posts
  • LocationGermany

Posted 01 April 2018 - 04:10 PM

Nice program, although it's not perfectly safe:

You can still get the original _G by calling getfenv(0), also I'm pretty sure calling os.queueEvent("timer", nil) will result in an "attempt to index nil" error in your code.
I also found a way to get some code run in the parent coroutine, in global env:
--# the function that should be run in the main coroutine in _G environment
local hackyfunction = function()
  print("Hello World")
end
setfenv(hackyfunction, getfenv(0)) --# set the environment of hackfunction to _G

local t = setmetatable({}, {__eq = function()
  hackyfunction()
  return false
end})
os.queueEvent("VirtualOS_Event", t)
coroutine.yield(t)
(Your event manager will compare the 2nd argument in the os.queueEvent call with the argument in coroutine.yield, which will trigger the __eq metamethod. This is done outside the VM, so __eq and thus "hackyfunction" will be run in the parent coroutine.)

Also, you can access the filesystem root directory by appending some "/../" before your paths. (Fix: replace fs.combine(sPath, "") with fs.combine("/", sPath))

But please don't get irritated by my criticism: Other than that it's one of the best Lua sandboxes I've seen, also it's really hard to build a perfect sandbox.


PS: I hope this doesn't get flagged as malicious code, it really isn't. I'm not deleting any user files etc.

Edited by ardera, 01 April 2018 - 04:19 PM.


#15 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 02 April 2018 - 04:05 PM

Thank you for reporting the Bugs. I try to fix it. But too of your Bugs can't be reproduced by me: os.queueEvent("timer", nil) doen't crash the program. Just nothing happens.
function test()
  print(_HOST)
  fs.open("/bug","w")
end

local t = setmetatable({}, {__eq = function()
  test()
  return false
end})
os.queueEvent("VirtualOS_Event", t)
coroutine.yield(t)
This code just hang up forever and need to be killed. Nothing hapens. Nothing is print and the file bug is not created. The only Bugs who works for me are getfenv(0) and "/../" (but your Fix doen't work). I try to fix it.

#16 ardera

  • Members
  • 503 posts
  • LocationGermany

Posted 03 April 2018 - 02:05 PM

View PostWilma456, on 02 April 2018 - 04:05 PM, said:

But too of your Bugs can't be reproduced by me: os.queueEvent("timer", nil) doen't crash the program. Just nothing happens.
-snip-
This code just hang up forever and need to be killed. Nothing hapens. Nothing is print and the file bug is not created. The only Bugs who works for me are getfenv(0) and "/../" (but your Fix doen't work). I try to fix it.
Oh yeah I didn't realise you also wrapped os.queueEvent. That explains why these 2 don't work.

#17 Wilma456

  • Members
  • 187 posts
  • LocationGermany

Posted 14 May 2018 - 03:03 PM

I had now fixed the getfenv() bug in VirtualOS 4.2. It*s not the nicest fix but it works.

The fs Bug is still working. I try to fix that.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users